K1
- the first key typeK2
- the second key typeV
- the value typepublic class TwoDHashMap<K1,K2,V> extends Object
HashMap
Constructor and Description |
---|
TwoDHashMap()
Constructs a new TwoDHashMap.
|
TwoDHashMap(HashMap<K1,HashMap<K2,V>> map)
Constructs a new TwoDHashMap using the supplied map.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(K1 firstKey,
K2 secondKey)
Existence check of a value (or null) mapped to the keys.
|
V |
get(K1 firstKey,
K2 secondKey)
Fetch a value from the Hashmap .
|
Set<K1> |
keySet()
Returns a set of the keys of the outermost map.
|
Object |
set(K1 firstKey,
K2 secondKey,
V value)
Insert a value
|
int |
size()
Returns the number of key-value mappings in this map for the first key.
|
int |
size(K1 firstKey)
Returns the number of key-value mappings in this map for the second key.
|
public boolean containsKey(K1 firstKey, K2 secondKey)
firstKey
- first keysecondKey
- second keypublic V get(K1 firstKey, K2 secondKey)
firstKey
- first keysecondKey
- second keypublic Object set(K1 firstKey, K2 secondKey, V value)
firstKey
- first keysecondKey
- second keyvalue
- the value to be inserted. null may be inserted as well.public int size()
public int size(K1 firstKey)
firstKey
- the first keyCopyright © 2007–2015 Super CSV. All rights reserved.