@Test public void testEquals() { PrefixTrieMultiMap<Integer> ptm1 = new PrefixTrieMultiMap<>(Prefix.ZERO); ptm1.put(Prefix.ZERO, 1); PrefixTrieMultiMap<Integer> ptm2 = new PrefixTrieMultiMap<>(Prefix.ZERO); ptm2.put(Prefix.parse("1.1.1.0/24"), 1); new EqualsTester() .addEqualityGroup( new PrefixTrieMultiMap<Integer>(Prefix.ZERO), new PrefixTrieMultiMap<Integer>(Prefix.ZERO)) .addEqualityGroup(new PrefixTrieMultiMap<Integer>(Prefix.parse("1.1.1.1/32"))) .addEqualityGroup(ptm1) .addEqualityGroup(ptm2) .addEqualityGroup(new Object()) .testEquals(); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof PrefixTrieMultiMap<?>)) { return false; } PrefixTrieMultiMap<?> map = (PrefixTrieMultiMap<?>) o; return Objects.equals(_root, map._root); }
PrefixTrieMultiMap implements Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof PrefixTrieMultiMap<?>)) { return false; } PrefixTrieMultiMap<?> map = (PrefixTrieMultiMap<?>) o; return Objects.equals(_root, map._root); } }
PrefixTrieMultiMap implements Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof PrefixTrieMultiMap<?>)) { return false; } PrefixTrieMultiMap<?> map = (PrefixTrieMultiMap<?>) o; return Objects.equals(_root, map._root); } PrefixTrieMultiMap(Prefix prefix);  PrefixTrieMultiMap(); }
PrefixTrieMultiMap implements Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof PrefixTrieMultiMap<?>)) { return false; } PrefixTrieMultiMap<?> map = (PrefixTrieMultiMap<?>) o; return Objects.equals(_root, map._root); } 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 { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof PrefixTrieMultiMap<?>)) { return false; } PrefixTrieMultiMap<?> map = (PrefixTrieMultiMap<?>) o; return Objects.equals(_root, map._root); } 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();  }