Platform SDK Java 8.5 API Reference

com.genesyslab.platform.commons.util
Class DeepHashMap<K,V>

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<K,V>
          extended by com.genesyslab.platform.commons.util.DeepHashMap<K,V>
Type Parameters:
K - key type.
V - value type.
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<K,V>

public class DeepHashMap<K,V>
extends java.util.HashMap<K,V>

Used to fix the comparison and hashCode calculation if map contains any array items.
Note: it removes key if value is null.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
DeepHashMap()
           
DeepHashMap(int initialCapacity)
           
DeepHashMap(int initialCapacity, float loadFactor)
           
DeepHashMap(java.util.Map<? extends K,? extends V> m)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 V put(K key, V value)
           
 void putAbsolutlyAll(java.util.Map<? extends K,? extends V> m)
          Puts all (also keys with null value).
 void putAll(java.util.Map<? extends K,? extends V> m)
          Put all keys with not null value.
 V putNullValue(K key)
          Puts key with null value.
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, remove, size, values
 
Methods inherited from class java.util.AbstractMap
toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeepHashMap

public DeepHashMap()

DeepHashMap

public DeepHashMap(int initialCapacity)

DeepHashMap

public DeepHashMap(java.util.Map<? extends K,? extends V> m)

DeepHashMap

public DeepHashMap(int initialCapacity,
                   float loadFactor)
Method Detail

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in interface java.util.Map<K,V>
Overrides:
equals in class java.util.AbstractMap<K,V>

hashCode

public int hashCode()
Specified by:
hashCode in interface java.util.Map<K,V>
Overrides:
hashCode in class java.util.AbstractMap<K,V>

put

public V put(K key,
             V value)
Specified by:
put in interface java.util.Map<K,V>
Overrides:
put in class java.util.HashMap<K,V>

putAll

public void putAll(java.util.Map<? extends K,? extends V> m)
Put all keys with not null value.

Specified by:
putAll in interface java.util.Map<K,V>
Overrides:
putAll in class java.util.HashMap<K,V>

putNullValue

public V putNullValue(K key)
Puts key with null value.

Parameters:
key -
Returns:
old value stored with the specified key.

putAbsolutlyAll

public void putAbsolutlyAll(java.util.Map<? extends K,? extends V> m)
Puts all (also keys with null value).

Parameters:
m -

Platform SDK Java 8.5 API Reference

Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.