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