|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
K
- the type of keys maintained by this map.V
- the type of mapped values.public interface OrderedMap<K,V>
An extension to ConcurrentMap
providing key and entry sets and a
value collection, as well as key, entry and value lists, maintaining the
definition order of map entries.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Method Summary | |
---|---|
boolean |
add(K key,
V value)
Associates the specified value with the specified key at the end of this map if not already mapped. |
boolean |
addAt(int index,
K key,
V value)
Associates the specified value with the specified key at the specified index in this map if not already mapped. |
List<Map.Entry<K,V>> |
entryList()
Returns an ordered list of mapped entries. |
OrderedSet<Map.Entry<K,V>> |
entrySet()
Returns an ordered set of mapped entries. |
V |
get(int index)
Gets the indexed value in this map. |
Map.Entry<K,V> |
getEntryAt(int index)
Gets the indexed entry in this map. |
K |
getKeyAt(int index)
Gets the indexed key in this map. |
int |
indexOfKey(Object key)
Returns the index of the specified key, or -1 if not found. |
boolean |
isModifiable()
Checks whether this map is modifiable. |
List<K> |
keyList()
Returns an ordered list of mapped keys. |
OrderedSet<K> |
keySet()
Returns an ordered set of mapped keys. |
V |
put(int index,
K key,
V value)
Associates the specified value with the specified key at the specified index in this map. |
void |
putAll(int index,
Map<? extends K,? extends V> map)
Copies all of the mappings from the specified map to this map starting from the specified index. |
V |
putIfAbsent(int index,
K key,
V value)
Associates the specified value with the specified key at the specified index in this map if not already mapped. |
Map.Entry<K,V> |
removeAt(int index)
Removes the indexed element in this map. |
V |
replace(int index,
V value)
Replaces the indexed element in this map. |
Map.Entry<K,V> |
set(int index,
K key,
V value)
Associates the specified value with the specified key at the specified index in this map. |
Map.Entry<K,V> |
shift(int index,
K key,
V value)
Associates the specified value with the specified key at the specified index in this map if already mapped. |
List<V> |
valueList()
Returns an ordered list of mapped values. |
Collection<V> |
values()
Returns an ordered collection of mapped values. |
Methods inherited from interface java.util.concurrent.ConcurrentMap |
---|
putIfAbsent, remove, replace, replace |
Methods inherited from interface java.util.Map |
---|
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, put, putAll, remove, size |
Method Detail |
---|
boolean isModifiable()
int indexOfKey(Object key)
key
- the key.
K getKeyAt(int index)
index
- the index.
IndexOutOfBoundsException
- if the index is out of range.V get(int index)
index
- the index.
IndexOutOfBoundsException
- if the index is out of range.Map.Entry<K,V> getEntryAt(int index)
index
- the index.
IndexOutOfBoundsException
- if the index is out of range.V put(int index, K key, V value)
index
- the index.key
- the key with which the specified value is to be associated.value
- the value to be associated with the specified key.
IndexOutOfBoundsException
- if the index is out of range.V putIfAbsent(int index, K key, V value)
index
- the index.key
- the key with which the specified value is to be associated.value
- the value to be associated with the specified key.
void putAll(int index, Map<? extends K,? extends V> map)
index
- the index.map
- mappings to be stored in this mapMap.Entry<K,V> set(int index, K key, V value)
index
- the index.key
- the key with which the specified value is to be associated.value
- the value to be associated with the specified key.
IndexOutOfBoundsException
- if the index is out of range.Map.Entry<K,V> shift(int index, K key, V value)
index
- the index.key
- the key with which the specified value is to be associated.value
- the value to be associated with the specified key.
IndexOutOfBoundsException
- if the index is out of range.boolean add(K key, V value)
key
- the key with which the specified value is to be associated.value
- the value to be associated with the specified key.
boolean addAt(int index, K key, V value)
index
- the index.key
- the key with which the specified value is to be associated.value
- the value to be associated with the specified key.
V replace(int index, V value)
index
- the index.value
- the new value.
IndexOutOfBoundsException
- if the index is out of range.Map.Entry<K,V> removeAt(int index)
index
- the index.
IndexOutOfBoundsException
- if the index is out of range.OrderedSet<K> keySet()
keySet
in interface Map<K,V>
Collection<V> values()
values
in interface Map<K,V>
OrderedSet<Map.Entry<K,V>> entrySet()
entrySet
in interface Map<K,V>
List<K> keyList()
List<V> valueList()
List<Map.Entry<K,V>> entryList()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |