de.tuebingen.uni.sfs.germanet.relatedness
Class IntHashMap

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<java.lang.String,java.lang.Integer>
          extended by de.tuebingen.uni.sfs.germanet.relatedness.IntHashMap
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.Integer>

public class IntHashMap
extends java.util.HashMap<java.lang.String,java.lang.Integer>

Same as java.util.HashMap, but allows for a check for existing entries before adding a new key-value pair.

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
IntHashMap()
           
 
Method Summary
 java.lang.Integer putCumulative(java.lang.String key, java.lang.Integer value)
          Puts a new key-value pair into the map; adds value to previous value if entry already exists.
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

IntHashMap

public IntHashMap()
Method Detail

putCumulative

public java.lang.Integer putCumulative(java.lang.String key,
                                       java.lang.Integer value)
Puts a new key-value pair into the map; adds value to previous value if entry already exists.

Parameters:
key - The entry to add.
value - The value to add.
Returns:
the previous value associated with key, or null if there was no mapping for key.