|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectprocope.data.StringToIntMapper
public class StringToIntMapper
Maps strings to integers. Same strings will always return the same integer values, the mapping is case-insensitive.
Constructor Summary | |
---|---|
StringToIntMapper()
Creates a new string to int mapper. |
Method Summary | |
---|---|
int |
getIntID(String str)
Gets the integer ID for a given string |
int |
getItemCount()
Returns the number of registered strings in this mapper. |
String |
getStringID(int protID)
Returns the string associated with an integer ID. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringToIntMapper()
Method Detail |
---|
public int getIntID(String str)
str
- string to be mapped
public String getStringID(int protID)
protID
-
null
if this ID not used yet.public int getItemCount()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |