Package de.gsi.dataset.utils.trees
Class IndexedTreeMap.AscendingSubMap<K,V>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- de.gsi.dataset.utils.trees.IndexedTreeMap.AscendingSubMap<K,V>
-
- Type Parameters:
K- key value typeV- value value type
- All Implemented Interfaces:
java.io.Serializable,java.util.Map<K,V>,java.util.NavigableMap<K,V>,java.util.SortedMap<K,V>
- Enclosing class:
- IndexedTreeMap<K,V>
protected static final class IndexedTreeMap.AscendingSubMap<K,V> extends java.util.AbstractMap<K,V>- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classIndexedTreeMap.AscendingSubMap.AscendingEntrySetViewprotected classIndexedTreeMap.NavigableSubMap.DescendingSubMapEntryIteratorprotected classIndexedTreeMap.NavigableSubMap.DescendingSubMapKeyIteratorprotected classIndexedTreeMap.NavigableSubMap.EntrySetViewprotected classIndexedTreeMap.NavigableSubMap.SubMapEntryIteratorprotected classIndexedTreeMap.NavigableSubMap.SubMapIterator<T>Iterators for SubMapsprotected classIndexedTreeMap.NavigableSubMap.SubMapKeyIterator
-
Field Summary
Fields Modifier and Type Field Description protected java.util.NavigableMap<K,V>descendingMapViewprotected IndexedTreeMap.NavigableSubMap.EntrySetViewentrySetViewprotected booleanfromStartprotected KhiEndpoints are represented as triples (fromStart, lo, loInclusive) and (toEnd, hi, hiInclusive).protected booleanhiInclusiveprotected KloEndpoints are represented as triples (fromStart, lo, loInclusive) and (toEnd, hi, hiInclusive).protected booleanloInclusiveprotected IndexedTreeMap<K,V>mThe backing map.protected de.gsi.dataset.utils.trees.IndexedTreeMap.KeySet<K>navigableKeySetViewprotected booleantoEnd
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IndexedTreeMap.Entry<K,V>absCeiling(K key)IndexedTreeMap.Entry<K,V>absFloor(K key)IndexedTreeMap.Entry<K,V>absHigher(K key)IndexedTreeMap.Entry<K,V>absHighest()IndexedTreeMap.Entry<K,V>absHighFence()Returns the absolute high fence for ascending traversalIndexedTreeMap.Entry<K,V>absLower(K key)IndexedTreeMap.Entry<K,V>absLowest()IndexedTreeMap.Entry<K,V>absLowFence()Return the absolute low fence for descending traversaljava.util.Map.Entry<K,V>ceilingEntry(K key)KceilingKey(K key)java.util.Comparator<? super K>comparator()booleancontainsKey(java.lang.Object key)java.util.Iterator<K>descendingKeyIterator()java.util.NavigableSet<K>descendingKeySet()java.util.NavigableMap<K,V>descendingMap()java.util.Set<java.util.Map.Entry<K,V>>entrySet()java.util.Map.Entry<K,V>firstEntry()KfirstKey()java.util.Map.Entry<K,V>floorEntry(K key)KfloorKey(K key)Vget(java.lang.Object key)java.util.SortedMap<K,V>headMap(K toKey)java.util.NavigableMap<K,V>headMap(K toKey, boolean inclusive)java.util.Map.Entry<K,V>higherEntry(K key)KhigherKey(K key)booleaninClosedRange(java.lang.Object key)booleaninRange(java.lang.Object key)booleaninRange(java.lang.Object key, boolean inclusive)booleanisEmpty()java.util.Iterator<K>keyIterator()java.util.Set<K>keySet()java.util.Map.Entry<K,V>lastEntry()KlastKey()java.util.Map.Entry<K,V>lowerEntry(K key)KlowerKey(K key)java.util.NavigableSet<K>navigableKeySet()java.util.Map.Entry<K,V>pollFirstEntry()java.util.Map.Entry<K,V>pollLastEntry()Vput(K key, V value)Vremove(java.lang.Object key)intsize()IndexedTreeMap.Entry<K,V>subCeiling(K key)IndexedTreeMap.Entry<K,V>subFloor(K key)IndexedTreeMap.Entry<K,V>subHigher(K key)IndexedTreeMap.Entry<K,V>subHighest()IndexedTreeMap.Entry<K,V>subLower(K key)IndexedTreeMap.Entry<K,V>subLowest()java.util.NavigableMap<K,V>subMap(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive)java.util.SortedMap<K,V>subMap(K fromKey, K toKey)java.util.SortedMap<K,V>tailMap(K fromKey)java.util.NavigableMap<K,V>tailMap(K fromKey, boolean inclusive)booleantooHigh(java.lang.Object key)booleantooLow(java.lang.Object key)-
Methods inherited from class java.util.AbstractMap
clear, clone, containsValue, equals, hashCode, putAll, toString, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
m
protected final IndexedTreeMap<K,V> m
The backing map.
-
lo
protected final K lo
Endpoints are represented as triples (fromStart, lo, loInclusive) and (toEnd, hi, hiInclusive). If fromStart is true, then the low (absolute) bound is the start of the backing map, and the other values are ignored. Otherwise, if loInclusive is true, lo is the inclusive bound, else lo is the exclusive bound. Similarly for the upper bound.
-
hi
protected final K hi
Endpoints are represented as triples (fromStart, lo, loInclusive) and (toEnd, hi, hiInclusive). If fromStart is true, then the low (absolute) bound is the start of the backing map, and the other values are ignored. Otherwise, if loInclusive is true, lo is the inclusive bound, else lo is the exclusive bound. Similarly for the upper bound.
-
fromStart
protected final boolean fromStart
-
toEnd
protected final boolean toEnd
-
loInclusive
protected final boolean loInclusive
-
hiInclusive
protected final boolean hiInclusive
-
descendingMapView
protected transient java.util.NavigableMap<K,V> descendingMapView
-
entrySetView
protected transient IndexedTreeMap.NavigableSubMap.EntrySetView entrySetView
-
navigableKeySetView
protected transient de.gsi.dataset.utils.trees.IndexedTreeMap.KeySet<K> navigableKeySetView
-
-
Method Detail
-
comparator
public java.util.Comparator<? super K> comparator()
-
descendingKeyIterator
public java.util.Iterator<K> descendingKeyIterator()
- Returns:
- descending iterator from the perspective of this sub-map
-
keyIterator
public java.util.Iterator<K> keyIterator()
- Returns:
- ascending iterator from the perspective of this sub-map
-
subCeiling
public IndexedTreeMap.Entry<K,V> subCeiling(K key)
-
subFloor
public IndexedTreeMap.Entry<K,V> subFloor(K key)
-
subHigher
public IndexedTreeMap.Entry<K,V> subHigher(K key)
-
subHighest
public IndexedTreeMap.Entry<K,V> subHighest()
-
subLower
public IndexedTreeMap.Entry<K,V> subLower(K key)
-
subLowest
public IndexedTreeMap.Entry<K,V> subLowest()
-
subMap
public java.util.NavigableMap<K,V> subMap(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive)
-
absCeiling
public final IndexedTreeMap.Entry<K,V> absCeiling(K key)
-
absFloor
public final IndexedTreeMap.Entry<K,V> absFloor(K key)
-
absHigher
public final IndexedTreeMap.Entry<K,V> absHigher(K key)
-
absHighest
public final IndexedTreeMap.Entry<K,V> absHighest()
-
absHighFence
public final IndexedTreeMap.Entry<K,V> absHighFence()
Returns the absolute high fence for ascending traversal- Returns:
- entry
-
absLower
public final IndexedTreeMap.Entry<K,V> absLower(K key)
-
absLowest
public final IndexedTreeMap.Entry<K,V> absLowest()
-
absLowFence
public final IndexedTreeMap.Entry<K,V> absLowFence()
Return the absolute low fence for descending traversal- Returns:
- entry
-
ceilingEntry
public final java.util.Map.Entry<K,V> ceilingEntry(K key)
- Specified by:
ceilingEntryin interfacejava.util.NavigableMap<K,V>
-
ceilingKey
public final K ceilingKey(K key)
- Specified by:
ceilingKeyin interfacejava.util.NavigableMap<K,V>
-
containsKey
public final boolean containsKey(java.lang.Object key)
- Specified by:
containsKeyin interfacejava.util.Map<K,V>- Overrides:
containsKeyin classjava.util.AbstractMap<K,V>
-
descendingKeySet
public java.util.NavigableSet<K> descendingKeySet()
- Specified by:
descendingKeySetin interfacejava.util.NavigableMap<K,V>
-
firstEntry
public final java.util.Map.Entry<K,V> firstEntry()
- Specified by:
firstEntryin interfacejava.util.NavigableMap<K,V>
-
firstKey
public final K firstKey()
- Specified by:
firstKeyin interfacejava.util.SortedMap<K,V>
-
floorEntry
public final java.util.Map.Entry<K,V> floorEntry(K key)
- Specified by:
floorEntryin interfacejava.util.NavigableMap<K,V>
-
floorKey
public final K floorKey(K key)
- Specified by:
floorKeyin interfacejava.util.NavigableMap<K,V>
-
get
public final V get(java.lang.Object key)
- Specified by:
getin interfacejava.util.Map<K,V>- Overrides:
getin classjava.util.AbstractMap<K,V>
-
headMap
public final java.util.SortedMap<K,V> headMap(K toKey)
- Specified by:
headMapin interfacejava.util.NavigableMap<K,V>- Specified by:
headMapin interfacejava.util.SortedMap<K,V>
-
higherEntry
public final java.util.Map.Entry<K,V> higherEntry(K key)
- Specified by:
higherEntryin interfacejava.util.NavigableMap<K,V>
-
higherKey
public final K higherKey(K key)
- Specified by:
higherKeyin interfacejava.util.NavigableMap<K,V>
-
inClosedRange
public final boolean inClosedRange(java.lang.Object key)
-
inRange
public final boolean inRange(java.lang.Object key)
-
inRange
public final boolean inRange(java.lang.Object key, boolean inclusive)
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacejava.util.Map<K,V>- Overrides:
isEmptyin classjava.util.AbstractMap<K,V>
-
keySet
public final java.util.Set<K> keySet()
- Specified by:
keySetin interfacejava.util.Map<K,V>- Specified by:
keySetin interfacejava.util.SortedMap<K,V>- Overrides:
keySetin classjava.util.AbstractMap<K,V>
-
lastEntry
public final java.util.Map.Entry<K,V> lastEntry()
- Specified by:
lastEntryin interfacejava.util.NavigableMap<K,V>
-
lastKey
public final K lastKey()
- Specified by:
lastKeyin interfacejava.util.SortedMap<K,V>
-
lowerEntry
public final java.util.Map.Entry<K,V> lowerEntry(K key)
- Specified by:
lowerEntryin interfacejava.util.NavigableMap<K,V>
-
lowerKey
public final K lowerKey(K key)
- Specified by:
lowerKeyin interfacejava.util.NavigableMap<K,V>
-
navigableKeySet
public final java.util.NavigableSet<K> navigableKeySet()
- Specified by:
navigableKeySetin interfacejava.util.NavigableMap<K,V>
-
pollFirstEntry
public final java.util.Map.Entry<K,V> pollFirstEntry()
- Specified by:
pollFirstEntryin interfacejava.util.NavigableMap<K,V>
-
pollLastEntry
public final java.util.Map.Entry<K,V> pollLastEntry()
- Specified by:
pollLastEntryin interfacejava.util.NavigableMap<K,V>
-
put
public final V put(K key, V value)- Specified by:
putin interfacejava.util.Map<K,V>- Overrides:
putin classjava.util.AbstractMap<K,V>
-
remove
public final V remove(java.lang.Object key)
- Specified by:
removein interfacejava.util.Map<K,V>- Overrides:
removein classjava.util.AbstractMap<K,V>
-
size
public int size()
- Specified by:
sizein interfacejava.util.Map<K,V>- Overrides:
sizein classjava.util.AbstractMap<K,V>
-
subMap
public final java.util.SortedMap<K,V> subMap(K fromKey, K toKey)- Specified by:
subMapin interfacejava.util.NavigableMap<K,V>- Specified by:
subMapin interfacejava.util.SortedMap<K,V>
-
tailMap
public final java.util.SortedMap<K,V> tailMap(K fromKey)
- Specified by:
tailMapin interfacejava.util.NavigableMap<K,V>- Specified by:
tailMapin interfacejava.util.SortedMap<K,V>
-
tooHigh
public final boolean tooHigh(java.lang.Object key)
-
tooLow
public final boolean tooLow(java.lang.Object key)
-
-