@Test public void testEquals() { new EqualsTester() .addEqualityGroup(new Object()) .addEqualityGroup( Layer2Topology.EMPTY, Layer2Topology.EMPTY, Layer2Topology.fromDomains(ImmutableSet.of())) .addEqualityGroup( Layer2Topology.fromDomains( ImmutableSet.of(ImmutableSet.of(new Layer2Node("a", "b", 1))))) .testEquals(); }
@Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof Layer2Topology)) { return false; } return _representativeByNode.equals(((Layer2Topology) obj)._representativeByNode); }
Layer2Topology { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof Layer2Topology)) { return false; } return _representativeByNode.equals(((Layer2Topology) obj)._representativeByNode); } }
Layer2Topology { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof Layer2Topology)) { return false; } return _representativeByNode.equals(((Layer2Topology) obj)._representativeByNode); } private  Layer2Topology(Map<Layer2Node, Layer2Node> representativeByNode); }
Layer2Topology { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof Layer2Topology)) { return false; } return _representativeByNode.equals(((Layer2Topology) obj)._representativeByNode); } private  Layer2Topology(Map<Layer2Node, Layer2Node> representativeByNode); static Builder builder(); static @Nonnull Layer2Topology fromDomains(Collection<Set<Layer2Node>> domains); @Nonnull Optional<Layer2Node> getBroadcastDomainRepresentative(Layer2Node layer2Node); @Nonnull Optional<Layer2Node> getBroadcastDomainRepresentative(
      String hostname, String interfaceName); boolean inSameBroadcastDomain(Layer2Node n1, Layer2Node n2); boolean inSameBroadcastDomain(NodeInterfacePair i1, NodeInterfacePair i2); boolean inSameBroadcastDomain(String host1, String iface1, String host2, String iface2); @JsonIgnore boolean isEmpty(); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); }
Layer2Topology { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof Layer2Topology)) { return false; } return _representativeByNode.equals(((Layer2Topology) obj)._representativeByNode); } private  Layer2Topology(Map<Layer2Node, Layer2Node> representativeByNode); static Builder builder(); static @Nonnull Layer2Topology fromDomains(Collection<Set<Layer2Node>> domains); @Nonnull Optional<Layer2Node> getBroadcastDomainRepresentative(Layer2Node layer2Node); @Nonnull Optional<Layer2Node> getBroadcastDomainRepresentative(
      String hostname, String interfaceName); boolean inSameBroadcastDomain(Layer2Node n1, Layer2Node n2); boolean inSameBroadcastDomain(NodeInterfacePair i1, NodeInterfacePair i2); boolean inSameBroadcastDomain(String host1, String iface1, String host2, String iface2); @JsonIgnore boolean isEmpty(); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); static final Layer2Topology EMPTY; }