@Test public void testEquals() { new EqualsTester() .addEqualityGroup(interfaceLocation("1"), interfaceLocation("1")) .addEqualityGroup(interfaceLocation("2")) .addEqualityGroup(zoneLocation("1")) .testEquals(); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof NatPacketLocation)) { return false; } NatPacketLocation that = (NatPacketLocation) o; return Objects.equals(_name, that._name) && _type == that._type; }
NatPacketLocation implements Serializable, Comparable<NatPacketLocation> { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof NatPacketLocation)) { return false; } NatPacketLocation that = (NatPacketLocation) o; return Objects.equals(_name, that._name) && _type == that._type; } }
NatPacketLocation implements Serializable, Comparable<NatPacketLocation> { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof NatPacketLocation)) { return false; } NatPacketLocation that = (NatPacketLocation) o; return Objects.equals(_name, that._name) && _type == that._type; }  }
NatPacketLocation implements Serializable, Comparable<NatPacketLocation> { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof NatPacketLocation)) { return false; } NatPacketLocation that = (NatPacketLocation) o; return Objects.equals(_name, that._name) && _type == that._type; }  static NatPacketLocation interfaceLocation(String name); static NatPacketLocation routingInstanceLocation(String name); static NatPacketLocation zoneLocation(String name); void set(Type type, String name); @Nullable String getName(); @Nullable String getInterface(); @Nullable String getRoutingInstance(); @Nullable String getZone(); void setInterface(@Nullable String interfaceName); void setRoutingInstance(@Nullable String routingInstance); void setZone(@Nullable String zone); Type getType(); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(NatPacketLocation o); }
NatPacketLocation implements Serializable, Comparable<NatPacketLocation> { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof NatPacketLocation)) { return false; } NatPacketLocation that = (NatPacketLocation) o; return Objects.equals(_name, that._name) && _type == that._type; }  static NatPacketLocation interfaceLocation(String name); static NatPacketLocation routingInstanceLocation(String name); static NatPacketLocation zoneLocation(String name); void set(Type type, String name); @Nullable String getName(); @Nullable String getInterface(); @Nullable String getRoutingInstance(); @Nullable String getZone(); void setInterface(@Nullable String interfaceName); void setRoutingInstance(@Nullable String routingInstance); void setZone(@Nullable String zone); Type getType(); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(NatPacketLocation o);  }