|
Configuration Platform SDK 7.6 API Reference | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A list of key-value pairs. Used as an abstraction of pairs storage. Usage of this list for other purposes is not expected. There are no public implementation of this interface, so if you are going to subclass KVList or its subclasses you will have to create own implementation.
Method Summary | |
void |
add(Pair pair)
Add pair to the storage |
boolean |
addAfter(Pair pair,
Pair where)
Add pair just after another pair |
boolean |
addBefore(Pair pair,
Pair where)
Add pair just before another pair |
java.util.Collection |
asCollection()
Return this list as a collection of Pairs. |
void |
clear()
Clear the storage |
java.lang.Object |
clone()
Clones the storage. |
Pair |
findPair(java.lang.Object key)
Find pair in the storage by key. |
Pair |
get(int index)
Gets pair from the storage by index. |
java.util.Enumeration |
getEnumeration()
Returns an Enumeration through the storage. |
java.util.Enumeration |
getPairEnumeration(java.lang.Object key)
Returns an Enumeration of pairs with specified key. |
void |
insert(Pair pair,
int index)
Inserts pair to the storage at specified index. |
boolean |
isEmpty()
Checks if the storage is empty (doesn't contain any pair) |
int |
length()
Return the number of elements in this storage |
Pair |
remove(int index)
Remove pair from the storage by index. |
Pair |
remove(java.lang.Object key)
Remove pair from the storage by key. |
Method Detail |
public void add(Pair pair)
pair
- Pair to addpublic Pair findPair(java.lang.Object key)
key
- Key of the pair to find
public Pair remove(java.lang.Object key)
key
- Key of the pair to remove
public Pair remove(int index)
index
- Index of the pair to remove
public void clear()
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
- if this storage can't be clonedpublic java.util.Enumeration getEnumeration()
public java.util.Enumeration getPairEnumeration(java.lang.Object key)
public boolean addAfter(Pair pair, Pair where)
pair
- Pair to addwhere
- Pair to add after
public boolean addBefore(Pair pair, Pair where)
pair
- Pair to addwhere
- Pair to add before
public int length()
public boolean isEmpty()
public void insert(Pair pair, int index)
pair
- Pair to insertindex
- The position to insert pair at.public Pair get(int index)
index
- The position to insert pair at.public java.util.Collection asCollection()
|
Configuration Platform SDK 7.6 API Reference | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |