@Test public void testEquals() { new EqualsTester() .addEqualityGroup( new LiteralCommunitySet( ImmutableSet.of(StandardCommunity.of(1L), StandardCommunity.of(2L))), new LiteralCommunitySet( ImmutableSet.of(StandardCommunity.of(2L), StandardCommunity.of(1L)))) .addEqualityGroup(new LiteralCommunitySet(ImmutableSet.of(StandardCommunity.of(2L)))) .testEquals(); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof LiteralCommunitySet)) { return false; } return _communities.equals(((LiteralCommunitySet) obj)._communities); }
LiteralCommunitySet extends CommunitySetExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof LiteralCommunitySet)) { return false; } return _communities.equals(((LiteralCommunitySet) obj)._communities); } }
LiteralCommunitySet extends CommunitySetExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof LiteralCommunitySet)) { return false; } return _communities.equals(((LiteralCommunitySet) obj)._communities); } LiteralCommunitySet(@Nonnull Collection<? extends Community> communities); }
LiteralCommunitySet extends CommunitySetExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof LiteralCommunitySet)) { return false; } return _communities.equals(((LiteralCommunitySet) obj)._communities); } LiteralCommunitySet(@Nonnull Collection<? extends Community> communities); @Override T accept(CommunitySetExprVisitor<T> visitor); @Override void accept(VoidCommunitySetExprVisitor visitor); @Nonnull @Override Set<Community> asLiteralCommunities(@Nonnull Environment environment); @Override boolean dynamicMatchCommunity(); @Override boolean equals(Object obj); @Nonnull Set<Community> getCommunities(); @Override int hashCode(); @Override boolean matchCommunities(Environment environment, Set<Community> communitySetCandidate); @Override boolean matchCommunity(Environment environment, Community community); @Override boolean reducible(); @Override String toString(); }
LiteralCommunitySet extends CommunitySetExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof LiteralCommunitySet)) { return false; } return _communities.equals(((LiteralCommunitySet) obj)._communities); } LiteralCommunitySet(@Nonnull Collection<? extends Community> communities); @Override T accept(CommunitySetExprVisitor<T> visitor); @Override void accept(VoidCommunitySetExprVisitor visitor); @Nonnull @Override Set<Community> asLiteralCommunities(@Nonnull Environment environment); @Override boolean dynamicMatchCommunity(); @Override boolean equals(Object obj); @Nonnull Set<Community> getCommunities(); @Override int hashCode(); @Override boolean matchCommunities(Environment environment, Set<Community> communitySetCandidate); @Override boolean matchCommunity(Environment environment, Community community); @Override boolean reducible(); @Override String toString();  }