@Test public void getPrefixRangesTest() { assertThat("No ranges yet", _ps.getPrefixRanges().isEmpty(), equalTo(true)); _ps.addPrefixRange(PrefixRange.fromString("10.10.10.0/20:18-21")); Set<PrefixRange> ranges = _ps.getPrefixRanges(); assertThat(ranges.contains(PrefixRange.fromString("10.10.0.0/18")), equalTo(true)); assertThat(ranges.contains(PrefixRange.fromString("10.10.0.0/19")), equalTo(true)); assertThat(ranges.contains(PrefixRange.fromString("10.10.10.0/20:18-21")), equalTo(true)); assertThat(ranges.size(), equalTo(3)); _ps.addPrefixRange((PrefixRange.fromString("10.10.10.0/20:20-22"))); ranges = _ps.getPrefixRanges(); assertThat(ranges.contains(PrefixRange.fromString("10.10.10.0/20:20-22")), equalTo(true)); }
public Set<PrefixRange> getPrefixRanges() { return _trie.getPrefixRanges(); }
PrefixSpace implements Serializable { public Set<PrefixRange> getPrefixRanges() { return _trie.getPrefixRanges(); } }
PrefixSpace implements Serializable { public Set<PrefixRange> getPrefixRanges() { return _trie.getPrefixRanges(); } PrefixSpace(); @JsonCreator  PrefixSpace(Iterable<PrefixRange> prefixRanges);  PrefixSpace(PrefixRange... prefixRanges); }
PrefixSpace implements Serializable { public Set<PrefixRange> getPrefixRanges() { return _trie.getPrefixRanges(); } PrefixSpace(); @JsonCreator  PrefixSpace(Iterable<PrefixRange> prefixRanges);  PrefixSpace(PrefixRange... prefixRanges); void addPrefix(Prefix prefix); void addPrefixRange(PrefixRange prefixRange); void addSpace(PrefixSpace prefixSpace); boolean containsPrefix(Prefix prefix); boolean containsPrefixRange(PrefixRange prefixRange); @Override boolean equals(Object obj); Set<PrefixRange> getPrefixRanges(); @Override int hashCode(); PrefixSpace intersection(PrefixSpace intersectSpace); @JsonIgnore boolean isEmpty(); boolean overlaps(PrefixSpace intersectSpace); @Override String toString(); }
PrefixSpace implements Serializable { public Set<PrefixRange> getPrefixRanges() { return _trie.getPrefixRanges(); } PrefixSpace(); @JsonCreator  PrefixSpace(Iterable<PrefixRange> prefixRanges);  PrefixSpace(PrefixRange... prefixRanges); void addPrefix(Prefix prefix); void addPrefixRange(PrefixRange prefixRange); void addSpace(PrefixSpace prefixSpace); boolean containsPrefix(Prefix prefix); boolean containsPrefixRange(PrefixRange prefixRange); @Override boolean equals(Object obj); Set<PrefixRange> getPrefixRanges(); @Override int hashCode(); PrefixSpace intersection(PrefixSpace intersectSpace); @JsonIgnore boolean isEmpty(); boolean overlaps(PrefixSpace intersectSpace); @Override String toString();  }