|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface KVList.PairList
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)
Adds pair to the storage. |
boolean |
addAfter(Pair pair,
Pair where)
Adds pair just after another pair. |
boolean |
addBefore(Pair pair,
Pair where)
Adds pair just before another pair. |
java.util.Collection |
asCollection()
Returns this list as a collection of Pairs. |
void |
clear()
Clears the storage. |
java.lang.Object |
clone()
Clones the storage. |
Pair |
findPair(java.lang.Object key)
Finds 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()
Returns the number of elements in this storage. |
Pair |
remove(int index)
Removes pair from the storage by index. |
Pair |
remove(java.lang.Object key)
Removes pair from the storage by key. |
Method Detail |
---|
void add(Pair pair)
pair
- Pair to addPair findPair(java.lang.Object key)
key
- Key of the pair to find
Pair remove(java.lang.Object key)
key
- Key of the pair to remove
Pair remove(int index)
index
- Index of the pair to remove
void clear()
java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
- if this storage can't be clonedjava.util.Enumeration getEnumeration()
java.util.Enumeration getPairEnumeration(java.lang.Object key)
boolean addAfter(Pair pair, Pair where)
pair
- Pair to addwhere
- Pair to add after
boolean addBefore(Pair pair, Pair where)
pair
- Pair to addwhere
- Pair to add before
int length()
boolean isEmpty()
void insert(Pair pair, int index)
pair
- Pair to insertindex
- The position to insert pair at.Pair get(int index)
index
- The position to insert pair at.java.util.Collection asCollection()
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |