@Test public void testRemoveConfederations() { AsPath path = AsPath.of(AsSet.of(1L)); AsPath updated = path.removeConfederations(); assertThat(path, equalTo(updated)); path = AsPath.of(AsSet.confed(1L)); updated = path.removeConfederations(); assertThat(updated, equalTo(AsPath.empty())); path = AsPath.of(ImmutableList.of(AsSet.confed(1L), AsSet.of(2L))); updated = path.removeConfederations(); assertThat(updated, equalTo(AsPath.ofSingletonAsSets(2L))); path = AsPath.of(ImmutableList.of(AsSet.confed(1L), AsSet.of(2L), AsSet.confed(3L))); updated = path.removeConfederations(); assertThat(updated, equalTo(AsPath.ofSingletonAsSets(2L))); }
public AsPath removeConfederations() { return AsPath.of( _asSets.stream() .filter(asSet -> !asSet.isConfederationAsSet()) .collect(ImmutableList.toImmutableList())); }
AsPath implements Serializable, Comparable<AsPath> { public AsPath removeConfederations() { return AsPath.of( _asSets.stream() .filter(asSet -> !asSet.isConfederationAsSet()) .collect(ImmutableList.toImmutableList())); } }
AsPath implements Serializable, Comparable<AsPath> { public AsPath removeConfederations() { return AsPath.of( _asSets.stream() .filter(asSet -> !asSet.isConfederationAsSet()) .collect(ImmutableList.toImmutableList())); } private  AsPath(ImmutableList<AsSet> asSets); }
AsPath implements Serializable, Comparable<AsPath> { public AsPath removeConfederations() { return AsPath.of( _asSets.stream() .filter(asSet -> !asSet.isConfederationAsSet()) .collect(ImmutableList.toImmutableList())); } private  AsPath(ImmutableList<AsSet> asSets); static boolean isPrivateAs(long as); static AsPath ofSingletonAsSets(Long... asNums); static AsPath ofSingletonAsSets(List<Long> asNums); static AsPath empty(); static AsPath of(AsSet asSet); static AsPath of(List<AsSet> asSets); AsPath removePrivateAs(); AsPath removeConfederations(); @Override int compareTo(AsPath rhs); boolean containsAs(Long as); @Override boolean equals(Object obj); String getAsPathString(); @JsonValue List<AsSet> getAsSets(); @Override int hashCode(); int size(); int length(); @Override String toString(); }
AsPath implements Serializable, Comparable<AsPath> { public AsPath removeConfederations() { return AsPath.of( _asSets.stream() .filter(asSet -> !asSet.isConfederationAsSet()) .collect(ImmutableList.toImmutableList())); } private  AsPath(ImmutableList<AsSet> asSets); static boolean isPrivateAs(long as); static AsPath ofSingletonAsSets(Long... asNums); static AsPath ofSingletonAsSets(List<Long> asNums); static AsPath empty(); static AsPath of(AsSet asSet); static AsPath of(List<AsSet> asSets); AsPath removePrivateAs(); AsPath removeConfederations(); @Override int compareTo(AsPath rhs); boolean containsAs(Long as); @Override boolean equals(Object obj); String getAsPathString(); @JsonValue List<AsSet> getAsSets(); @Override int hashCode(); int size(); int length(); @Override String toString();  }