Package org.apache.uima.internal.util
Class StringToIntMap
java.lang.Object
org.apache.uima.internal.util.StringToIntMap
Straightforward, many-to-one map from Strings to ints, based on a Java
HashMap
.-
Constructor Summary
-
Method Summary
-
Constructor Details
-
StringToIntMap
public StringToIntMap()Constructor.- See Also:
-
-
Method Details
-
containsKey
Check if the the argument string is defined as a key in this map.- Parameters:
key
- The string to be looked up.- Returns:
true
if a value is defined for this string;false
else.- See Also:
-
get
Get the value for the key.- Parameters:
key
- The string to be looked up.- Returns:
- The int value for
key
, or0
ifkey
is not a key in the map. UsecontainsKey()
to find out ifkey
is actually defined in the map.
-
put
Add a key-value pair to the map.- Parameters:
key
- The string key.value
- The int value.- Returns:
- The previous value of
key
, if it was set.0
else.
-