|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.uima.internal.util.StringToIntMap
public class StringToIntMap
Straightforward, many-to-one map from Strings to ints, based on a Java
HashMap
.
Constructor Summary | |
---|---|
StringToIntMap()
Constructor. |
Method Summary | |
---|---|
boolean |
containsKey(java.lang.String key)
Check if the the argument string is defined as a key in this map. |
int |
get(java.lang.String key)
Get the value for the key. |
int |
put(java.lang.String key,
int value)
Add a key-value pair to the map. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringToIntMap()
Object.Object()
Method Detail |
---|
public boolean containsKey(java.lang.String key)
key
- The string to be looked up.
true
if a value is defined for this string; false
else.Map.containsKey(java.lang.Object)
public int get(java.lang.String key)
key
- The string to be looked up.
key
, or 0
if key
is not
a key in the map. Use containsKey()
to find out if
key
is actually defined in the map.public int put(java.lang.String key, int value)
key
- The string key.value
- The int value.
key
, if it was set. 0
else.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |