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 topublic static class ConverterCollections.ConverterEntrySet<FK,TK,FV,TV> extends Object implements Set<Map.Entry<TK,TV>>, Serializable
Modifier and Type | Class and Description |
---|---|
protected class |
ConverterCollections.ConverterEntrySet.ConverterEntry
A Map Entry that lazily converts the key and value.
|
protected class |
ConverterCollections.ConverterEntrySet.ConverterIterator
A Map Entry Iterator that converts the key and value types.
|
Modifier and Type | Field and Description |
---|---|
protected Converter<TK,FK> |
m_convKeyDown
The Converter used to pass keys down to the Entry Set.
|
protected Converter<FK,TK> |
m_convKeyUp
The Converter used to view keys stored in the Entry Set.
|
protected Converter<TV,FV> |
m_convValDown
The Converter used to pass values down to the Entry Set.
|
protected Converter<FV,TV> |
m_convValUp
The Converter used to view values stored in the Entry Set.
|
protected Collection<Map.Entry<FK,FV>> |
m_set
The underlying Entry Set (or Collection of Map Entry objects).
|
Constructor and Description |
---|
ConverterEntrySet(Collection<Map.Entry<FK,FV>> set,
Converter<FK,TK> convKeyUp,
Converter<TK,FK> convKeyDown,
Converter<FV,TV> convValUp,
Converter<TV,FV> convValDown)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(Map.Entry<TK,TV> o) |
boolean |
addAll(Collection<? extends Map.Entry<TK,TV>> col) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> col) |
boolean |
equals(Object o) |
Converter<TK,FK> |
getConverterKeyDown()
Return the Converter used to pass keys down to the underlying Entry
Set.
|
Converter<FK,TK> |
getConverterKeyUp()
Return the Converter used to view the underlying Entry Set's keys
through.
|
Converter<TV,FV> |
getConverterValueDown()
Return the Converter used to pass values down to the underlying
Entry Set.
|
Converter<FV,TV> |
getConverterValueUp()
Return the Converter used to view the underlying Entry Set's values
through.
|
Collection<Map.Entry<FK,FV>> |
getEntrySet()
Return the underlying Entry Set.
|
int |
hashCode() |
protected <FK,FV,TK,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.
|
boolean |
isEmpty() |
Iterator<Map.Entry<TK,TV>> |
iterator() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> col) |
boolean |
retainAll(Collection<?> col) |
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] ao) |
String |
toString() |
protected Map.Entry<TK,TV> |
wrapEntry(Map.Entry<FK,FV> entry)
Wrap an Entry from the Entry Set to make a Converter Entry.
|
protected Iterator<Map.Entry<TK,TV>> |
wrapIterator(Iterator<Map.Entry<FK,FV>> iter)
Wrap an Iterator from the Entry Set to make a Converter Iterator.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
spliterator
parallelStream, removeIf, stream
protected final Collection<Map.Entry<FK,FV>> m_set
protected final Converter<FK,TK> m_convKeyUp
protected final Converter<TK,FK> m_convKeyDown
protected final Converter<FV,TV> m_convValUp
public ConverterEntrySet(Collection<Map.Entry<FK,FV>> set, Converter<FK,TK> convKeyUp, Converter<TK,FK> convKeyDown, Converter<FV,TV> convValUp, Converter<TV,FV> convValDown)
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 Setpublic int size()
public boolean isEmpty()
public boolean contains(Object o)
public Object[] toArray()
public <T> T[] toArray(T[] ao)
public boolean remove(Object o)
public boolean containsAll(Collection<?> col)
containsAll
in interface Collection<Map.Entry<TK,TV>>
containsAll
in interface Set<Map.Entry<TK,TV>>
public boolean addAll(Collection<? extends Map.Entry<TK,TV>> col)
public boolean removeAll(Collection<?> col)
public boolean retainAll(Collection<?> col)
public void clear()
public boolean equals(Object o)
public int hashCode()
protected <FK,FV,TK,TV> Set<Map.Entry<TK,TV>> instantiateEntrySet(Collection<Map.Entry<FK,FV>> col, Converter<FK,TK> convKeyUp, Converter<TK,FK> convKeyDown, Converter<FV,TV> convValUp, Converter<TV,FV> convValDown)
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 tocol
- 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 Setprotected Map.Entry<TK,TV> wrapEntry(Map.Entry<FK,FV> entry)
entry
- a Map Entry to wrapprotected Iterator<Map.Entry<TK,TV>> wrapIterator(Iterator<Map.Entry<FK,FV>> iter)
iter
- a Iterator to wrappublic Collection<Map.Entry<FK,FV>> getEntrySet()
public Converter<FK,TK> getConverterKeyUp()
public Converter<TK,FK> getConverterKeyDown()
public Converter<FV,TV> getConverterValueUp()