@Test public void testEquals() { new EqualsTester() .addEqualityGroup( new InterfaceWithConnectedIpsSpecifier(Ip.parse("1.2.3.4").toIpSpace()), new InterfaceWithConnectedIpsSpecifier(Ip.parse("1.2.3.4").toIpSpace())) .addEqualityGroup(new InterfaceWithConnectedIpsSpecifier(Ip.parse("1.2.3.5").toIpSpace())) .testEquals(); }
@Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } else if (!(o instanceof InterfaceWithConnectedIpsSpecifier)) { return false; } InterfaceWithConnectedIpsSpecifier other = (InterfaceWithConnectedIpsSpecifier) o; return Objects.equals(_ipSpace, other._ipSpace); }
InterfaceWithConnectedIpsSpecifier implements InterfaceSpecifier { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } else if (!(o instanceof InterfaceWithConnectedIpsSpecifier)) { return false; } InterfaceWithConnectedIpsSpecifier other = (InterfaceWithConnectedIpsSpecifier) o; return Objects.equals(_ipSpace, other._ipSpace); } }
InterfaceWithConnectedIpsSpecifier implements InterfaceSpecifier { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } else if (!(o instanceof InterfaceWithConnectedIpsSpecifier)) { return false; } InterfaceWithConnectedIpsSpecifier other = (InterfaceWithConnectedIpsSpecifier) o; return Objects.equals(_ipSpace, other._ipSpace); } InterfaceWithConnectedIpsSpecifier(@Nonnull IpSpace ipSpace); }
InterfaceWithConnectedIpsSpecifier implements InterfaceSpecifier { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } else if (!(o instanceof InterfaceWithConnectedIpsSpecifier)) { return false; } InterfaceWithConnectedIpsSpecifier other = (InterfaceWithConnectedIpsSpecifier) o; return Objects.equals(_ipSpace, other._ipSpace); } InterfaceWithConnectedIpsSpecifier(@Nonnull IpSpace ipSpace); @Override boolean equals(@Nullable Object o); @Override int hashCode(); @Override Set<NodeInterfacePair> resolve(Set<String> nodes, SpecifierContext ctxt); }
InterfaceWithConnectedIpsSpecifier implements InterfaceSpecifier { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } else if (!(o instanceof InterfaceWithConnectedIpsSpecifier)) { return false; } InterfaceWithConnectedIpsSpecifier other = (InterfaceWithConnectedIpsSpecifier) o; return Objects.equals(_ipSpace, other._ipSpace); } InterfaceWithConnectedIpsSpecifier(@Nonnull IpSpace ipSpace); @Override boolean equals(@Nullable Object o); @Override int hashCode(); @Override Set<NodeInterfacePair> resolve(Set<String> nodes, SpecifierContext ctxt); static final String NAME; }