public interface ObjObjMap<K,V> extends Map<K,V>, Container
Map interface.ObjObjMapFactory| Modifier and Type | Method and Description |
|---|---|
ObjObjCursor<K,V> |
cursor()
Returns a new cursor over the entries of this map.
|
ObjSet<Map.Entry<K,V>> |
entrySet()
Returns a
Set view of the mappings contained in this map. |
boolean |
forEachWhile(java.util.function.BiPredicate<? super K,? super V> predicate)
Checks the given
predicate on each entry in this map until all entries
have been processed or the predicate returns false for some entry,
or throws an Exception. |
Equivalence<K> |
keyEquivalence()
Returns the equivalence strategy for keys in this map.
|
ObjSet<K> |
keySet()
Returns a
Set view of the keys contained in this map. |
boolean |
removeIf(java.util.function.BiPredicate<? super K,? super V> filter)
Removes all of the entries of this collection that satisfy the given predicate.
|
Equivalence<V> |
valueEquivalence()
Returns the equivalence strategy for values in this map.
|
ObjCollection<V> |
values()
Returns a
Collection view of the values contained in this map. |
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, forEach, get, getOrDefault, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, sizeclear, ensureCapacity, isEmpty, shrink, size, sizeAsLong@Nonnull Equivalence<K> keyEquivalence()
Map
interface which defined in terms of Object.equals(Object) equality of key objects
(almost all methods, actually), are supposed to use this equivalence instead.HashObjObjMapFactory.withKeyEquivalence(net.openhft.koloboke.collect.Equivalence<? super K>)@Nonnull Equivalence<V> valueEquivalence()
Map
interface which defined in terms of Object.equals(Object) equality of value objects,
for example, Map.containsValue(Object) and Map.remove(Object, Object),
are supposed to use this equivalence instead.ObjObjMapFactory.withValueEquivalence(net.openhft.koloboke.collect.Equivalence<? super V>)boolean forEachWhile(@Nonnull
java.util.function.BiPredicate<? super K,? super V> predicate)
predicate on each entry in this map until all entries
have been processed or the predicate returns false for some entry,
or throws an Exception. Exceptions thrown by the predicate are relayed to the caller.
The entries will be processed in the same order as the entry set iterator unless that order is unspecified in which case implementations may use an order which differs from the entry set iterator.
If the map is empty, this method returns true immediately.
predicate - the predicate to be checked for each entrytrue if the predicate returned true for all entries of the map,
false if it returned false for the entry@Nonnull ObjObjCursor<K,V> cursor()
@Nonnull ObjSet<K> keySet()
java.util.MapSet view of the keys contained in this map.
The set is backed by the map, so changes to the map are
reflected in the set, and vice-versa. If the map is modified
while an iteration over the set is in progress (except through
the iterator's own remove operation), the results of
the iteration are undefined. The set supports element removal,
which removes the corresponding mapping from the map, via the
Iterator.remove, Set.remove,
removeAll, retainAll, and clear
operations. It does not support the add or addAll
operations.@Nonnull ObjCollection<V> values()
java.util.MapCollection view of the values contained in this map.
The collection is backed by the map, so changes to the map are
reflected in the collection, and vice-versa. If the map is
modified while an iteration over the collection is in progress
(except through the iterator's own remove operation),
the results of the iteration are undefined. The collection
supports element removal, which removes the corresponding
mapping from the map, via the Iterator.remove,
Collection.remove, removeAll,
retainAll and clear operations. It does not
support the add or addAll operations.@Nonnull ObjSet<Map.Entry<K,V>> entrySet()
java.util.MapSet view of the mappings contained in this map.
The set is backed by the map, so changes to the map are
reflected in the set, and vice-versa. If the map is modified
while an iteration over the set is in progress (except through
the iterator's own remove operation, or through the
setValue operation on a map entry returned by the
iterator) the results of the iteration are undefined. The set
supports element removal, which removes the corresponding
mapping from the map, via the Iterator.remove,
Set.remove, removeAll, retainAll and
clear operations. It does not support the
add or addAll operations.boolean removeIf(@Nonnull
java.util.function.BiPredicate<? super K,? super V> filter)
filter - a predicate which returns true for elements to be removedtrue if any elements were removedNullPointerException - if the specified filter is nullUnsupportedOperationException - if elements cannot be removed from this collection.
Implementations may throw this exception if a matching element cannot be removed
or if, in general, removal is not supported.