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.RangeMap
that deals withMap.Entry
s.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
fromInclusive
Whether or not the 'from' is inclusive.private K
fromKey
The key to start from, null if the beginning.private boolean
toInclusive
Whether or not the 'to' is inclusive.private K
toKey
The key to end at, null if till the end.
-
Constructor Summary
Constructors Modifier Constructor Description protected
RangeEntryMap(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive)
Creates aAbstractPatriciaTrie.RangeEntryMap
.protected
RangeEntryMap(K fromKey, K toKey)
Creates aAbstractPatriciaTrie.RangeEntryMap
with 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
.K
firstKey()
K
getFromKey()
Returns the FROM Key.K
getToKey()
Returns the TO Key.boolean
isFromInclusive()
Whether or not theAbstractPatriciaTrie.RangeMap.getFromKey()
is in the range.boolean
isToInclusive()
Whether or not theAbstractPatriciaTrie.RangeMap.getToKey()
is in the range.K
lastKey()
-
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.RangeEntryMap
with 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.RangeMap
Creates and returns anAbstractPatriciaTrie.RangeMap.entrySet()
view of theAbstractPatriciaTrie.RangeMap
.- Specified by:
createEntrySet
in classAbstractPatriciaTrie.RangeMap
-
getFromKey
public K getFromKey()
Description copied from class:AbstractPatriciaTrie.RangeMap
Returns the FROM Key.- Specified by:
getFromKey
in classAbstractPatriciaTrie.RangeMap
-
getToKey
public K getToKey()
Description copied from class:AbstractPatriciaTrie.RangeMap
Returns the TO Key.- Specified by:
getToKey
in classAbstractPatriciaTrie.RangeMap
-
isFromInclusive
public boolean isFromInclusive()
Description copied from class:AbstractPatriciaTrie.RangeMap
Whether or not theAbstractPatriciaTrie.RangeMap.getFromKey()
is in the range.- Specified by:
isFromInclusive
in classAbstractPatriciaTrie.RangeMap
-
isToInclusive
public boolean isToInclusive()
Description copied from class:AbstractPatriciaTrie.RangeMap
Whether or not theAbstractPatriciaTrie.RangeMap.getToKey()
is in the range.- Specified by:
isToInclusive
in classAbstractPatriciaTrie.RangeMap
-
createRangeMap
protected java.util.SortedMap<K,V> createRangeMap(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive)
Description copied from class:AbstractPatriciaTrie.RangeMap
Creates and returns a sub-range view of the currentAbstractPatriciaTrie.RangeMap
.- Specified by:
createRangeMap
in classAbstractPatriciaTrie.RangeMap
-
-