@Test public void testEquals() { String prefixName1 = "prefix1"; String prefixName2 = "prefix2"; NatRuleThenPrefixName thenPrefixName1 = new NatRuleThenPrefixName(prefixName1, DESTINATION); NatRuleThenPrefixName thenPrefixName2 = new NatRuleThenPrefixName(prefixName2, DESTINATION); new EqualsTester() .addEqualityGroup(thenPrefixName1, new NatRuleThenPrefixName(prefixName1, DESTINATION)) .addEqualityGroup(thenPrefixName2) .addEqualityGroup(new NatRuleThenPrefixName(prefixName1, SOURCE)) .testEquals(); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof NatRuleThenPrefixName)) { return false; } NatRuleThenPrefixName that = (NatRuleThenPrefixName) o; return _name.equals(that._name) && _ipField == that._ipField; }
NatRuleThenPrefixName implements NatRuleThen, Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof NatRuleThenPrefixName)) { return false; } NatRuleThenPrefixName that = (NatRuleThenPrefixName) o; return _name.equals(that._name) && _ipField == that._ipField; } }
NatRuleThenPrefixName implements NatRuleThen, Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof NatRuleThenPrefixName)) { return false; } NatRuleThenPrefixName that = (NatRuleThenPrefixName) o; return _name.equals(that._name) && _ipField == that._ipField; } NatRuleThenPrefixName(String name, IpField ipField); }
NatRuleThenPrefixName implements NatRuleThen, Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof NatRuleThenPrefixName)) { return false; } NatRuleThenPrefixName that = (NatRuleThenPrefixName) o; return _name.equals(that._name) && _ipField == that._ipField; } NatRuleThenPrefixName(String name, IpField ipField); String getName(); @Override boolean equals(Object o); @Override int hashCode(); @Override List<TransformationStep> toTransformationSteps(
      Nat nat,
      @Nullable Map<String, AddressBookEntry> addressBookEntryMap,
      Ip interfaceIp,
      Warnings warnings); }
NatRuleThenPrefixName implements NatRuleThen, Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof NatRuleThenPrefixName)) { return false; } NatRuleThenPrefixName that = (NatRuleThenPrefixName) o; return _name.equals(that._name) && _ipField == that._ipField; } NatRuleThenPrefixName(String name, IpField ipField); String getName(); @Override boolean equals(Object o); @Override int hashCode(); @Override List<TransformationStep> toTransformationSteps(
      Nat nat,
      @Nullable Map<String, AddressBookEntry> addressBookEntryMap,
      Ip interfaceIp,
      Warnings warnings);  }