@Test public void testEquals() { BgpNeighborSourceAddress bgpNeighborSourceAddress = new BgpNeighborSourceAddress(Ip.parse("1.1.1.1")); new EqualsTester() .addEqualityGroup( bgpNeighborSourceAddress, new BgpNeighborSourceAddress(Ip.parse("1.1.1.1"))) .addEqualityGroup(new BgpNeighborSourceAddress(Ip.parse("3.3.3.3"))) .testEquals(); }
@Override public boolean equals(Object o) { if (o == this) { return true; } else if (!(o instanceof BgpNeighborSourceAddress)) { return false; } BgpNeighborSourceAddress other = (BgpNeighborSourceAddress) o; return _address.equals(other._address); }
BgpNeighborSourceAddress implements BgpNeighborSource { @Override public boolean equals(Object o) { if (o == this) { return true; } else if (!(o instanceof BgpNeighborSourceAddress)) { return false; } BgpNeighborSourceAddress other = (BgpNeighborSourceAddress) o; return _address.equals(other._address); } }
BgpNeighborSourceAddress implements BgpNeighborSource { @Override public boolean equals(Object o) { if (o == this) { return true; } else if (!(o instanceof BgpNeighborSourceAddress)) { return false; } BgpNeighborSourceAddress other = (BgpNeighborSourceAddress) o; return _address.equals(other._address); } BgpNeighborSourceAddress(Ip address); }
BgpNeighborSourceAddress implements BgpNeighborSource { @Override public boolean equals(Object o) { if (o == this) { return true; } else if (!(o instanceof BgpNeighborSourceAddress)) { return false; } BgpNeighborSourceAddress other = (BgpNeighborSourceAddress) o; return _address.equals(other._address); } BgpNeighborSourceAddress(Ip address); @Nonnull Ip getAddress(); @Override T accept(BgpNeighborSourceVisitor<T> visitor); @Override boolean equals(Object o); @Override int hashCode(); }
BgpNeighborSourceAddress implements BgpNeighborSource { @Override public boolean equals(Object o) { if (o == this) { return true; } else if (!(o instanceof BgpNeighborSourceAddress)) { return false; } BgpNeighborSourceAddress other = (BgpNeighborSourceAddress) o; return _address.equals(other._address); } BgpNeighborSourceAddress(Ip address); @Nonnull Ip getAddress(); @Override T accept(BgpNeighborSourceVisitor<T> visitor); @Override boolean equals(Object o); @Override int hashCode();  }