K - key type of this mapV - value type of this mapWK - key type of wrapped mapWV - value type of wrapped mappublic class ConvertedNavigableMap<K,V,WK,WV> extends AbstractNavigableMap<K,V>
NavigableMap using a strictly invertable Converter.AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>bounds| Constructor and Description |
|---|
ConvertedNavigableMap(NavigableMap<WK,WV> map,
Converter<K,WK> keyConverter,
Converter<V,WV> valueConverter)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
Comparator<? super K> |
comparator() |
protected NavigableMap<K,V> |
createSubMap(boolean reverse,
Bounds<K> newBounds)
Create a (possibly reversed) view of this instance with (possibly) tighter lower and/or upper bounds.
|
Set<Map.Entry<K,V>> |
entrySet() |
V |
get(Object key) |
Converter<K,WK> |
getKeyConverter() |
Converter<V,WV> |
getValueConverter() |
boolean |
isEmpty() |
NavigableSet<K> |
navigableKeySet() |
V |
put(K key,
V value) |
V |
remove(Object key) |
protected Map.Entry<K,V> |
searchAbove(K minKey,
boolean inclusive)
Search for a higher element.
|
protected Map.Entry<K,V> |
searchBelow(K maxKey,
boolean inclusive)
Search for a lower element.
|
int |
size() |
ceilingEntry, ceilingKey, containsKey, descendingKeySet, descendingMap, firstEntry, firstKey, floorEntry, floorKey, getComparator, headMap, headMap, higherEntry, higherKey, isWithinLowerBound, isWithinUpperBound, keySet, lastEntry, lastKey, lowerEntry, lowerKey, pollFirstEntry, pollLastEntry, subMap, subMap, tailMap, tailMapclone, containsValue, equals, hashCode, putAll, toString, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcontainsValue, equals, hashCode, putAllpublic ConvertedNavigableMap(NavigableMap<WK,WV> map, Converter<K,WK> keyConverter, Converter<V,WV> valueConverter)
map - wrapped mapkeyConverter - key convertervalueConverter - value converterIllegalArgumentException - if any parameter is nullpublic Comparator<? super K> comparator()
public NavigableSet<K> navigableKeySet()
public void clear()
public boolean isEmpty()
public int size()
protected Map.Entry<K,V> searchBelow(K maxKey, boolean inclusive)
AbstractNavigableMapfloorEntry() and lowerEntry().
The implementation in AbstractNavigableMap checks the bounds then returns the first entry from a head map.
searchBelow in class AbstractNavigableMap<K,V>maxKey - upper limit for searchinclusive - true if maxKey itself is a candidatemaxKey, or null if not foundprotected Map.Entry<K,V> searchAbove(K minKey, boolean inclusive)
AbstractNavigableMapceilingEntry() and higherEntry().
The implementation in AbstractNavigableMap checks the bounds then returns the first entry from a tail map.
searchAbove in class AbstractNavigableMap<K,V>minKey - lower limit for searchinclusive - true if minKey itself is a candidateminKey, or null if not foundprotected NavigableMap<K,V> createSubMap(boolean reverse, Bounds<K> newBounds)
AbstractNavigableMapnewBounds are consistent with the new ordering (i.e., reversed relative to this instance's ordering if
reverse is true) and have already been range-checked against this instance's current bounds.createSubMap in class AbstractNavigableMap<K,V>reverse - whether the new map's ordering should be reversed relative to this instance's orderingnewBounds - new boundsCopyright © 2016. All rights reserved.