|
Configuration Platform SDK 7.6 API Reference | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.genesyslab.platform.commons.collections.KVList
com.genesyslab.platform.commons.collections.KeyValueCollection
A key-value list created from an ordered collection of key-value pairs.
Nulls are not accepted either as a key or as a value.
Keys are not required to be unique and getters will return the
first encountered value for the key.
Use getEnumeration(String)
if you need all pairs
with the given key.
This list supports String keys only. Values can be:
Nested Class Summary |
Nested classes inherited from class com.genesyslab.platform.commons.collections.KVList |
KVList.PairList |
Constructor Summary | |
KeyValueCollection()
Create new empty list. |
Method Summary | |
void |
addList(java.lang.String key,
KeyValueCollection list)
Add TKV list to this list under specified key. |
void |
addObject(java.lang.String key,
java.lang.Object value)
Add supported value to this list with specified key. |
void |
addPair(KeyValuePair pair)
Add TKV pair to the list. |
KeyValueCollection |
getList(java.lang.String key)
Return list value stored with specified key. |
KeyValuePair |
getPair(java.lang.String key)
Return TKV pair stored with specified key. |
KeyValuePair |
remove(java.lang.String key)
Removes the pair with the specified String key from this list. |
java.lang.String |
toString()
|
java.lang.String |
toStringLine()
|
Methods inherited from class com.genesyslab.platform.commons.collections.KVList |
add, addAll, addBinary, addInt, addInt, addString, addUTFString, clear, clone, contains, containsAll, containsKey, equals, getBinary, getEnumeration, getEnumeration, getInt, getString, isEmpty, iterator, length, remove, removeAll, retainAll, size, toArray, toArray |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Collection |
hashCode |
Constructor Detail |
public KeyValueCollection()
Method Detail |
public void addPair(KeyValuePair pair)
pair
- TKV valuepublic KeyValuePair getPair(java.lang.String key)
key
- key of the pair
public KeyValuePair remove(java.lang.String key)
key
- the key of the pair to be removed
public void addList(java.lang.String key, KeyValueCollection list)
key
- the key of the list to be addedlist
- the list to addpublic KeyValueCollection getList(java.lang.String key)
key
- the key of the value
public void addObject(java.lang.String key, java.lang.Object value) throws java.lang.IllegalArgumentException
KVList
KVList.addUTFString(String, String)
.
addObject
in class KVList
key
- key of the added pairvalue
- value
java.lang.IllegalArgumentException
- if value has unsupported typepublic java.lang.String toString()
toString
in class KVList
public java.lang.String toStringLine()
|
Configuration Platform SDK 7.6 API Reference | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |