private class AbstractPatriciaTrie.PrefixRangeMap extends AbstractPatriciaTrie.RangeMap
Trie.| Modifier and Type | Field and Description |
|---|---|
private int |
expectedModCount |
private K |
fromKey |
private int |
lengthInBits |
private int |
offsetInBits |
private K |
prefix |
private int |
size |
private K |
toKey |
| Modifier | Constructor and Description |
|---|---|
private |
PrefixRangeMap(K prefix,
int offsetInBits,
int lengthInBits)
Creates a
AbstractPatriciaTrie.PrefixRangeMap. |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Set<java.util.Map.Entry<K,V>> |
createEntrySet()
Creates and returns an
AbstractPatriciaTrie.RangeMap.entrySet() view of the AbstractPatriciaTrie.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 current
AbstractPatriciaTrie.RangeMap. |
K |
firstKey() |
private int |
fixup()
This method does two things.
|
K |
getFromKey()
Returns the FROM Key.
|
K |
getToKey()
Returns the TO Key.
|
protected boolean |
inFromRange(K key,
boolean forceInclusive)
Returns true if the provided Key is in the FROM range of the
AbstractPatriciaTrie.PrefixRangeMap. |
protected boolean |
inRange(K key)
Returns true if this
AbstractPatriciaTrie.PrefixRangeMap's key is a prefix of the provided key. |
protected boolean |
inRange2(K key)
Same as
inRange(Object). |
protected boolean |
inToRange(K key,
boolean forceInclusive)
Returns true if the provided Key is in the TO range of the
AbstractPatriciaTrie.PrefixRangeMap. |
boolean |
isFromInclusive()
Whether or not the
AbstractPatriciaTrie.RangeMap.getFromKey() is in the range. |
boolean |
isToInclusive()
Whether or not the
AbstractPatriciaTrie.RangeMap.getToKey() is in the range. |
K |
lastKey() |
comparator, containsKey, entrySet, get, headMap, put, remove, subMap, tailMapclear, clone, containsValue, equals, hashCode, isEmpty, keySet, putAll, size, toString, valuesprivate final K prefix
private final int offsetInBits
private final int lengthInBits
private K fromKey
private K toKey
private transient int expectedModCount
private int size
private PrefixRangeMap(K prefix, int offsetInBits, int lengthInBits)
AbstractPatriciaTrie.PrefixRangeMap.private int fixup()
AbstractPatriciaTrie.PrefixRangeMap and the number
of elements in the range. This method must be called every
time the Trie has changed.public K firstKey()
public K lastKey()
protected boolean inRange(K key)
AbstractPatriciaTrie.PrefixRangeMap's key is a prefix of the provided key.inRange in class AbstractPatriciaTrie.RangeMapprotected boolean inRange2(K key)
inRange(Object).inRange2 in class AbstractPatriciaTrie.RangeMapprotected boolean inFromRange(K key, boolean forceInclusive)
AbstractPatriciaTrie.PrefixRangeMap.inFromRange in class AbstractPatriciaTrie.RangeMapprotected boolean inToRange(K key, boolean forceInclusive)
AbstractPatriciaTrie.PrefixRangeMap.inToRange in class AbstractPatriciaTrie.RangeMapprotected java.util.Set<java.util.Map.Entry<K,V>> createEntrySet()
AbstractPatriciaTrie.RangeMapAbstractPatriciaTrie.RangeMap.entrySet() view of the AbstractPatriciaTrie.RangeMap.createEntrySet in class AbstractPatriciaTrie.RangeMappublic K getFromKey()
AbstractPatriciaTrie.RangeMapgetFromKey in class AbstractPatriciaTrie.RangeMappublic K getToKey()
AbstractPatriciaTrie.RangeMapgetToKey in class AbstractPatriciaTrie.RangeMappublic boolean isFromInclusive()
AbstractPatriciaTrie.RangeMapAbstractPatriciaTrie.RangeMap.getFromKey() is in the range.isFromInclusive in class AbstractPatriciaTrie.RangeMappublic boolean isToInclusive()
AbstractPatriciaTrie.RangeMapAbstractPatriciaTrie.RangeMap.getToKey() is in the range.isToInclusive in class AbstractPatriciaTrie.RangeMapprotected java.util.SortedMap<K,V> createRangeMap(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive)
AbstractPatriciaTrie.RangeMapAbstractPatriciaTrie.RangeMap.createRangeMap in class AbstractPatriciaTrie.RangeMap