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

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

public class LongHashMap
extends java.util.HashMap<java.lang.String,java.lang.Long>

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
LongHashMap()
           
 
Method Summary
 java.lang.Long putCumulative(java.lang.String key, java.lang.Long 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

LongHashMap

public LongHashMap()
Method Detail

putCumulative

public java.lang.Long putCumulative(java.lang.String key,
                                    java.lang.Long 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.