Package com.tangosol.util
Class ConverterCollections.ConverterEntrySet<FK,TK,FV,TV>
java.lang.Object
com.tangosol.util.ConverterCollections.ConverterEntrySet<FK,TK,FV,TV>
- Type Parameters:
FK
- the type of the keys in the underlying EntrySetTK
- the type that the keys should be converted toFV
- the type of the values in the underlying EntrySetTV
- the type that the values should be converted to
- All Implemented Interfaces:
Serializable
,Iterable<Map.Entry<TK,
,TV>> Collection<Map.Entry<TK,
,TV>> Set<Map.Entry<TK,
TV>>
- Enclosing class:
ConverterCollections
public static class ConverterCollections.ConverterEntrySet<FK,TK,FV,TV>
extends Object
implements Set<Map.Entry<TK,TV>>, Serializable
A Converter Entry Set views an underlying Entry Set through a set of
key and value Converters.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
A Map Entry that lazily converts the key and value.protected class
A Map Entry Iterator that converts the key and value types. -
Field Summary
Modifier and TypeFieldDescriptionThe Converter used to pass keys down to the Entry Set.The Converter used to view keys stored in the Entry Set.The Converter used to pass values down to the Entry Set.The Converter used to view values stored in the Entry Set.protected final Collection
<Map.Entry<FK, FV>> The underlying Entry Set (or Collection of Map Entry objects). -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
addAll
(Collection<? extends Map.Entry<TK, TV>> col) void
clear()
boolean
boolean
containsAll
(Collection<?> col) boolean
Return the Converter used to pass keys down to the underlying Entry Set.Return the Converter used to view the underlying Entry Set's keys through.Return the Converter used to pass values down to the underlying Entry Set.Return the Converter used to view the underlying Entry Set's values through.Return the underlying Entry Set.int
hashCode()
instantiateEntrySet
(Collection<Map.Entry<FK, FV>> col, Converter<FK, TK> convKeyUp, Converter<TK, FK> convKeyDown, Converter<FV, TV> convValUp, Converter<TV, FV> convValDown) Create a Converter Entry Set.boolean
isEmpty()
iterator()
boolean
boolean
removeAll
(Collection<?> col) boolean
retainAll
(Collection<?> col) int
size()
Object[]
toArray()
<T> T[]
toArray
(T[] ao) toString()
Wrap an Entry from the Entry Set to make a Converter Entry.wrapIterator
(Iterator<Map.Entry<FK, FV>> iter) Wrap an Iterator from the Entry Set to make a Converter Iterator.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.Set
spliterator
-
Field Details
-
m_set
The underlying Entry Set (or Collection of Map Entry objects). -
m_convKeyUp
The Converter used to view keys stored in the Entry Set. -
m_convKeyDown
The Converter used to pass keys down to the Entry Set. -
m_convValUp
The Converter used to view values stored in the Entry Set. -
m_convValDown
The Converter used to pass values down to the Entry Set.
-
-
Constructor Details
-
ConverterEntrySet
public ConverterEntrySet(Collection<Map.Entry<FK, FV>> set, Converter<FK, TK> convKeyUp, Converter<TK, FK> convKeyDown, Converter<FV, TV> convValUp, Converter<TV, FV> convValDown) Constructor.- Parameters:
set
- the underlying Entry Set (or Collection of Map Entry objects)convKeyUp
- the Converter to view the underlying Entry Set's keys throughconvKeyDown
- the Converter to use to pass keys down to the underlying Entry SetconvValUp
- the Converter to view the underlying Entry Set's values throughconvValDown
- the Converter to use to pass values down to the underlying Entry Set
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
contains
-
iterator
-
toArray
-
toArray
public <T> T[] toArray(T[] ao) -
add
-
remove
-
containsAll
- Specified by:
containsAll
in interfaceCollection<FK>
- Specified by:
containsAll
in interfaceSet<FK>
-
addAll
-
removeAll
-
retainAll
-
clear
public void clear() -
equals
-
hashCode
public int hashCode() -
toString
-
instantiateEntrySet
protected <FK,FV, Set<Map.Entry<TK,TK, TV> TV>> instantiateEntrySet(Collection<Map.Entry<FK, FV>> col, Converter<FK, TK> convKeyUp, Converter<TK, FK> convKeyDown, Converter<FV, TV> convValUp, Converter<TV, FV> convValDown) Create a Converter Entry Set.- Type Parameters:
FK
- the type of the keys in the underlying EntrySetFV
- the type of the values in the underlying EntrySetTK
- the type that the keys should be converted toTV
- the type that the values should be converted to- Parameters:
col
- the underlying Collection of Map Entry objectsconvKeyUp
- 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
-
wrapEntry
Wrap an Entry from the Entry Set to make a Converter Entry.- Parameters:
entry
- a Map Entry to wrap- Returns:
- a Map Entry that restricts its type
-
wrapIterator
Wrap an Iterator from the Entry Set to make a Converter Iterator.- Parameters:
iter
- a Iterator to wrap- Returns:
- a Converter Iterator
-
getEntrySet
Return the underlying Entry Set.- Returns:
- the underlying Entry Set
-
getConverterKeyUp
Return the Converter used to view the underlying Entry Set's keys through.- Returns:
- the Converter from the underlying Entry Set's keys
-
getConverterKeyDown
Return the Converter used to pass keys down to the underlying Entry Set.- Returns:
- the Converter to the underlying Entry Set's keys
-
getConverterValueUp
Return the Converter used to view the underlying Entry Set's values through.- Returns:
- the Converter from the underlying Entry Set's values
-
getConverterValueDown
Return the Converter used to pass values down to the underlying Entry Set.- Returns:
- the Converter to the underlying Entry Set's values
-