public class Map<K,V> extends OrderedMap<K,V>
Modifier and Type | Field and Description |
---|---|
(package private) java.util.Vector<V> |
elements |
(package private) V[] |
elementsSealed |
(package private) java.util.Vector<K> |
keys |
(package private) K[] |
keysSealed |
(package private) boolean |
sealed |
Constructor and Description |
---|
Map() |
Map(int sizeHint) |
Map(K[] keysSealed,
V[] elementsSealed) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
contains(java.lang.Object value) |
boolean |
containsKey(java.lang.Object key)
Whether or not the key is bound in this map
|
V |
elementAt(int index) |
java.util.Enumeration |
elements() |
V |
get(java.lang.Object key) |
private int |
getIndex(K key) |
int |
indexOfKey(K key) |
boolean |
isEmpty() |
java.lang.Object |
keyAt(int index) |
java.util.Enumeration |
keys() |
V |
put(K key,
V value)
Places the key/value pair in this map.
|
V |
remove(java.lang.Object key)
Removes any mapping from the given key
|
void |
removeAt(int i) |
void |
reset()
Removes all keys and values from this map.
|
void |
seal() |
int |
size() |
java.lang.String |
toString() |
containsValue, entrySet, forEach, getOrDefault, keySet, removeEldestEntry, replaceAll, values
clone, compute, computeIfAbsent, computeIfPresent, merge, putAll, putIfAbsent, remove, replace, replace
java.util.Vector<K> keys
java.util.Vector<V> elements
boolean sealed
K[] keysSealed
V[] elementsSealed
public V put(K key, V value)
public int size()
public V get(java.lang.Object key)
public V remove(java.lang.Object key)
public void reset()
public boolean containsKey(java.lang.Object key)
private int getIndex(K key)
public void clear()
public V elementAt(int index)
public java.util.Enumeration elements()
public int indexOfKey(K key)
public java.lang.Object keyAt(int index)
public java.util.Enumeration keys()
public void removeAt(int i)
public java.lang.String toString()
toString
in class OrderedMap<K,V>
public boolean isEmpty()
public boolean contains(java.lang.Object value)
public void seal()