T - the type of elements represented by columnspublic class ArrayMap<T> extends AbstractMap<Integer,T> implements Serializable
Map backed by an array, where keys are the indices of the array,
and values are the elements of the array.
Modifications to the map (i.e., through put(Integer, Object) and
Map.Entry.setValue(Object)) are reflected to the original array.
However, the map has a fixed length, that is the length of the array.
AbstractMap.SimpleImmutableEntry<K,V>| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(Object key) |
Set<Map.Entry<Integer,T>> |
entrySet() |
boolean |
equals(Object obj) |
T |
get(Object key) |
int |
hashCode() |
static void |
main(String[] args)
Test
|
T |
put(Integer key,
T value) |
int |
size() |
clear, clone, containsValue, isEmpty, keySet, putAll, remove, toString, valuespublic int size()
public boolean containsKey(Object key)
containsKey in interface Map<Integer,T>containsKey in class AbstractMap<Integer,T>public int hashCode()
public boolean equals(Object obj)
public static void main(String[] args)
args - Copyright © 2016. All rights reserved.