@Test public void testVisitCommunitySetReference() { String name = "name"; _baseConfig.setCommunitySets( ImmutableMap.of( name, CommunitySet.of(StandardCommunity.parse("20:30"), StandardCommunity.parse("21:30")))); CommunitySetReference csr = new CommunitySetReference(name); BDD result = _communitySetExprToBDD.visitCommunitySetReference(csr, _arg); CommunityVar cvar1 = CommunityVar.from(StandardCommunity.parse("20:30")); CommunityVar cvar2 = CommunityVar.from(StandardCommunity.parse("21:30")); assertEquals(cvarToBDD(cvar1).or(cvarToBDD(cvar2)), result); }
@Override public BDD visitCommunitySetReference(CommunitySetReference communitySetReference, Arg arg) { Set<CommunityVar> commVars = communitySetReference.accept( new CommunitySetExprVarCollector(), arg.getTransferBDD().getConfiguration()); return CommunitySetMatchExprToBDD.communityVarsToBDD(commVars, arg); }
CommunitySetExprToBDD implements CommunitySetExprVisitor<BDD, Arg> { @Override public BDD visitCommunitySetReference(CommunitySetReference communitySetReference, Arg arg) { Set<CommunityVar> commVars = communitySetReference.accept( new CommunitySetExprVarCollector(), arg.getTransferBDD().getConfiguration()); return CommunitySetMatchExprToBDD.communityVarsToBDD(commVars, arg); } }
CommunitySetExprToBDD implements CommunitySetExprVisitor<BDD, Arg> { @Override public BDD visitCommunitySetReference(CommunitySetReference communitySetReference, Arg arg) { Set<CommunityVar> commVars = communitySetReference.accept( new CommunitySetExprVarCollector(), arg.getTransferBDD().getConfiguration()); return CommunitySetMatchExprToBDD.communityVarsToBDD(commVars, arg); }  }
CommunitySetExprToBDD implements CommunitySetExprVisitor<BDD, Arg> { @Override public BDD visitCommunitySetReference(CommunitySetReference communitySetReference, Arg arg) { Set<CommunityVar> commVars = communitySetReference.accept( new CommunitySetExprVarCollector(), arg.getTransferBDD().getConfiguration()); return CommunitySetMatchExprToBDD.communityVarsToBDD(commVars, arg); }  @Override BDD visitCommunityExprsSet(CommunityExprsSet communityExprsSet, Arg arg); @Override BDD visitCommunitySetDifference(CommunitySetDifference communitySetDifference, Arg arg); @Override BDD visitCommunitySetExprReference(
      CommunitySetExprReference communitySetExprReference, Arg arg); @Override BDD visitCommunitySetReference(CommunitySetReference communitySetReference, Arg arg); @Override BDD visitCommunitySetUnion(CommunitySetUnion communitySetUnion, Arg arg); @Override BDD visitInputCommunities(InputCommunities inputCommunities, Arg arg); @Override BDD visitLiteralCommunitySet(LiteralCommunitySet literalCommunitySet, Arg arg); }
CommunitySetExprToBDD implements CommunitySetExprVisitor<BDD, Arg> { @Override public BDD visitCommunitySetReference(CommunitySetReference communitySetReference, Arg arg) { Set<CommunityVar> commVars = communitySetReference.accept( new CommunitySetExprVarCollector(), arg.getTransferBDD().getConfiguration()); return CommunitySetMatchExprToBDD.communityVarsToBDD(commVars, arg); }  @Override BDD visitCommunityExprsSet(CommunityExprsSet communityExprsSet, Arg arg); @Override BDD visitCommunitySetDifference(CommunitySetDifference communitySetDifference, Arg arg); @Override BDD visitCommunitySetExprReference(
      CommunitySetExprReference communitySetExprReference, Arg arg); @Override BDD visitCommunitySetReference(CommunitySetReference communitySetReference, Arg arg); @Override BDD visitCommunitySetUnion(CommunitySetUnion communitySetUnion, Arg arg); @Override BDD visitInputCommunities(InputCommunities inputCommunities, Arg arg); @Override BDD visitLiteralCommunitySet(LiteralCommunitySet literalCommunitySet, Arg arg);  }