|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ikrs.util.KeyValuePair<K,V>
public class KeyValuePair<K,V>
A very simple key-value-pair implementation.
Constructor Summary | |
---|---|
KeyValuePair(K key,
V value)
Construct a new key-value-pair. |
Method Summary | |
---|---|
K |
getKey()
Get the key from this pair. |
V |
getValue()
Get the value from this pair. |
static KeyValuePair<java.lang.String,java.lang.String> |
splitLine(java.lang.String line,
java.lang.String separator,
boolean trim)
This method splits the given string into a key-value tuple using the passed separator. |
java.lang.String |
toString()
Converts this key-value-pair into a human readable form. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public KeyValuePair(K key, V value)
key
- The key (may be null).value
- The value (may be null).Method Detail |
---|
public K getKey()
public V getValue()
public java.lang.String toString()
toString
in class java.lang.Object
public static KeyValuePair<java.lang.String,java.lang.String> splitLine(java.lang.String line, java.lang.String separator, boolean trim)
line
- The line to split.separator
- The separator string that separates the key and its value.trim
- If set to true the method will trim keys and values (remove whitespace from
the begining and end).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |