Class AbstractPatriciaTrie.RangeEntryMap
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- org.apache.commons.collections4.trie.AbstractPatriciaTrie.RangeMap
-
- org.apache.commons.collections4.trie.AbstractPatriciaTrie.RangeEntryMap
-
- All Implemented Interfaces:
java.util.Map<K,V>,java.util.SortedMap<K,V>
- Enclosing class:
- AbstractPatriciaTrie<K,V>
private class AbstractPatriciaTrie.RangeEntryMap extends AbstractPatriciaTrie.RangeMap
AAbstractPatriciaTrie.RangeMapthat deals withMap.Entrys.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanfromInclusiveWhether or not the 'from' is inclusive.private KfromKeyThe key to start from, null if the beginning.private booleantoInclusiveWhether or not the 'to' is inclusive.private KtoKeyThe key to end at, null if till the end.
-
Constructor Summary
Constructors Modifier Constructor Description protectedRangeEntryMap(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive)Creates aAbstractPatriciaTrie.RangeEntryMap.protectedRangeEntryMap(K fromKey, K toKey)Creates aAbstractPatriciaTrie.RangeEntryMapwith the fromKey included and the toKey excluded from the range.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Set<java.util.Map.Entry<K,V>>createEntrySet()Creates and returns anAbstractPatriciaTrie.RangeMap.entrySet()view of theAbstractPatriciaTrie.RangeMap.protected java.util.SortedMap<K,V>createRangeMap(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive)Creates and returns a sub-range view of the currentAbstractPatriciaTrie.RangeMap.KfirstKey()KgetFromKey()Returns the FROM Key.KgetToKey()Returns the TO Key.booleanisFromInclusive()Whether or not theAbstractPatriciaTrie.RangeMap.getFromKey()is in the range.booleanisToInclusive()Whether or not theAbstractPatriciaTrie.RangeMap.getToKey()is in the range.KlastKey()-
Methods inherited from class org.apache.commons.collections4.trie.AbstractPatriciaTrie.RangeMap
comparator, containsKey, entrySet, get, headMap, inFromRange, inRange, inRange2, inToRange, put, remove, subMap, tailMap
-
Methods inherited from class java.util.AbstractMap
clear, clone, containsValue, equals, hashCode, isEmpty, keySet, putAll, size, toString, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
fromKey
private final K fromKey
The key to start from, null if the beginning.
-
toKey
private final K toKey
The key to end at, null if till the end.
-
fromInclusive
private final boolean fromInclusive
Whether or not the 'from' is inclusive.
-
toInclusive
private final boolean toInclusive
Whether or not the 'to' is inclusive.
-
-
Constructor Detail
-
RangeEntryMap
protected RangeEntryMap(K fromKey, K toKey)
Creates aAbstractPatriciaTrie.RangeEntryMapwith the fromKey included and the toKey excluded from the range.
-
RangeEntryMap
protected RangeEntryMap(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive)
Creates aAbstractPatriciaTrie.RangeEntryMap.
-
-
Method Detail
-
firstKey
public K firstKey()
-
lastKey
public K lastKey()
-
createEntrySet
protected java.util.Set<java.util.Map.Entry<K,V>> createEntrySet()
Description copied from class:AbstractPatriciaTrie.RangeMapCreates and returns anAbstractPatriciaTrie.RangeMap.entrySet()view of theAbstractPatriciaTrie.RangeMap.- Specified by:
createEntrySetin classAbstractPatriciaTrie.RangeMap
-
getFromKey
public K getFromKey()
Description copied from class:AbstractPatriciaTrie.RangeMapReturns the FROM Key.- Specified by:
getFromKeyin classAbstractPatriciaTrie.RangeMap
-
getToKey
public K getToKey()
Description copied from class:AbstractPatriciaTrie.RangeMapReturns the TO Key.- Specified by:
getToKeyin classAbstractPatriciaTrie.RangeMap
-
isFromInclusive
public boolean isFromInclusive()
Description copied from class:AbstractPatriciaTrie.RangeMapWhether or not theAbstractPatriciaTrie.RangeMap.getFromKey()is in the range.- Specified by:
isFromInclusivein classAbstractPatriciaTrie.RangeMap
-
isToInclusive
public boolean isToInclusive()
Description copied from class:AbstractPatriciaTrie.RangeMapWhether or not theAbstractPatriciaTrie.RangeMap.getToKey()is in the range.- Specified by:
isToInclusivein classAbstractPatriciaTrie.RangeMap
-
createRangeMap
protected java.util.SortedMap<K,V> createRangeMap(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive)
Description copied from class:AbstractPatriciaTrie.RangeMapCreates and returns a sub-range view of the currentAbstractPatriciaTrie.RangeMap.- Specified by:
createRangeMapin classAbstractPatriciaTrie.RangeMap
-
-