K1
- the first key typeK2
- the second key typeV
- the value typeM
- the type for the inner mappublic class TwoKeyConcurrentMap<K1,K2,V,M extends Map<K2,V>> extends ConcurrentHashMap<K1,M>
Modifier and Type | Class and Description |
---|---|
static interface |
TwoKeyConcurrentMap.TriFunction<A,B,C,R>
A function with three arguments.
|
ConcurrentHashMap.KeySetView<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
TwoKeyConcurrentMap(java.util.function.Supplier<M> innerMapCreator) |
Modifier and Type | Method and Description |
---|---|
void |
addInnerValue(K1 k1,
K2 k2,
V v) |
boolean |
equals(Object o)
The equals implementation for this map simply uses the superclass's equals.
|
<R> Set<R> |
flattenEntries(TwoKeyConcurrentMap.TriFunction<K1,K2,V,R> fn)
Flattens the (key1, key2, value) triples according to the given function.
|
int |
hashCode()
The hashCode implementation for this map simply uses the superclass's.
|
void |
removeInnerValue(K1 k1,
K2 k2) |
clear, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, forEach, forEach, forEach, forEachEntry, forEachEntry, forEachKey, forEachKey, forEachValue, forEachValue, get, getOrDefault, isEmpty, keys, keySet, keySet, mappingCount, merge, newKeySet, newKeySet, put, putAll, putIfAbsent, reduce, reduceEntries, reduceEntries, reduceEntriesToDouble, reduceEntriesToInt, reduceEntriesToLong, reduceKeys, reduceKeys, reduceKeysToDouble, reduceKeysToInt, reduceKeysToLong, reduceToDouble, reduceToInt, reduceToLong, reduceValues, reduceValues, reduceValuesToDouble, reduceValuesToInt, reduceValuesToLong, remove, remove, replace, replace, replaceAll, search, searchEntries, searchKeys, searchValues, size, toString, values
clone
public TwoKeyConcurrentMap(java.util.function.Supplier<M> innerMapCreator)
innerMapCreator
- supplier for the inner map typepublic void addInnerValue(K1 k1, K2 k2, V v)
k1
- the first keyk2
- the second keyv
- the value@Nullable public void removeInnerValue(K1 k1, K2 k2)
k1
- the first keyk2
- the second keypublic <R> Set<R> flattenEntries(TwoKeyConcurrentMap.TriFunction<K1,K2,V,R> fn)
R
- the result type of the functionfn
- a function to create an entry from the keys and valuepublic boolean equals(Object o)
Copyright © 2023. All Rights Reserved.