@Test public void testVisitRouteTargetExtendedCommunityExpr() { { RouteTargetExtendedCommunityExpr expr = new RouteTargetExtendedCommunityExpr(new LiteralLong(1L), new LiteralInt(1)); assertThat(expr.accept(instance(), CTX), equalTo(ExtendedCommunity.target(1L, 1))); } { RouteTargetExtendedCommunityExpr expr = new RouteTargetExtendedCommunityExpr(new LiteralLong(1000000L), new LiteralInt(1)); assertThat(expr.accept(instance(), CTX), equalTo(ExtendedCommunity.target(1000000L, 1))); } }
@Override public Community visitRouteTargetExtendedCommunityExpr( RouteTargetExtendedCommunityExpr routeTargetExtendedCommunityExpr, CommunityContext arg) { long ga = routeTargetExtendedCommunityExpr.getGaExpr().accept(LongExprEvaluator.instance(), null); int la = routeTargetExtendedCommunityExpr.getLaExpr().accept(IntExprEvaluator.instance(), null); return ExtendedCommunity.target(ga, la); }
CommunityExprEvaluator implements CommunityExprVisitor<Community, CommunityContext> { @Override public Community visitRouteTargetExtendedCommunityExpr( RouteTargetExtendedCommunityExpr routeTargetExtendedCommunityExpr, CommunityContext arg) { long ga = routeTargetExtendedCommunityExpr.getGaExpr().accept(LongExprEvaluator.instance(), null); int la = routeTargetExtendedCommunityExpr.getLaExpr().accept(IntExprEvaluator.instance(), null); return ExtendedCommunity.target(ga, la); } }
CommunityExprEvaluator implements CommunityExprVisitor<Community, CommunityContext> { @Override public Community visitRouteTargetExtendedCommunityExpr( RouteTargetExtendedCommunityExpr routeTargetExtendedCommunityExpr, CommunityContext arg) { long ga = routeTargetExtendedCommunityExpr.getGaExpr().accept(LongExprEvaluator.instance(), null); int la = routeTargetExtendedCommunityExpr.getLaExpr().accept(IntExprEvaluator.instance(), null); return ExtendedCommunity.target(ga, la); } private  CommunityExprEvaluator(); }
CommunityExprEvaluator implements CommunityExprVisitor<Community, CommunityContext> { @Override public Community visitRouteTargetExtendedCommunityExpr( RouteTargetExtendedCommunityExpr routeTargetExtendedCommunityExpr, CommunityContext arg) { long ga = routeTargetExtendedCommunityExpr.getGaExpr().accept(LongExprEvaluator.instance(), null); int la = routeTargetExtendedCommunityExpr.getLaExpr().accept(IntExprEvaluator.instance(), null); return ExtendedCommunity.target(ga, la); } 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 visitRouteTargetExtendedCommunityExpr( RouteTargetExtendedCommunityExpr routeTargetExtendedCommunityExpr, CommunityContext arg) { long ga = routeTargetExtendedCommunityExpr.getGaExpr().accept(LongExprEvaluator.instance(), null); int la = routeTargetExtendedCommunityExpr.getLaExpr().accept(IntExprEvaluator.instance(), null); return ExtendedCommunity.target(ga, la); } private  CommunityExprEvaluator(); static @Nonnull CommunityExprEvaluator instance(); @Override Community visitRouteTargetExtendedCommunityExpr(
      RouteTargetExtendedCommunityExpr routeTargetExtendedCommunityExpr, CommunityContext arg); @Override Community visitStandardCommunityHighLowExprs(
      StandardCommunityHighLowExprs standardCommunityHighLowExprs, CommunityContext arg);  }