K
- The key typeV
- the value typepublic class ArrayMap<K,V> extends Object implements Collection<K>, Sortable<K>
Constructor and Description |
---|
ArrayMap(int initialCapacity) |
ArrayMap(List<K> keys,
List<V> values)
Note that the keys and values are not copied.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(K o) |
boolean |
addAll(Collection<? extends K> c) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
V |
get(K key) |
K |
getKey(int index) |
List<K> |
getKeys() |
V |
getValue(int index) |
List<V> |
getValues() |
boolean |
isEmpty() |
Iterator<K> |
iterator() |
void |
put(K key,
V value) |
boolean |
remove(Object key) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
int |
size() |
void |
sort(Comparator<K> comparator)
Sorts collection of elements represented by this sortable according
to the specified comparator.
|
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode
public boolean remove(Object key)
remove
in interface Collection<K>
public void clear()
clear
in interface Collection<K>
public int size()
size
in interface Collection<K>
public boolean isEmpty()
isEmpty
in interface Collection<K>
public boolean contains(Object o)
contains
in interface Collection<K>
public Object[] toArray()
toArray
in interface Collection<K>
public <T> T[] toArray(T[] a)
toArray
in interface Collection<K>
public boolean add(K o)
add
in interface Collection<K>
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<K>
public boolean addAll(Collection<? extends K> c)
addAll
in interface Collection<K>
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<K>
public boolean retainAll(Collection<?> c)
retainAll
in interface Collection<K>
public K getKey(int index)
public V getValue(int index)
public void sort(Comparator<K> comparator)
Sortable
Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.