@Test public void testEquals() { new EqualsTester() .addEqualityGroup(new Object()) .addEqualityGroup( BgpTopology.EMPTY, BgpTopology.EMPTY, new BgpTopology(ValueGraphBuilder.directed().allowsSelfLoops(false).build())) .addEqualityGroup(nonTrivialTopology()) .testEquals(); }
@Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof BgpTopology)) { return false; } return _graph.equals(((BgpTopology) obj)._graph); }
BgpTopology { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof BgpTopology)) { return false; } return _graph.equals(((BgpTopology) obj)._graph); } }
BgpTopology { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof BgpTopology)) { return false; } return _graph.equals(((BgpTopology) obj)._graph); } BgpTopology(ValueGraph<BgpPeerConfigId, BgpSessionProperties> graph); }
BgpTopology { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof BgpTopology)) { return false; } return _graph.equals(((BgpTopology) obj)._graph); } BgpTopology(ValueGraph<BgpPeerConfigId, BgpSessionProperties> graph); @JsonIgnore @Nonnull ValueGraph<BgpPeerConfigId, BgpSessionProperties> getGraph(); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); }
BgpTopology { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof BgpTopology)) { return false; } return _graph.equals(((BgpTopology) obj)._graph); } BgpTopology(ValueGraph<BgpPeerConfigId, BgpSessionProperties> graph); @JsonIgnore @Nonnull ValueGraph<BgpPeerConfigId, BgpSessionProperties> getGraph(); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); static final BgpTopology EMPTY; }