@Test public void testEquals() { Prefix prefix1 = Prefix.parse("1.1.1.1/24"); Prefix prefix2 = Prefix.parse("2.1.1.1/24"); NatRuleThenPrefix thenPrefix1 = new NatRuleThenPrefix(prefix1, DESTINATION); new EqualsTester() .addEqualityGroup(thenPrefix1, new NatRuleThenPrefix(prefix1, DESTINATION)) .addEqualityGroup(new NatRuleThenPrefix(prefix2, DESTINATION)) .addEqualityGroup(new NatRuleThenPrefix(prefix1, SOURCE)) .testEquals(); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof NatRuleThenPrefix)) { return false; } NatRuleThenPrefix that = (NatRuleThenPrefix) o; return Objects.equals(_prefix, that._prefix) && _ipField == that._ipField; }
NatRuleThenPrefix implements NatRuleThen, Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof NatRuleThenPrefix)) { return false; } NatRuleThenPrefix that = (NatRuleThenPrefix) o; return Objects.equals(_prefix, that._prefix) && _ipField == that._ipField; } }
NatRuleThenPrefix implements NatRuleThen, Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof NatRuleThenPrefix)) { return false; } NatRuleThenPrefix that = (NatRuleThenPrefix) o; return Objects.equals(_prefix, that._prefix) && _ipField == that._ipField; } NatRuleThenPrefix(Prefix prefix, IpField ipField); }
NatRuleThenPrefix implements NatRuleThen, Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof NatRuleThenPrefix)) { return false; } NatRuleThenPrefix that = (NatRuleThenPrefix) o; return Objects.equals(_prefix, that._prefix) && _ipField == that._ipField; } NatRuleThenPrefix(Prefix prefix, IpField ipField); Prefix getPrefix(); @Override boolean equals(Object o); @Override int hashCode(); @Override List<TransformationStep> toTransformationSteps(
      Nat nat,
      @Nullable Map<String, AddressBookEntry> addressBookEntryMap,
      Ip interfaceIp,
      Warnings warnings); }
NatRuleThenPrefix implements NatRuleThen, Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof NatRuleThenPrefix)) { return false; } NatRuleThenPrefix that = (NatRuleThenPrefix) o; return Objects.equals(_prefix, that._prefix) && _ipField == that._ipField; } NatRuleThenPrefix(Prefix prefix, IpField ipField); Prefix getPrefix(); @Override boolean equals(Object o); @Override int hashCode(); @Override List<TransformationStep> toTransformationSteps(
      Nat nat,
      @Nullable Map<String, AddressBookEntry> addressBookEntryMap,
      Ip interfaceIp,
      Warnings warnings);  }