@Test public void testTraverseEntries() { PrefixTrieMultiMap<Integer> map = new PrefixTrieMultiMap<>(Prefix.ZERO); Prefix l = Prefix.parse("0.0.0.0/8"); Prefix ll = Prefix.parse("0.0.0.0/16"); Prefix lr = Prefix.parse("0.128.0.0/16"); Prefix r = Prefix.parse("128.0.0.0/8"); Prefix rl = Prefix.parse("128.0.0.0/16"); Prefix rr = Prefix.parse("128.128.0.0/16"); map.put(l, 0); map.put(ll, 0); map.put(lr, 0); map.put(rr, 0); map.put(rl, 0); map.put(r, 0); List<Prefix> prefixes = keysInPostOrder(map); assertThat(prefixes, contains(ll, lr, l, rl, rr, r, Prefix.ZERO)); }
public void traverseEntries(BiConsumer<Prefix, Set<T>> consumer) { traverseNodes(node -> consumer.accept(node._prefix, ImmutableSet.copyOf(node._elements))); }
PrefixTrieMultiMap implements Serializable { public void traverseEntries(BiConsumer<Prefix, Set<T>> consumer) { traverseNodes(node -> consumer.accept(node._prefix, ImmutableSet.copyOf(node._elements))); } }
PrefixTrieMultiMap implements Serializable { public void traverseEntries(BiConsumer<Prefix, Set<T>> consumer) { traverseNodes(node -> consumer.accept(node._prefix, ImmutableSet.copyOf(node._elements))); } PrefixTrieMultiMap(Prefix prefix);  PrefixTrieMultiMap(); }
PrefixTrieMultiMap implements Serializable { public void traverseEntries(BiConsumer<Prefix, Set<T>> consumer) { traverseNodes(node -> consumer.accept(node._prefix, ImmutableSet.copyOf(node._elements))); } PrefixTrieMultiMap(Prefix prefix);  PrefixTrieMultiMap(); void traverseEntries(BiConsumer<Prefix, Set<T>> consumer); R fold(FoldOperator<T, R> operator); @Override boolean equals(Object o); @Nonnull Set<T> get(Prefix p); @Nonnull Set<T> getAllElements(); @Override int hashCode(); @Nonnull Set<T> longestPrefixMatch(Ip address); @Nonnull Set<T> longestPrefixMatch(Ip address, int maxPrefixLength); boolean put(Prefix p, T e); boolean putAll(Prefix p, Collection<T> elements); boolean remove(Prefix p, T e); boolean replaceAll(Prefix p, T e); void clear(); }
PrefixTrieMultiMap implements Serializable { public void traverseEntries(BiConsumer<Prefix, Set<T>> consumer) { traverseNodes(node -> consumer.accept(node._prefix, ImmutableSet.copyOf(node._elements))); } PrefixTrieMultiMap(Prefix prefix);  PrefixTrieMultiMap(); void traverseEntries(BiConsumer<Prefix, Set<T>> consumer); R fold(FoldOperator<T, R> operator); @Override boolean equals(Object o); @Nonnull Set<T> get(Prefix p); @Nonnull Set<T> getAllElements(); @Override int hashCode(); @Nonnull Set<T> longestPrefixMatch(Ip address); @Nonnull Set<T> longestPrefixMatch(Ip address, int maxPrefixLength); boolean put(Prefix p, T e); boolean putAll(Prefix p, Collection<T> elements); boolean remove(Prefix p, T e); boolean replaceAll(Prefix p, T e); void clear();  }