com.uwyn.rife.datastructures
Class KeyValueList
java.lang.Object
com.uwyn.rife.datastructures.KeyValueList
- All Implemented Interfaces:
- Cloneable, Iterable, Collection
public class KeyValueList
- extends Object
- implements Collection, Cloneable
|
Method Summary |
void |
add(int index,
KeyValue element)
|
void |
add(int index,
String key,
String value)
|
boolean |
add(KeyValue element)
|
boolean |
add(KeyValueList source)
|
boolean |
add(Object element)
|
boolean |
add(String key,
String value)
|
void |
addAfter(KeyValue existingElement,
KeyValue newElement)
|
void |
addAfter(KeyValue existingElement,
String key,
String value)
|
boolean |
addAll(Collection collection)
|
void |
addBefore(KeyValue existingElement,
KeyValue newElement)
|
void |
addBefore(KeyValue existingElement,
String key,
String value)
|
void |
clear()
|
KeyValueList |
clone()
|
boolean |
contains(KeyValue element)
|
boolean |
contains(Object keyvalue)
|
boolean |
contains(String key)
|
boolean |
contains(String key,
String value)
|
boolean |
containsAll(Collection collection)
|
void |
ensureCapacity(int minCapacity)
|
KeyValue |
first()
|
KeyValue |
get(int index)
|
KeyValue |
get(String key)
|
Collection<KeyValue> |
getAll(String key)
|
String[] |
getKeysArray()
|
KeyValue |
getNext(int elementIndex)
|
KeyValue |
getNext(KeyValue element)
|
KeyValue |
getNext(String key)
|
KeyValue |
getPrevious(int elementIndex)
|
KeyValue |
getPrevious(KeyValue element)
|
KeyValue |
getPrevious(String key)
|
String |
getValue(String key)
|
int |
indexOf(int startIndex,
KeyValue element)
|
int |
indexOf(int startIndex,
String key)
|
int |
indexOf(KeyValue element)
|
int |
indexOf(String key)
|
int |
indexOf(String key,
String value)
|
boolean |
isEmpty()
|
Iterator<KeyValue> |
iterator()
|
Collection<String> |
keys()
|
KeyValue |
last()
|
void |
remove(int index)
|
boolean |
remove(KeyValue element)
|
boolean |
remove(Object element)
|
boolean |
remove(String key)
|
boolean |
remove(String key,
String value)
|
boolean |
removeAll(Collection collection)
|
boolean |
retainAll(Collection collection)
|
void |
set(int index,
KeyValue element)
|
void |
set(int index,
String key,
String value)
|
void |
setSize(int newSize)
|
int |
size()
|
void |
sortKeys()
|
void |
sortValues()
|
void |
swap(int position1,
int position2)
|
Object[] |
toArray()
|
Object[] |
toArray(Object[] anArray)
|
String |
toHtml()
|
String |
toString()
|
String |
toStringVerbose()
|
void |
trimToSize()
|
Collection<String> |
values()
|
KeyValueList
public KeyValueList()
swap
public void swap(int position1,
int position2)
sortKeys
public void sortKeys()
sortValues
public void sortValues()
getValue
public String getValue(String key)
getPrevious
public KeyValue getPrevious(int elementIndex)
getPrevious
public KeyValue getPrevious(String key)
getPrevious
public KeyValue getPrevious(KeyValue element)
getNext
public KeyValue getNext(int elementIndex)
getNext
public KeyValue getNext(String key)
getNext
public KeyValue getNext(KeyValue element)
getAll
public Collection<KeyValue> getAll(String key)
contains
public boolean contains(String key)
contains
public boolean contains(Object keyvalue)
- Specified by:
contains in interface Collection
contains
public boolean contains(String key,
String value)
contains
public boolean contains(KeyValue element)
containsAll
public boolean containsAll(Collection collection)
- Specified by:
containsAll in interface Collection
indexOf
public int indexOf(String key,
String value)
indexOf
public int indexOf(KeyValue element)
indexOf
public int indexOf(int startIndex,
KeyValue element)
indexOf
public int indexOf(String key)
indexOf
public int indexOf(int startIndex,
String key)
add
public boolean add(Object element)
- Specified by:
add in interface Collection
add
public boolean add(String key,
String value)
add
public boolean add(KeyValue element)
add
public boolean add(KeyValueList source)
add
public void add(int index,
String key,
String value)
add
public void add(int index,
KeyValue element)
addAll
public boolean addAll(Collection collection)
- Specified by:
addAll in interface Collection
addAfter
public void addAfter(KeyValue existingElement,
String key,
String value)
addAfter
public void addAfter(KeyValue existingElement,
KeyValue newElement)
addBefore
public void addBefore(KeyValue existingElement,
String key,
String value)
addBefore
public void addBefore(KeyValue existingElement,
KeyValue newElement)
remove
public boolean remove(Object element)
- Specified by:
remove in interface Collection
remove
public boolean remove(String key,
String value)
remove
public boolean remove(KeyValue element)
remove
public void remove(int index)
removeAll
public boolean removeAll(Collection collection)
- Specified by:
removeAll in interface Collection
retainAll
public boolean retainAll(Collection collection)
- Specified by:
retainAll in interface Collection
remove
public boolean remove(String key)
clear
public void clear()
- Specified by:
clear in interface Collection
toArray
public Object[] toArray()
- Specified by:
toArray in interface Collection
toArray
public Object[] toArray(Object[] anArray)
- Specified by:
toArray in interface Collection
getKeysArray
public String[] getKeysArray()
trimToSize
public void trimToSize()
ensureCapacity
public void ensureCapacity(int minCapacity)
size
public int size()
- Specified by:
size in interface Collection
setSize
public void setSize(int newSize)
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface Collection
iterator
public Iterator<KeyValue> iterator()
- Specified by:
iterator in interface Iterable- Specified by:
iterator in interface Collection
keys
public Collection<String> keys()
values
public Collection<String> values()
get
public KeyValue get(int index)
get
public KeyValue get(String key)
first
public KeyValue first()
last
public KeyValue last()
set
public void set(int index,
String key,
String value)
set
public void set(int index,
KeyValue element)
clone
public KeyValueList clone()
- Overrides:
clone in class Object
toHtml
public String toHtml()
toString
public String toString()
- Overrides:
toString in class Object
toStringVerbose
public String toStringVerbose()
Copyright © 2001-2007 Uwyn sprl/bvba. All Rights Reserved.