@Test public void testEquals() { Builder builder = TunnelConfiguration.builder() .setDestinationAddress(Ip.parse("1.1.1.1")) .setSourceAddress(Ip.parse("2.2.2.2")); TunnelConfiguration tc = builder.build(); new EqualsTester() .addEqualityGroup(tc, tc, builder.build()) .addEqualityGroup(builder.setDestinationAddress(Ip.parse("3.3.3.3")).build()) .addEqualityGroup(builder.setSourceAddress(Ip.parse("4.4.4.4"))) .addEqualityGroup(new Object()) .testEquals(); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof TunnelConfiguration)) { return false; } TunnelConfiguration that = (TunnelConfiguration) o; return _sourceAddress.equals(that._sourceAddress) && _destinationAddress.equals(that._destinationAddress); }
TunnelConfiguration implements Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof TunnelConfiguration)) { return false; } TunnelConfiguration that = (TunnelConfiguration) o; return _sourceAddress.equals(that._sourceAddress) && _destinationAddress.equals(that._destinationAddress); } }
TunnelConfiguration implements Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof TunnelConfiguration)) { return false; } TunnelConfiguration that = (TunnelConfiguration) o; return _sourceAddress.equals(that._sourceAddress) && _destinationAddress.equals(that._destinationAddress); } private  TunnelConfiguration(Ip sourceAddress, Ip destinationAddress); }
TunnelConfiguration implements Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof TunnelConfiguration)) { return false; } TunnelConfiguration that = (TunnelConfiguration) o; return _sourceAddress.equals(that._sourceAddress) && _destinationAddress.equals(that._destinationAddress); } private  TunnelConfiguration(Ip sourceAddress, Ip destinationAddress); @JsonProperty(PROP_SOURCE_ADDRESS) @Nonnull Ip getSourceAddress(); @JsonProperty(PROP_DESTINATION_ADDRESS) @Nonnull Ip getDestinationAddress(); @Override boolean equals(Object o); @Override int hashCode(); static Builder builder(); }
TunnelConfiguration implements Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof TunnelConfiguration)) { return false; } TunnelConfiguration that = (TunnelConfiguration) o; return _sourceAddress.equals(that._sourceAddress) && _destinationAddress.equals(that._destinationAddress); } private  TunnelConfiguration(Ip sourceAddress, Ip destinationAddress); @JsonProperty(PROP_SOURCE_ADDRESS) @Nonnull Ip getSourceAddress(); @JsonProperty(PROP_DESTINATION_ADDRESS) @Nonnull Ip getDestinationAddress(); @Override boolean equals(Object o); @Override int hashCode(); static Builder builder();  }