Package jpa.tools.swing
Class IndexedMap<K,V>
- java.lang.Object
-
- jpa.tools.swing.IndexedMap<K,V>
-
- Type Parameters:
K
-V
-
- All Implemented Interfaces:
java.util.Map<K,V>
public class IndexedMap<K,V> extends java.lang.Object implements java.util.Map<K,V>
A map with indexed access. The keys are indexed in their order of insertion. The index of a given key is stable. It never changes unless the map is cleared. Onremove(k)
, the key is not removed, but its value is nullified. ThenindexOf(k)
will return-1
.- Author:
- Pinaki Poddar
-
-
Constructor Summary
Constructors Constructor Description IndexedMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
containsKey(java.lang.Object key)
boolean
containsValue(java.lang.Object value)
java.util.Set<java.util.Map.Entry<K,V>>
entrySet()
Not supported.V
get(java.lang.Object key)
int
indexOf(java.lang.Object key)
boolean
isEmpty()
java.util.Set<K>
keySet()
V
put(K key, V value)
void
putAll(java.util.Map<? extends K,? extends V> m)
V
remove(java.lang.Object key)
int
size()
java.util.Collection<V>
values()
-
-
-
Method Detail
-
containsKey
public boolean containsKey(java.lang.Object key)
-
containsValue
public boolean containsValue(java.lang.Object value)
-
values
public java.util.Collection<V> values()
-
indexOf
public int indexOf(java.lang.Object key)
-
-