@Test public void testVisitCommunityExprsSet() { CommunityExprsSet ces = CommunityExprsSet.of( new StandardCommunityHighLowExprs(new LiteralInt(20), new LiteralInt(30)), new StandardCommunityHighLowExprs(new LiteralInt(21), new LiteralInt(30))); CommunityVar cvar1 = CommunityVar.from(StandardCommunity.parse("20:30")); CommunityVar cvar2 = CommunityVar.from(StandardCommunity.parse("21:30")); Set<CommunityVar> result = _varCollector.visitCommunityExprsSet(ces, _baseConfig); assertEquals(ImmutableSet.of(cvar1, cvar2), result); }
@Override public Set<CommunityVar> visitCommunityExprsSet( CommunityExprsSet communityExprsSet, Configuration arg) { return communityExprsSet.accept(new CommunitySetExprVarCollector(), arg); }
SetCommunitiesVarCollector implements CommunitySetExprVisitor<Set<CommunityVar>, Configuration> { @Override public Set<CommunityVar> visitCommunityExprsSet( CommunityExprsSet communityExprsSet, Configuration arg) { return communityExprsSet.accept(new CommunitySetExprVarCollector(), arg); } }
SetCommunitiesVarCollector implements CommunitySetExprVisitor<Set<CommunityVar>, Configuration> { @Override public Set<CommunityVar> visitCommunityExprsSet( CommunityExprsSet communityExprsSet, Configuration arg) { return communityExprsSet.accept(new CommunitySetExprVarCollector(), arg); }  }
SetCommunitiesVarCollector implements CommunitySetExprVisitor<Set<CommunityVar>, Configuration> { @Override public Set<CommunityVar> visitCommunityExprsSet( CommunityExprsSet communityExprsSet, Configuration arg) { return communityExprsSet.accept(new CommunitySetExprVarCollector(), arg); }  @Override Set<CommunityVar> visitCommunityExprsSet(
      CommunityExprsSet communityExprsSet, Configuration arg); @Override Set<CommunityVar> visitCommunitySetDifference(
      CommunitySetDifference communitySetDifference, Configuration arg); @Override Set<CommunityVar> visitCommunitySetExprReference(
      CommunitySetExprReference communitySetExprReference, Configuration arg); @Override Set<CommunityVar> visitCommunitySetReference(
      CommunitySetReference communitySetReference, Configuration arg); @Override Set<CommunityVar> visitCommunitySetUnion(
      CommunitySetUnion communitySetUnion, Configuration arg); @Override Set<CommunityVar> visitInputCommunities(
      InputCommunities inputCommunities, Configuration arg); @Override Set<CommunityVar> visitLiteralCommunitySet(
      LiteralCommunitySet literalCommunitySet, Configuration arg); }
SetCommunitiesVarCollector implements CommunitySetExprVisitor<Set<CommunityVar>, Configuration> { @Override public Set<CommunityVar> visitCommunityExprsSet( CommunityExprsSet communityExprsSet, Configuration arg) { return communityExprsSet.accept(new CommunitySetExprVarCollector(), arg); }  @Override Set<CommunityVar> visitCommunityExprsSet(
      CommunityExprsSet communityExprsSet, Configuration arg); @Override Set<CommunityVar> visitCommunitySetDifference(
      CommunitySetDifference communitySetDifference, Configuration arg); @Override Set<CommunityVar> visitCommunitySetExprReference(
      CommunitySetExprReference communitySetExprReference, Configuration arg); @Override Set<CommunityVar> visitCommunitySetReference(
      CommunitySetReference communitySetReference, Configuration arg); @Override Set<CommunityVar> visitCommunitySetUnion(
      CommunitySetUnion communitySetUnion, Configuration arg); @Override Set<CommunityVar> visitInputCommunities(
      InputCommunities inputCommunities, Configuration arg); @Override Set<CommunityVar> visitLiteralCommunitySet(
      LiteralCommunitySet literalCommunitySet, Configuration arg);  }