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 voidclear()booleancontainsKey(java.lang.Object key)booleancontainsValue(java.lang.Object value)java.util.Set<java.util.Map.Entry<K,V>>entrySet()Not supported.Vget(java.lang.Object key)intindexOf(java.lang.Object key)booleanisEmpty()java.util.Set<K>keySet()Vput(K key, V value)voidputAll(java.util.Map<? extends K,? extends V> m)Vremove(java.lang.Object key)intsize()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)
-
-