Package org.apache.sis.util.collection
Class DerivedMap.InvertibleValue<SK,SV,K,V>
java.lang.Object
java.util.AbstractMap<K,V>
org.apache.sis.util.collection.DerivedMap<SK,SV,K,V>
org.apache.sis.util.collection.DerivedMap.InvertibleValue<SK,SV,K,V>
- Type Parameters:
SK
- the type of keys in the storage map.SV
- the type of values in the storage map.K
- the type of keys in this map.V
- the type of values in this map.
- All Implemented Interfaces:
Serializable
,Function<Map.Entry<SK,
,SV>, Map.Entry<K, V>> Map<K,
,V> ObjectConverter<Map.Entry<SK,
SV>, Map.Entry<K, V>>
- Enclosing class:
- DerivedMap<SK,
SV, K, V>
A
DerivedMap
used when the DerivedMap.valueConverter
is invertible.
Availability of the inverse conversion allows us to delegate some operations
to the DerivedMap.storage map instead of iterating over all entries.-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long
private final ObjectConverter<V,
SV> The inverse ofDerivedMap.valueConverter
.Fields inherited from class org.apache.sis.util.collection.DerivedMap
keyConverter, storage, valueConverter
-
Constructor Summary
ConstructorsConstructorDescriptionInvertibleValue
(Map<SK, SV> storage, ObjectConverter<SK, K> keyConverter, ObjectConverter<SV, V> valueConverter) -
Method Summary
Methods inherited from class org.apache.sis.util.collection.DerivedMap
apply, create, entrySet, getSourceClass, getTargetClass, inverse, isEmpty, keySet, properties, put, put, size
Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, equals, get, hashCode, putAll, remove, toString, values
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
valueInverse
The inverse ofDerivedMap.valueConverter
.
-
-
Constructor Details
-
InvertibleValue
InvertibleValue(Map<SK, SV> storage, ObjectConverter<SK, K> keyConverter, ObjectConverter<SV, V> valueConverter)
-
-
Method Details
-
containsValue
- Specified by:
containsValue
in interfaceMap<SK,
SV> - Overrides:
containsValue
in classAbstractMap<K,
V>
-