public class SimpleKeyValueList<K,V> extends AbstractArray<K> implements java.util.Map<K,V>, java.lang.Iterable<K>
ALLOWDUPLICATE, ALLOWEMPTYVALUE, BIDI, BIG_KEY, BIG_VALUE, CASESENSITIVE, DELETED, elements, emptyArray, flag, MAP, MAXDELETED, MAXUSEDLIST, MINHASHINGSIZE, MINSIZE, MINUSEDLIST, READONLY, SIZE_BIG, SMALL_KEY, SMALL_VALUE, VISIBLE| Constructor and Description |
|---|
SimpleKeyValueList() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(int pos,
K key,
V value) |
boolean |
add(K key,
V value) |
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object value) |
void |
copyEntity(SimpleKeyValueList<K,V> target,
int pos) |
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet() |
V |
get(java.lang.Object key) |
boolean |
getBoolean(K key)
Get the boolean value associated with an index.
|
double |
getDouble(K key)
Get the double value associated with an index.
|
int |
getInt(K key)
Get the int value associated with an index.
|
K |
getKey(V value) |
K |
getKeyByIndex(int index) |
long |
getLong(K key)
Get the long value associated with an index.
|
BaseItem |
getNewList(boolean keyValue) |
java.lang.String |
getString(K key)
Get the string associated with an index.
|
java.lang.String |
getString(K key,
java.lang.String defaultValue)
Get the string associated with an index.
|
V |
getValue(K key) |
V |
getValueByIndex(int index) |
SimpleKeyValueList<K,V> |
increment(K key)
Increment a property of a Entity.
|
int |
indexOfValue(java.lang.Object value) |
java.util.Iterator<K> |
iterator() |
java.util.Iterator<K> |
keyIterator() |
java.util.Set<K> |
keySet() |
V |
put(K key,
V value) |
void |
putAll(java.util.Map<? extends K,? extends V> values) |
V |
remove(java.lang.Object key) |
SimpleKeyValueList<K,V> |
setValueItem(java.lang.Object key,
java.lang.Object value)
Set a Value to Entity With this Method it is possible to set a Value of a
Set by using a [Number] or [L] for Last
|
java.util.Collection<V> |
values() |
<ST extends SimpleKeyValueList<K,V>> |
with(K key,
V value) |
SimpleKeyValueList<K,V> |
withAll(java.lang.Object... values) |
SimpleKeyValueList<K,V> |
withKeyValue(java.lang.Object key,
java.lang.Object value) |
SimpleKeyValueList<K,V> |
withList(java.util.Collection<?> values) |
SimpleKeyValueList<K,V> |
withList(java.util.Map<?,?> map) |
SimpleKeyValueList<K,V> |
withMap(java.util.Map<?,?> value) |
addFlag, addHashItem, addKey, addKeyValue, checkValue, clear, comparator, contains, containsAll, fireProperty, first, flag, get, getByIndex, getLastPositionKey, getPositionKey, getPositionValue, getSignalFlag, getValueItem, hashKey, hasKey, hasKeyAndPos, indexOf, init, init, init, isAllowDuplicate, isAllowEmptyValue, isCaseSensitive, isComparator, isEmpty, isReadOnly, isVisible, last, lastindexOf, move, pack, removeAll, removeByObject, retainAll, setValue, size, subList, toArray, toArray, withAllowDuplicate, withAllowEmptyValue, withCaseSensitive, withFlag, without, withVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic SimpleKeyValueList<K,V> setValueItem(java.lang.Object key, java.lang.Object value)
key - the Key to addvalue - the Value to addpublic void copyEntity(SimpleKeyValueList<K,V> target, int pos)
public java.util.Iterator<K> keyIterator()
public boolean getBoolean(K key) throws java.lang.RuntimeException
key - The Valuejava.lang.RuntimeException - If there is no value for the index or if the value is not
convertible to boolean.public double getDouble(K key) throws java.lang.RuntimeException
key - The Valuejava.lang.RuntimeException - If the key is not found or if the value cannot be converted
to a number.public int getInt(K key) throws java.lang.RuntimeException
key - The Valuejava.lang.RuntimeException - If the key is not found or if the value is not a number.public long getLong(K key) throws java.lang.RuntimeException
key - The Valuejava.lang.RuntimeException - If the key is not found or if the value cannot be converted
to a number.public java.lang.String getString(K key) throws java.lang.RuntimeException
key - The Valuejava.lang.RuntimeException - If there is no value for the index.public java.lang.String getString(K key, java.lang.String defaultValue)
key - The index must be between 0 and length() - 1.defaultValue - The defaultValuejava.lang.RuntimeException - If there is no value for the index.public SimpleKeyValueList<K,V> increment(K key) throws java.lang.RuntimeException
key - A key string.java.lang.RuntimeException - If there is already a property with this name that is not an
Integer, Long, Double, or Float.public BaseItem getNewList(boolean keyValue)
getNewList in interface BaseItemgetNewList in class AbstractArray<K>public SimpleKeyValueList<K,V> withList(java.util.Collection<?> values)
withList in class AbstractArray<K>public SimpleKeyValueList<K,V> withAll(java.lang.Object... values)
withAll in interface BaseItemwithAll in class AbstractArray<K>public <ST extends SimpleKeyValueList<K,V>> ST with(K key, V value)
public boolean containsKey(java.lang.Object key)
public boolean containsValue(java.lang.Object value)
public int indexOfValue(java.lang.Object value)
public SimpleKeyValueList<K,V> withList(java.util.Map<?,?> map)
public java.util.Iterator<K> iterator()
iterator in interface java.lang.Iterable<K>iterator in class AbstractArray<K>public K getKeyByIndex(int index)
getKeyByIndex in class AbstractArray<K>public V getValueByIndex(int index)
public SimpleKeyValueList<K,V> withMap(java.util.Map<?,?> value)
public SimpleKeyValueList<K,V> withKeyValue(java.lang.Object key, java.lang.Object value)