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
ConstructorDescriptionConstructs 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 TypeMethodDescriptionvoid
addMapListener
(ILcdMapListener<K, V> aMapListener) Register the listeneraMapListener
to be informed about changes in this map.void
clear()
clone()
Returns a shallow copy of thisTLcdHashMap
instance.boolean
containsKey
(Object aKey) boolean
containsValue
(Object aValue) entrySet()
boolean
int
hashCode()
boolean
isEmpty()
keySet()
void
void
removeMapListener
(ILcdMapListener<K, V> aMapListener) Unregister the listeneraMapListener
so it will no longer be informed about changes in this map.int
size()
values()
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods 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:
containsKey
in interfaceMap<K,
V>
-
containsValue
- Specified by:
containsValue
in 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:ILcdMap
Register the listener
aMapListener
to be informed about changes in this map.- Specified by:
addMapListener
in interfaceILcdMap<K,
V> - Parameters:
aMapListener
- the listener- See Also:
-
removeMapListener
Description copied from interface:ILcdMap
Unregister the listener
aMapListener
so it will no longer be informed about changes in this map.This method should do nothing when
addMapListener
was not registered previously.- Specified by:
removeMapListener
in interfaceILcdMap<K,
V> - Parameters:
aMapListener
- the listener- See Also:
-
clone
Returns a shallow copy of thisTLcdHashMap
instance. (The keys and values themselves are not cloned.). The returned Map will have no listeners attached to it.
-