@Test public void testEquals() { new EqualsTester() .addEqualityGroup( new IpsecPeerConfigId("peer1", "host1"), new IpsecPeerConfigId("peer1", "host1")) .addEqualityGroup(new IpsecPeerConfigId("peer3", "host2")) .addEqualityGroup(new IpsecPeerConfigId("peer3", "host1")) .addEqualityGroup(new IpsecPeerConfigId("peer4", "host1")) .addEqualityGroup(new IpsecPeerConfigId("peer5", "host1")) .testEquals(); }
@Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof IpsecPeerConfigId)) { return false; } IpsecPeerConfigId other = (IpsecPeerConfigId) o; return _ipsecPeerConfigName.equals(other._ipsecPeerConfigName) && _hostName.equals(other._hostName); }
IpsecPeerConfigId { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof IpsecPeerConfigId)) { return false; } IpsecPeerConfigId other = (IpsecPeerConfigId) o; return _ipsecPeerConfigName.equals(other._ipsecPeerConfigName) && _hostName.equals(other._hostName); } }
IpsecPeerConfigId { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof IpsecPeerConfigId)) { return false; } IpsecPeerConfigId other = (IpsecPeerConfigId) o; return _ipsecPeerConfigName.equals(other._ipsecPeerConfigName) && _hostName.equals(other._hostName); } IpsecPeerConfigId(@Nonnull String ipsecPeerConfigName, @Nonnull String hostName); }
IpsecPeerConfigId { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof IpsecPeerConfigId)) { return false; } IpsecPeerConfigId other = (IpsecPeerConfigId) o; return _ipsecPeerConfigName.equals(other._ipsecPeerConfigName) && _hostName.equals(other._hostName); } IpsecPeerConfigId(@Nonnull String ipsecPeerConfigName, @Nonnull String hostName); @Override boolean equals(@Nullable Object o); @Override int hashCode(); @Nonnull String getIpsecPeerConfigName(); @Nonnull String getHostName(); }
IpsecPeerConfigId { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof IpsecPeerConfigId)) { return false; } IpsecPeerConfigId other = (IpsecPeerConfigId) o; return _ipsecPeerConfigName.equals(other._ipsecPeerConfigName) && _hostName.equals(other._hostName); } IpsecPeerConfigId(@Nonnull String ipsecPeerConfigName, @Nonnull String hostName); @Override boolean equals(@Nullable Object o); @Override int hashCode(); @Nonnull String getIpsecPeerConfigName(); @Nonnull String getHostName();  }