@Test public void testAsnValue() { Configuration c = new NetworkFactory() .configurationBuilder() .setConfigurationFormat(ConfigurationFormat.CISCO_IOS) .build(); Environment e = Environment.builder(c) .setBgpSessionProperties( BgpSessionProperties.builder() .setHeadIp(Ip.ZERO) .setHeadAs(3) .setTailIp(Ip.ZERO) .setTailAs(4) .build()) .build(); assertThat(AsnValue.of(LocalAs.instance()).evaluate(e), equalTo(3L)); assertThat(AsnValue.of(RemoteAs.instance()).evaluate(e), equalTo(4L)); }
private AsnValue(@Nonnull AsExpr asExpr) { _asExpr = asExpr; }
AsnValue extends LongExpr { private AsnValue(@Nonnull AsExpr asExpr) { _asExpr = asExpr; } }
AsnValue extends LongExpr { private AsnValue(@Nonnull AsExpr asExpr) { _asExpr = asExpr; } private  AsnValue(@Nonnull AsExpr asExpr); }
AsnValue extends LongExpr { private AsnValue(@Nonnull AsExpr asExpr) { _asExpr = asExpr; } private  AsnValue(@Nonnull AsExpr asExpr); static AsnValue of(@Nonnull AsExpr asExpr); @Override T accept(LongExprVisitor<T, U> visitor, U arg); @Override long evaluate(Environment environment); @JsonProperty(PROP_AS) @Nonnull AsExpr getAsExpr(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); }
AsnValue extends LongExpr { private AsnValue(@Nonnull AsExpr asExpr) { _asExpr = asExpr; } private  AsnValue(@Nonnull AsExpr asExpr); static AsnValue of(@Nonnull AsExpr asExpr); @Override T accept(LongExprVisitor<T, U> visitor, U arg); @Override long evaluate(Environment environment); @JsonProperty(PROP_AS) @Nonnull AsExpr getAsExpr(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }