Package com.luciad.util.collections
Class TLcdHashMap<K,V>
java.lang.Object
com.luciad.util.collections.TLcdHashMap<K,V>
- Since:
- 10.0
-
Nested Class Summary
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs an empty map with an initial capacity of ten.TLcdHashMap(int aInitialCapacity) Constructs an empty map with the specified initial capacity. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMapListener(ILcdMapListener<K, V> aMapListener) Register the listeneraMapListenerto be informed about changes in this map.voidclear()clone()Returns a shallow copy of thisTLcdHashMapinstance.booleancontainsKey(Object aKey) booleancontainsValue(Object aValue) entrySet()booleaninthashCode()booleanisEmpty()keySet()voidvoidremoveMapListener(ILcdMapListener<K, V> aMapListener) Unregister the listeneraMapListenerso it will no longer be informed about changes in this map.intsize()values()Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
TLcdHashMap
public TLcdHashMap()Constructs an empty map with an initial capacity of ten. -
TLcdHashMap
public TLcdHashMap(int aInitialCapacity) Constructs an empty map with the specified initial capacity.- Parameters:
aInitialCapacity- the initial capacity of the map- Throws:
IllegalArgumentException- if the specified initical capacity is negative
-
-
Method Details
-
put
-
putAll
-
remove
-
clear
public void clear() -
containsKey
- Specified by:
containsKeyin interfaceMap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V>
-
entrySet
-
equals
-
get
-
hashCode
public int hashCode() -
isEmpty
public boolean isEmpty() -
keySet
-
size
public int size() -
values
-
addMapListener
Description copied from interface:ILcdMapRegister the listener
aMapListenerto be informed about changes in this map.- Specified by:
addMapListenerin interfaceILcdMap<K,V> - Parameters:
aMapListener- the listener- See Also:
-
removeMapListener
Description copied from interface:ILcdMapUnregister the listener
aMapListenerso it will no longer be informed about changes in this map.This method should do nothing when
addMapListenerwas not registered previously.- Specified by:
removeMapListenerin interfaceILcdMap<K,V> - Parameters:
aMapListener- the listener- See Also:
-
clone
Returns a shallow copy of thisTLcdHashMapinstance. (The keys and values themselves are not cloned.). The returned Map will have no listeners attached to it.
-