@Test public void testVisitDisjunction() { Disjunction d = new Disjunction( ImmutableList.of( new MatchCommunitySet(new LiteralCommunity(COMM1)), new MatchCommunitySet(new LiteralCommunity(COMM2)))); Set<CommunityVar> result = _varCollector.visitDisjunction(d, _baseConfig); Set<CommunityVar> expected = ImmutableSet.of(CommunityVar.from(COMM1), CommunityVar.from(COMM2)); assertEquals(expected, result); }
@Override public Set<CommunityVar> visitDisjunction(Disjunction disjunction, Configuration arg) { return visitAll(disjunction.getDisjuncts(), arg); }
BooleanExprVarCollector implements BooleanExprVisitor<Set<CommunityVar>, Configuration> { @Override public Set<CommunityVar> visitDisjunction(Disjunction disjunction, Configuration arg) { return visitAll(disjunction.getDisjuncts(), arg); } }
BooleanExprVarCollector implements BooleanExprVisitor<Set<CommunityVar>, Configuration> { @Override public Set<CommunityVar> visitDisjunction(Disjunction disjunction, Configuration arg) { return visitAll(disjunction.getDisjuncts(), arg); }  }
BooleanExprVarCollector implements BooleanExprVisitor<Set<CommunityVar>, Configuration> { @Override public Set<CommunityVar> visitDisjunction(Disjunction disjunction, Configuration arg) { return visitAll(disjunction.getDisjuncts(), arg); }  @Override Set<CommunityVar> visitBooleanExprs(
      StaticBooleanExpr staticBooleanExpr, Configuration arg); @Override Set<CommunityVar> visitCallExpr(CallExpr callExpr, Configuration arg); @Override Set<CommunityVar> visitConjunction(Conjunction conjunction, Configuration arg); @Override Set<CommunityVar> visitConjunctionChain(
      ConjunctionChain conjunctionChain, Configuration arg); @Override Set<CommunityVar> visitDisjunction(Disjunction disjunction, Configuration arg); @Override Set<CommunityVar> visitFirstMatchChain(
      FirstMatchChain firstMatchChain, Configuration arg); @Override Set<CommunityVar> visitHasRoute(HasRoute hasRoute, Configuration arg); @Override Set<CommunityVar> visitHasRoute6(HasRoute6 hasRoute6, Configuration arg); @Override Set<CommunityVar> visitMatchAsPath(MatchAsPath matchAsPath, Configuration arg); @Override Set<CommunityVar> visitMatchColor(MatchColor matchColor, Configuration arg); @Override Set<CommunityVar> visitMatchCommunities(
      MatchCommunities matchCommunities, Configuration arg); @Override Set<CommunityVar> visitMatchCommunitySet(
      MatchCommunitySet matchCommunitySet, Configuration arg); @Override Set<CommunityVar> visitMatchIp6AccessList(
      MatchIp6AccessList matchIp6AccessList, Configuration arg); @Override Set<CommunityVar> visitMatchIpv4(MatchIpv4 matchIpv4, Configuration arg); @Override Set<CommunityVar> visitMatchIpv6(MatchIpv6 matchIpv6, Configuration arg); @Override Set<CommunityVar> visitMatchLocalPreference(
      MatchLocalPreference matchLocalPreference, Configuration arg); @Override Set<CommunityVar> visitMatchLocalRouteSourcePrefixLength(
      MatchLocalRouteSourcePrefixLength matchLocalRouteSourcePrefixLength, Configuration arg); @Override Set<CommunityVar> visitMatchMetric(MatchMetric matchMetric, Configuration arg); @Override Set<CommunityVar> visitMatchPrefix6Set(
      MatchPrefix6Set matchPrefix6Set, Configuration arg); @Override Set<CommunityVar> visitMatchPrefixSet(MatchPrefixSet matchPrefixSet, Configuration arg); @Override Set<CommunityVar> visitMatchProcessAsn(
      MatchProcessAsn matchProcessAsn, Configuration arg); @Override Set<CommunityVar> visitMatchProtocol(MatchProtocol matchProtocol, Configuration arg); @Override Set<CommunityVar> visitMatchRouteType(MatchRouteType matchRouteType, Configuration arg); @Override Set<CommunityVar> visitMatchSourceVrf(MatchSourceVrf matchSourceVrf, Configuration arg); @Override Set<CommunityVar> visitMatchTag(MatchTag matchTag, Configuration arg); @Override Set<CommunityVar> visitNeighborIsAsPath(
      NeighborIsAsPath neighborIsAsPath, Configuration arg); @Override Set<CommunityVar> visitNot(Not not, Configuration arg); @Override Set<CommunityVar> visitOriginatesFromAsPath(
      OriginatesFromAsPath originatesFromAsPath, Configuration arg); @Override Set<CommunityVar> visitPassesThroughAsPath(
      PassesThroughAsPath passesThroughAsPath, Configuration arg); @Override Set<CommunityVar> visitRouteIsClassful(
      RouteIsClassful routeIsClassful, Configuration arg); @Override Set<CommunityVar> visitWithEnvironmentExpr(
      WithEnvironmentExpr withEnvironmentExpr, Configuration arg); }
