Class ConverterCollections.ConverterMap<FK,TK,FV,TV>
java.lang.Object
com.tangosol.util.ConverterCollections.ConverterMap<FK,TK,FV,TV>
- Type Parameters:
FK
- the type of the keys in the underlying MapTK
- the type that the keys should be converted toFV
- the type of the values in the underlying MapTV
- the type that the values should be converted to
- All Implemented Interfaces:
Serializable
,Map<TK,
TV>
- Direct Known Subclasses:
CacheStoreMap
,ConverterCollections.ConverterConcurrentMap
,ConverterCollections.ConverterInvocableMap
,ConverterCollections.ConverterObservableMap
,ConverterCollections.ConverterQueryMap
,ConverterCollections.ConverterSortedMap
- Enclosing class:
ConverterCollections
public static class ConverterCollections.ConverterMap<FK,TK,FV,TV>
extends Object
implements Map<TK,TV>, Serializable
A Converter Map views an underlying Map through a set of key and value
Converters.
- Author:
- cp 2002.02.08, jh 2007.09.28
- See Also:
-
Nested Class Summary
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe Converter used to pass keys down to the Map.The Converter used to view keys stored in the Map.The Converter used to pass keys down to the Map.The Converter used to view values stored in the Map.The underlying Map.The Entry Set. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
boolean
containsKey
(Object key) boolean
containsValue
(Object value) entrySet()
boolean
Return the Converter used to pass keys down to the underlying Map.Return the Converter used to view the underlying Map's keys through.Return the Converter used to pass values down to the underlying Map.Return the Converter used to view the underlying Map's values through.getMap()
Return the underlying Map.int
hashCode()
protected <F,
T> Collection <T> instantiateCollection
(Collection<F> col, Converter<F, T> convUp, Converter<T, F> convDown) Create a Converter Collection.instantiateEntrySet
(Set<Map.Entry<FK, FV>> set, Converter<FK, TK> convKeyUp, Converter<TK, FK> convKeyDown, Converter<FV, TV> convValUp, Converter<TV, FV> convValDown) Create a Converter Entry Set.protected <FK,
TK, FV, TV>
Map<TK, TV> instantiateMap
(Map<FK, FV> map, Converter<FK, TK> convKeyUp, Converter<TK, FK> convKeyDown, Converter<FV, TV> convValUp, Converter<TV, FV> convValDown) Create a Converter Map.protected <T,
F> Set <T> instantiateSet
(Set<F> set, Converter<F, T> convUp, Converter<T, F> convDown) Create a Converter Set.boolean
isEmpty()
keySet()
void
int
size()
toString()
values()
Methods inherited from class java.lang.Object
clone, 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
-
m_map
-
m_convKeyUp
-
m_convKeyDown
-
m_convValUp
-
m_convValDown
-
m_set
-
-
Constructor Details
-
ConverterMap
public ConverterMap(Map<FK, FV> map, Converter<FK, TK> convKeyUp, Converter<TK, FK> convKeyDown, Converter<FV, TV> convValUp, Converter<TV, FV> convValDown) Constructor.- Parameters:
map
- the underlying MapconvKeyUp
- the Converter to view the underlying Map's keys throughconvKeyDown
- the Converter to use to pass keys down to the underlying MapconvValUp
- the Converter to view the underlying Map's values throughconvValDown
- the Converter to use to pass values down to the underlying Map
-
-
Method Details
-
subMap
-
size
-
isEmpty
-
containsKey
- Specified by:
containsKey
in interfaceMap<FK,
TK>
-
containsValue
- Specified by:
containsValue
in interfaceMap<FK,
TK>
-
get
-
put
-
remove
-
putAll
-
clear
-
keySet
-
values
-
entrySet
-
toString
-
equals
-
hashCode
-
instantiateCollection
protected <F,T> Collection<T> instantiateCollection(Collection<F> col, Converter<F, T> convUp, Converter<T, F> convDown) Create a Converter Collection.- Type Parameters:
F
- the type of elements in the underlying CollectionT
- the type that the elements should be converted to- Parameters:
col
- the underlying CollectionconvUp
- the Converter to view the underlying Collection throughconvDown
- the Converter to pass items down to the underlying Collection through- Returns:
- a Converter Collection
-
instantiateSet
Create a Converter Set.- Type Parameters:
T
- the type that the elements should be converted toF
- the type of elements in the underlying Set- Parameters:
set
- the underlying SetconvUp
- the Converter to view the underlying Set throughconvDown
- the Converter to pass items down to the underlying Set through- Returns:
- a Converter Set
-
instantiateMap
protected <FK,TK, Map<TK,FV, TV> TV> instantiateMap(Map<FK, FV> map, Converter<FK, TK> convKeyUp, Converter<TK, FK> convKeyDown, Converter<FV, TV> convValUp, Converter<TV, FV> convValDown) Create a Converter Map.- Type Parameters:
FK
- the type of the keys in the underlying MapTK
- the type that the keys should be converted toFV
- the type of the values in the underlying MapTV
- the type that the values should be converted to- Parameters:
map
- the underlying MapconvKeyUp
- the Converter to view the underlying Map's keys throughconvKeyDown
- the Converter to use to pass keys down to the underlying MapconvValUp
- the Converter to view the underlying Map's values throughconvValDown
- the Converter to use to pass values down to the underlying Map- Returns:
- a Converter Map
-
instantiateEntrySet
protected Set<Map.Entry<TK,TV>> instantiateEntrySet(Set<Map.Entry<FK, FV>> set, Converter<FK, TK> convKeyUp, Converter<TK, FK> convKeyDown, Converter<FV, TV> convValUp, Converter<TV, FV> convValDown) Create a Converter Entry Set.- Parameters:
set
- the underlying Map Entry SetconvKeyUp
- the Converter to view the underlying Map's Entry Set's keys throughconvKeyDown
- the Converter to use to pass keys down to the underlying Map's Entry SetconvValUp
- the Converter to view the underlying Map's Entry Set's values throughconvValDown
- the Converter to use to pass values down to the underlying Map's Entry Set- Returns:
- a Converter Entry Set
-
getMap
-
getConverterKeyUp
-
getConverterKeyDown
-
getConverterValueUp
-
getConverterValueDown
-