@Test public void testVisitStandardCommunityHighLowExprs() { StandardCommunityHighLowExprs expr = new StandardCommunityHighLowExprs(new LiteralInt(1), new LiteralInt(2)); assertThat(expr.accept(instance(), CTX), equalTo(StandardCommunity.of(1, 2))); }
@Override public Community visitStandardCommunityHighLowExprs( StandardCommunityHighLowExprs standardCommunityHighLowExprs, CommunityContext arg) { int high = standardCommunityHighLowExprs.getHighExpr().accept(IntExprEvaluator.instance(), null); int low = standardCommunityHighLowExprs.getLowExpr().accept(IntExprEvaluator.instance(), null); return StandardCommunity.of(high, low); }
CommunityExprEvaluator implements CommunityExprVisitor<Community, CommunityContext> { @Override public Community visitStandardCommunityHighLowExprs( StandardCommunityHighLowExprs standardCommunityHighLowExprs, CommunityContext arg) { int high = standardCommunityHighLowExprs.getHighExpr().accept(IntExprEvaluator.instance(), null); int low = standardCommunityHighLowExprs.getLowExpr().accept(IntExprEvaluator.instance(), null); return StandardCommunity.of(high, low); } }
CommunityExprEvaluator implements CommunityExprVisitor<Community, CommunityContext> { @Override public Community visitStandardCommunityHighLowExprs( StandardCommunityHighLowExprs standardCommunityHighLowExprs, CommunityContext arg) { int high = standardCommunityHighLowExprs.getHighExpr().accept(IntExprEvaluator.instance(), null); int low = standardCommunityHighLowExprs.getLowExpr().accept(IntExprEvaluator.instance(), null); return StandardCommunity.of(high, low); } private  CommunityExprEvaluator(); }
CommunityExprEvaluator implements CommunityExprVisitor<Community, CommunityContext> { @Override public Community visitStandardCommunityHighLowExprs( StandardCommunityHighLowExprs standardCommunityHighLowExprs, CommunityContext arg) { int high = standardCommunityHighLowExprs.getHighExpr().accept(IntExprEvaluator.instance(), null); int low = standardCommunityHighLowExprs.getLowExpr().accept(IntExprEvaluator.instance(), null); return StandardCommunity.of(high, low); } private  CommunityExprEvaluator(); static @Nonnull CommunityExprEvaluator instance(); @Override Community visitRouteTargetExtendedCommunityExpr(
      RouteTargetExtendedCommunityExpr routeTargetExtendedCommunityExpr, CommunityContext arg); @Override Community visitStandardCommunityHighLowExprs(
      StandardCommunityHighLowExprs standardCommunityHighLowExprs, CommunityContext arg); }
CommunityExprEvaluator implements CommunityExprVisitor<Community, CommunityContext> { @Override public Community visitStandardCommunityHighLowExprs( StandardCommunityHighLowExprs standardCommunityHighLowExprs, CommunityContext arg) { int high = standardCommunityHighLowExprs.getHighExpr().accept(IntExprEvaluator.instance(), null); int low = standardCommunityHighLowExprs.getLowExpr().accept(IntExprEvaluator.instance(), null); return StandardCommunity.of(high, low); } private  CommunityExprEvaluator(); static @Nonnull CommunityExprEvaluator instance(); @Override Community visitRouteTargetExtendedCommunityExpr(
      RouteTargetExtendedCommunityExpr routeTargetExtendedCommunityExpr, CommunityContext arg); @Override Community visitStandardCommunityHighLowExprs(
      StandardCommunityHighLowExprs standardCommunityHighLowExprs, CommunityContext arg);  }