@Test public void testRegexCommunitySet() { RegexCommunitySet rcs = new RegexCommunitySet("^20:"); Set<CommunityVar> result = CommunityVarCollector.collectCommunityVars(_baseConfig, rcs); Set<CommunityVar> expected = ImmutableSet.of(CommunityVar.from("^20:")); assertEquals(expected, result); }
public static @Nonnull Set<CommunityVar> collectCommunityVars( @Nonnull Configuration configuration, @Nonnull CommunitySetExpr communitySetExpr) { CommunityVarCollector visitor = new CommunityVarCollector(configuration); communitySetExpr.accept(visitor); return visitor._builder.build(); }
CommunityVarCollector implements VoidCommunitySetExprVisitor { public static @Nonnull Set<CommunityVar> collectCommunityVars( @Nonnull Configuration configuration, @Nonnull CommunitySetExpr communitySetExpr) { CommunityVarCollector visitor = new CommunityVarCollector(configuration); communitySetExpr.accept(visitor); return visitor._builder.build(); } }
CommunityVarCollector implements VoidCommunitySetExprVisitor { public static @Nonnull Set<CommunityVar> collectCommunityVars( @Nonnull Configuration configuration, @Nonnull CommunitySetExpr communitySetExpr) { CommunityVarCollector visitor = new CommunityVarCollector(configuration); communitySetExpr.accept(visitor); return visitor._builder.build(); } private  CommunityVarCollector(@Nonnull Configuration configuration); }
CommunityVarCollector implements VoidCommunitySetExprVisitor { public static @Nonnull Set<CommunityVar> collectCommunityVars( @Nonnull Configuration configuration, @Nonnull CommunitySetExpr communitySetExpr) { CommunityVarCollector visitor = new CommunityVarCollector(configuration); communitySetExpr.accept(visitor); return visitor._builder.build(); } private  CommunityVarCollector(@Nonnull Configuration configuration); static @Nonnull Set<CommunityVar> collectCommunityVars(
      @Nonnull Configuration configuration, @Nonnull CommunitySetExpr communitySetExpr); @Override void visitCommunityHalvesExpr(CommunityHalvesExpr communityHalvesExpr); @Override void visitCommunityList(CommunityList communityList); @Override void visitEmptyCommunitySetExpr(EmptyCommunitySetExpr emptyCommunitySetExpr); @Override void visitLiteralCommunity(LiteralCommunity literalCommunity); @Override void visitLiteralCommunityConjunction(
      LiteralCommunityConjunction literalCommunityConjunction); @Override void visitLiteralCommunitySet(LiteralCommunitySet literalCommunitySet); @Override void visitNamedCommunitySet(NamedCommunitySet namedCommunitySet); @Override void visitRegexCommunitySet(RegexCommunitySet regexCommunitySet); }
CommunityVarCollector implements VoidCommunitySetExprVisitor { public static @Nonnull Set<CommunityVar> collectCommunityVars( @Nonnull Configuration configuration, @Nonnull CommunitySetExpr communitySetExpr) { CommunityVarCollector visitor = new CommunityVarCollector(configuration); communitySetExpr.accept(visitor); return visitor._builder.build(); } private  CommunityVarCollector(@Nonnull Configuration configuration); static @Nonnull Set<CommunityVar> collectCommunityVars(
      @Nonnull Configuration configuration, @Nonnull CommunitySetExpr communitySetExpr); @Override void visitCommunityHalvesExpr(CommunityHalvesExpr communityHalvesExpr); @Override void visitCommunityList(CommunityList communityList); @Override void visitEmptyCommunitySetExpr(EmptyCommunitySetExpr emptyCommunitySetExpr); @Override void visitLiteralCommunity(LiteralCommunity literalCommunity); @Override void visitLiteralCommunityConjunction(
      LiteralCommunityConjunction literalCommunityConjunction); @Override void visitLiteralCommunitySet(LiteralCommunitySet literalCommunitySet); @Override void visitNamedCommunitySet(NamedCommunitySet namedCommunitySet); @Override void visitRegexCommunitySet(RegexCommunitySet regexCommunitySet);  }