org.xbill.DNS.utils
Class StringValueTable
java.lang.Object
|
+--org.xbill.DNS.utils.StringValueTable
- public class StringValueTable
- extends Object
A table used for storing mappings between Strings and constant values
and lookups in either direction.
|
Method Summary |
String |
getString(int v)
Finds the String associated with the given value |
int |
getValue(String s)
Finds the value associated with the given String |
void |
put2(int v,
String s)
Adds a new String/value pair |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
StringValueTable
public StringValueTable()
put2
public void put2(int v,
String s)
- Adds a new String/value pair
- Parameters:
v - The values - The string
getString
public String getString(int v)
- Finds the String associated with the given value
- Parameters:
v - The value- Returns:
- The corresponding String, or null if there is none
getValue
public int getValue(String s)
- Finds the value associated with the given String
- Parameters:
s - The String- Returns:
- The corresponding value, or -1 if there is none