public class DigitLookupMap<V> extends Object implements SimpleMap<V>
| Constructor and Description |
|---|
DigitLookupMap() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
assertValidGetKey(String key) |
protected static void |
assertValidKey(String key) |
protected static void |
assertValidPutKey(String key) |
void |
debug(PrintStream out)
Prints out a dump of the hierarchy of this AddressTree
to the specified PrintStream.
|
V |
get(String key)
Returns the value to which this map maps the specified key.
|
V |
put(String key,
V value)
Associates the value with the key in this map.
|
int |
size()
Returns the number of key-value mappings in this map.
|
protected static int |
toNodeArrayIndex(char c)
Returns the node array index of the character for 0-9, or 10 for the '*'
character.
|
public int size()
public V get(String key) throws IllegalArgumentException
SimpleMapget in interface SimpleMap<V>key - The key whose associated value is to be returned.IllegalArgumentException - Thrown if the key or value is not validpublic V put(String key, V value) throws IllegalArgumentException
put in interface SimpleMap<V>key - The key with which the specified value is to be associated.
Null keys are not permitted and will throw a NullPointerException.value - The value to be associated with the specified key.IllegalArgumentException - Thrown if the key or value is not validprotected static void assertValidKey(String key) throws NullPointerException, IllegalArgumentException
protected static void assertValidGetKey(String key) throws NullPointerException, IllegalArgumentException
protected static void assertValidPutKey(String key) throws NullPointerException, IllegalArgumentException
protected static int toNodeArrayIndex(char c)
public void debug(PrintStream out)
Copyright © 2012-2015 Cloudhopper by Twitter. All Rights Reserved.