@Test public void testToStatements() { RouteMapSetAsPath set = new RouteMapSetAsPath(ImmutableList.of(1L, 2L, 3L)); List<Statement> result = set.toStatements(null, null, null).collect(ImmutableList.toImmutableList()); assertThat( result, contains( new PrependAsPath( new LiteralAsList( ImmutableList.of(new ExplicitAs(1), new ExplicitAs(2), new ExplicitAs(3)))))); }
@Nonnull @Override public Stream<Statement> toStatements(Configuration c, CumulusNodeConfiguration vc, Warnings w) { List<AsExpr> asExprs = _asns.stream().map(ExplicitAs::new).collect(ImmutableList.toImmutableList()); return Stream.of(new PrependAsPath(new LiteralAsList(asExprs))); }
RouteMapSetAsPath implements RouteMapSet { @Nonnull @Override public Stream<Statement> toStatements(Configuration c, CumulusNodeConfiguration vc, Warnings w) { List<AsExpr> asExprs = _asns.stream().map(ExplicitAs::new).collect(ImmutableList.toImmutableList()); return Stream.of(new PrependAsPath(new LiteralAsList(asExprs))); } }
RouteMapSetAsPath implements RouteMapSet { @Nonnull @Override public Stream<Statement> toStatements(Configuration c, CumulusNodeConfiguration vc, Warnings w) { List<AsExpr> asExprs = _asns.stream().map(ExplicitAs::new).collect(ImmutableList.toImmutableList()); return Stream.of(new PrependAsPath(new LiteralAsList(asExprs))); } RouteMapSetAsPath(List<Long> asns); }
RouteMapSetAsPath implements RouteMapSet { @Nonnull @Override public Stream<Statement> toStatements(Configuration c, CumulusNodeConfiguration vc, Warnings w) { List<AsExpr> asExprs = _asns.stream().map(ExplicitAs::new).collect(ImmutableList.toImmutableList()); return Stream.of(new PrependAsPath(new LiteralAsList(asExprs))); } RouteMapSetAsPath(List<Long> asns); @Nonnull @Override Stream<Statement> toStatements(Configuration c, CumulusNodeConfiguration vc, Warnings w); @Nonnull List<Long> getAsns(); }
RouteMapSetAsPath implements RouteMapSet { @Nonnull @Override public Stream<Statement> toStatements(Configuration c, CumulusNodeConfiguration vc, Warnings w) { List<AsExpr> asExprs = _asns.stream().map(ExplicitAs::new).collect(ImmutableList.toImmutableList()); return Stream.of(new PrependAsPath(new LiteralAsList(asExprs))); } RouteMapSetAsPath(List<Long> asns); @Nonnull @Override Stream<Statement> toStatements(Configuration c, CumulusNodeConfiguration vc, Warnings w); @Nonnull List<Long> getAsns();  }