|
Platform SDK Java 8.5 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
public class 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.
getEnumeration(String)
if you need all pairs
with the given key.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.genesyslab.platform.commons.collections.KVList |
---|
KVList.PairList |
Field Summary |
---|
Fields inherited from class com.genesyslab.platform.commons.collections.KVList |
---|
storage |
Constructor Summary | |
---|---|
|
KeyValueCollection()
Creates new empty list. |
protected |
KeyValueCollection(KeyValueCollection list)
Creates list from another list. |
Method Summary | |
---|---|
void |
addList(java.lang.String key,
KeyValueCollection list)
Adds TKV list to this list under specified key. |
void |
addObject(java.lang.String key,
java.lang.Object value)
Adds supported value to this list with specified key. |
void |
addPair(KeyValuePair pair)
Adds TKV pair to the list. |
protected Pair |
createPair(java.lang.Object key)
Creates list specific Pair implementation. |
KeyValueCollection |
getList(java.lang.String key)
Returns list value stored with specified key. |
KeyValuePair |
getPair(java.lang.String key)
Returns TKV pair stored with specified key. |
KeyValuePair |
remove(java.lang.String key)
Removes the pair with the specified String key from this list. |
protected void |
throwNotPair(java.lang.Object o)
Checks that Object inserted to this KVList through Collection interface is appropriate Pair implementation (e.g. |
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, addUTFString, clear, clone, contains, containsAll, containsKey, equals, getBinary, getComparator, getEnumeration, getEnumeration, getInt, getPairEnumeration, getString, hashCode, isEmpty, iterator, length, remove, removeAll, removePair, retainAll, setComparator, size, toArray, toArray |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public KeyValueCollection()
protected KeyValueCollection(KeyValueCollection list)
list
- list to create this list from.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()
protected Pair createPair(java.lang.Object key)
KVList
createPair
in class KVList
key
- key of the pair to create
protected void throwNotPair(java.lang.Object o)
KVList
throwNotPair
in class KVList
o
- Object to insert
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |