@Test public void testMatchCommunities() { Set<Community> matchingCommunitySetCandidate1 = ImmutableSet.of(StandardCommunity.of(1L), StandardCommunity.of(2L)); Set<Community> matchingCommunitySetCandidate2 = ImmutableSet.of(StandardCommunity.of(1L)); Set<Community> nonMatchingCommunitySetCandidate = ImmutableSet.of(StandardCommunity.of(2L)); LiteralCommunity l = new LiteralCommunity(StandardCommunity.of(1L)); assertThat(l, matchCommunities(null, matchingCommunitySetCandidate1)); assertThat(l, matchCommunities(null, matchingCommunitySetCandidate2)); assertThat(l, not(matchCommunities(null, nonMatchingCommunitySetCandidate))); }
@Override public boolean matchCommunities(Environment environment, Set<Community> communitySetCandidate) { return false; }
EmptyCommunitySetExpr extends CommunitySetExpr { @Override public boolean matchCommunities(Environment environment, Set<Community> communitySetCandidate) { return false; } }
EmptyCommunitySetExpr extends CommunitySetExpr { @Override public boolean matchCommunities(Environment environment, Set<Community> communitySetCandidate) { return false; } private  EmptyCommunitySetExpr(); }
EmptyCommunitySetExpr extends CommunitySetExpr { @Override public boolean matchCommunities(Environment environment, Set<Community> communitySetCandidate) { return false; } private  EmptyCommunitySetExpr(); @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); @Override int hashCode(); @Override boolean matchCommunities(Environment environment, Set<Community> communitySetCandidate); @Override boolean matchCommunity(Environment environment, Community community); @Override boolean reducible(); }
EmptyCommunitySetExpr extends CommunitySetExpr { @Override public boolean matchCommunities(Environment environment, Set<Community> communitySetCandidate) { return false; } private  EmptyCommunitySetExpr(); @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); @Override int hashCode(); @Override boolean matchCommunities(Environment environment, Set<Community> communitySetCandidate); @Override boolean matchCommunity(Environment environment, Community community); @Override boolean reducible(); static final EmptyCommunitySetExpr INSTANCE; }