@Test public void testVisitCommunityExprsSet() { assertThat( eval( CommunityExprsSet.of( new StandardCommunityHighLowExprs(new LiteralInt(1), new LiteralInt(2)))), equalTo(CommunitySet.of(StandardCommunity.of(1, 2)))); }
@Override public CommunitySet visitCommunityExprsSet( CommunityExprsSet communityExprsSet, CommunityContext arg) { return CommunitySet.of( communityExprsSet.getExprs().stream() .map(expr -> expr.accept(CommunityExprEvaluator.instance(), arg)) .collect(ImmutableSet.toImmutableSet())); }
CommunitySetExprEvaluator implements CommunitySetExprVisitor<CommunitySet, CommunityContext> { @Override public CommunitySet visitCommunityExprsSet( CommunityExprsSet communityExprsSet, CommunityContext arg) { return CommunitySet.of( communityExprsSet.getExprs().stream() .map(expr -> expr.accept(CommunityExprEvaluator.instance(), arg)) .collect(ImmutableSet.toImmutableSet())); } }
CommunitySetExprEvaluator implements CommunitySetExprVisitor<CommunitySet, CommunityContext> { @Override public CommunitySet visitCommunityExprsSet( CommunityExprsSet communityExprsSet, CommunityContext arg) { return CommunitySet.of( communityExprsSet.getExprs().stream() .map(expr -> expr.accept(CommunityExprEvaluator.instance(), arg)) .collect(ImmutableSet.toImmutableSet())); } private  CommunitySetExprEvaluator(); }
CommunitySetExprEvaluator implements CommunitySetExprVisitor<CommunitySet, CommunityContext> { @Override public CommunitySet visitCommunityExprsSet( CommunityExprsSet communityExprsSet, CommunityContext arg) { return CommunitySet.of( communityExprsSet.getExprs().stream() .map(expr -> expr.accept(CommunityExprEvaluator.instance(), arg)) .collect(ImmutableSet.toImmutableSet())); } private  CommunitySetExprEvaluator(); static @Nonnull CommunitySetExprEvaluator instance(); @Override @Nonnull CommunitySet visitInputCommunities(
      InputCommunities inputCommunities, CommunityContext arg); @Override CommunitySet visitCommunityExprsSet(
      CommunityExprsSet communityExprsSet, CommunityContext arg); @Override @Nonnull CommunitySet visitCommunitySetDifference(
      CommunitySetDifference communitySetDifference, CommunityContext arg); @Override @Nonnull CommunitySet visitCommunitySetExprReference(
      CommunitySetExprReference communitySetExprReference, CommunityContext arg); @Override @Nonnull CommunitySet visitCommunitySetReference(
      CommunitySetReference communitySetReference, CommunityContext arg); @Override @Nonnull CommunitySet visitCommunitySetUnion(
      CommunitySetUnion communitySetUnion, CommunityContext arg); @Override @Nonnull CommunitySet visitLiteralCommunitySet(
      LiteralCommunitySet literalCommunitySet, CommunityContext arg); }
CommunitySetExprEvaluator implements CommunitySetExprVisitor<CommunitySet, CommunityContext> { @Override public CommunitySet visitCommunityExprsSet( CommunityExprsSet communityExprsSet, CommunityContext arg) { return CommunitySet.of( communityExprsSet.getExprs().stream() .map(expr -> expr.accept(CommunityExprEvaluator.instance(), arg)) .collect(ImmutableSet.toImmutableSet())); } private  CommunitySetExprEvaluator(); static @Nonnull CommunitySetExprEvaluator instance(); @Override @Nonnull CommunitySet visitInputCommunities(
      InputCommunities inputCommunities, CommunityContext arg); @Override CommunitySet visitCommunityExprsSet(
      CommunityExprsSet communityExprsSet, CommunityContext arg); @Override @Nonnull CommunitySet visitCommunitySetDifference(
      CommunitySetDifference communitySetDifference, CommunityContext arg); @Override @Nonnull CommunitySet visitCommunitySetExprReference(
      CommunitySetExprReference communitySetExprReference, CommunityContext arg); @Override @Nonnull CommunitySet visitCommunitySetReference(
      CommunitySetReference communitySetReference, CommunityContext arg); @Override @Nonnull CommunitySet visitCommunitySetUnion(
      CommunitySetUnion communitySetUnion, CommunityContext arg); @Override @Nonnull CommunitySet visitLiteralCommunitySet(
      LiteralCommunitySet literalCommunitySet, CommunityContext arg);  }