Package org.apache.sis.util.collection
Class DerivedMap.InvertibleKey<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.InvertibleKey<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>>
- Direct Known Subclasses:
DerivedMap.Invertible
- Enclosing class:
- DerivedMap<SK,
SV, K, V>
A
DerivedMap used when the DerivedMap.keyConverter 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 TypeFieldDescriptionprotected final ObjectConverter<K,SK> The inverse ofDerivedMap.keyConverter.private static final longFields inherited from class org.apache.sis.util.collection.DerivedMap
keyConverter, storage, valueConverter -
Constructor Summary
ConstructorsConstructorDescriptionInvertibleKey(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, sizeMethods inherited from class java.util.AbstractMap
clear, clone, containsValue, equals, hashCode, putAll, toString, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:
-
keyInverse
The inverse ofDerivedMap.keyConverter.
-
-
Constructor Details
-
InvertibleKey
InvertibleKey(Map<SK, SV> storage, ObjectConverter<SK, K> keyConverter, ObjectConverter<SV, V> valueConverter)
-
-
Method Details
-
get
-
remove
- Specified by:
removein interfaceMap<SK,SV> - Overrides:
removein classAbstractMap<K,V> - Throws:
UnsupportedOperationException
-
containsKey
- Specified by:
containsKeyin interfaceMap<SK,SV> - Overrides:
containsKeyin classAbstractMap<K,V>
-