BooleanExprVarCollector implements BooleanExprVisitor<Set<CommunityVar>, Configuration> { @Override public Set<CommunityVar> visitDisjunction(Disjunction disjunction, Configuration arg) { return visitAll(disjunction.getDisjuncts(), arg); }  @Override Set<CommunityVar> visitBooleanExprs(
      StaticBooleanExpr staticBooleanExpr, Configuration arg); @Override Set<CommunityVar> visitCallExpr(CallExpr callExpr, Configuration arg); @Override Set<CommunityVar> visitConjunction(Conjunction conjunction, Configuration arg); @Override Set<CommunityVar> visitConjunctionChain(
      ConjunctionChain conjunctionChain, Configuration arg); @Override Set<CommunityVar> visitDisjunction(Disjunction disjunction, Configuration arg); @Override Set<CommunityVar> visitFirstMatchChain(
      FirstMatchChain firstMatchChain, Configuration arg); @Override Set<CommunityVar> visitHasRoute(HasRoute hasRoute, Configuration arg); @Override Set<CommunityVar> visitHasRoute6(HasRoute6 hasRoute6, Configuration arg); @Override Set<CommunityVar> visitMatchAsPath(MatchAsPath matchAsPath, Configuration arg); @Override Set<CommunityVar> visitMatchColor(MatchColor matchColor, Configuration arg); @Override Set<CommunityVar> visitMatchCommunities(
      MatchCommunities matchCommunities, Configuration arg); @Override Set<CommunityVar> visitMatchCommunitySet(
      MatchCommunitySet matchCommunitySet, Configuration arg); @Override Set<CommunityVar> visitMatchIp6AccessList(
      MatchIp6AccessList matchIp6AccessList, Configuration arg); @Override Set<CommunityVar> visitMatchIpv4(MatchIpv4 matchIpv4, Configuration arg); @Override Set<CommunityVar> visitMatchIpv6(MatchIpv6 matchIpv6, Configuration arg); @Override Set<CommunityVar> visitMatchLocalPreference(
      MatchLocalPreference matchLocalPreference, Configuration arg); @Override Set<CommunityVar> visitMatchLocalRouteSourcePrefixLength(
      MatchLocalRouteSourcePrefixLength matchLocalRouteSourcePrefixLength, Configuration arg); @Override Set<CommunityVar> visitMatchMetric(MatchMetric matchMetric, Configuration arg); @Override Set<CommunityVar> visitMatchPrefix6Set(
      MatchPrefix6Set matchPrefix6Set, Configuration arg); @Override Set<CommunityVar> visitMatchPrefixSet(MatchPrefixSet matchPrefixSet, Configuration arg); @Override Set<CommunityVar> visitMatchProcessAsn(
      MatchProcessAsn matchProcessAsn, Configuration arg); @Override Set<CommunityVar> visitMatchProtocol(MatchProtocol matchProtocol, Configuration arg); @Override Set<CommunityVar> visitMatchRouteType(MatchRouteType matchRouteType, Configuration arg); @Override Set<CommunityVar> visitMatchSourceVrf(MatchSourceVrf matchSourceVrf, Configuration arg); @Override Set<CommunityVar> visitMatchTag(MatchTag matchTag, Configuration arg); @Override Set<CommunityVar> visitNeighborIsAsPath(
      NeighborIsAsPath neighborIsAsPath, Configuration arg); @Override Set<CommunityVar> visitNot(Not not, Configuration arg); @Override Set<CommunityVar> visitOriginatesFromAsPath(
      OriginatesFromAsPath originatesFromAsPath, Configuration arg); @Override Set<CommunityVar> visitPassesThroughAsPath(
      PassesThroughAsPath passesThroughAsPath, Configuration arg); @Override Set<CommunityVar> visitRouteIsClassful(
      RouteIsClassful routeIsClassful, Configuration arg); @Override Set<CommunityVar> visitWithEnvironmentExpr(
      WithEnvironmentExpr withEnvironmentExpr, Configuration arg);  }