@Test public void testEquals() { new EqualsTester() .addEqualityGroup(OBJ, OBJ, new ConcreteUnicastAddressIp(Ip.ZERO)) .addEqualityGroup(new Object()) .addEqualityGroup(new ConcreteUnicastAddressIp(Ip.MAX)) .testEquals(); }
@Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof ConcreteUnicastAddressIp)) { return false; } return _ip.equals(((ConcreteUnicastAddressIp) obj)._ip); }
ConcreteUnicastAddressIp implements UnicastAddressIp { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof ConcreteUnicastAddressIp)) { return false; } return _ip.equals(((ConcreteUnicastAddressIp) obj)._ip); } }
ConcreteUnicastAddressIp implements UnicastAddressIp { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof ConcreteUnicastAddressIp)) { return false; } return _ip.equals(((ConcreteUnicastAddressIp) obj)._ip); } ConcreteUnicastAddressIp(Ip ip); }
ConcreteUnicastAddressIp implements UnicastAddressIp { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof ConcreteUnicastAddressIp)) { return false; } return _ip.equals(((ConcreteUnicastAddressIp) obj)._ip); } ConcreteUnicastAddressIp(Ip ip); @Nonnull Ip getIp(); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); }
ConcreteUnicastAddressIp implements UnicastAddressIp { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof ConcreteUnicastAddressIp)) { return false; } return _ip.equals(((ConcreteUnicastAddressIp) obj)._ip); } ConcreteUnicastAddressIp(Ip ip); @Nonnull Ip getIp(); @Override boolean equals(@Nullable Object obj); @Override int hashCode();  }