@Test public void testEquals() { new EqualsTester() .addEqualityGroup(SET, SET, CommunitySet.empty()) .addEqualityGroup(CommunitySet.of(StandardCommunity.of(1L))) .addEqualityGroup(new Object()) .testEquals(); }
@Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunitySet)) { return false; } CommunitySet other = (CommunitySet) obj; return (_hashCode == other._hashCode || _hashCode == 0 || other._hashCode == 0) && _communities.equals(other._communities); }
CommunitySet implements Serializable { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunitySet)) { return false; } CommunitySet other = (CommunitySet) obj; return (_hashCode == other._hashCode || _hashCode == 0 || other._hashCode == 0) && _communities.equals(other._communities); } }
CommunitySet implements Serializable { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunitySet)) { return false; } CommunitySet other = (CommunitySet) obj; return (_hashCode == other._hashCode || _hashCode == 0 || other._hashCode == 0) && _communities.equals(other._communities); } private  CommunitySet(ImmutableSet<Community> communities); }
CommunitySet implements Serializable { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunitySet)) { return false; } CommunitySet other = (CommunitySet) obj; return (_hashCode == other._hashCode || _hashCode == 0 || other._hashCode == 0) && _communities.equals(other._communities); } private  CommunitySet(ImmutableSet<Community> communities); static @Nonnull CommunitySet empty(); static @Nonnull CommunitySet of(Community... communities); static @Nonnull CommunitySet of(Iterable<? extends Community> communities); static @Nonnull CommunitySet of(Set<? extends Community> communities); @Nonnull Set<Community> getCommunities(); @Nonnull Set<ExtendedCommunity> getExtendedCommunities(); @Nonnull Set<StandardCommunity> getStandardCommunities(); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); @Override @Nonnull String toString(); }
CommunitySet implements Serializable { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof CommunitySet)) { return false; } CommunitySet other = (CommunitySet) obj; return (_hashCode == other._hashCode || _hashCode == 0 || other._hashCode == 0) && _communities.equals(other._communities); } private  CommunitySet(ImmutableSet<Community> communities); static @Nonnull CommunitySet empty(); static @Nonnull CommunitySet of(Community... communities); static @Nonnull CommunitySet of(Iterable<? extends Community> communities); static @Nonnull CommunitySet of(Set<? extends Community> communities); @Nonnull Set<Community> getCommunities(); @Nonnull Set<ExtendedCommunity> getExtendedCommunities(); @Nonnull Set<StandardCommunity> getStandardCommunities(); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); @Override @Nonnull String toString();  }