public class SimpleKeyValueList<K,V> extends AbstractArray<K> implements java.util.Map<K,V>
ALLOWDUPLICATE, ALLOWEMPTYVALUE, BIDI, CASESENSITIVE, flag, MAP, READONLY, REMOVED, 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) |
SimpleKeyValueList<K,V> |
addToKeyValue(java.lang.Object key,
java.lang.Number 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) |
int |
getPositionValue(java.lang.Object o) |
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 |
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) |
V |
removePos(int pos) |
void |
setValue(int pos,
V value) |
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() |
java.lang.Object[] |
valuesArrayIntern() |
<ST extends SimpleKeyValueList<K,V>> |
with(K key,
V value) |
SimpleKeyValueList<K,V> |
with(java.lang.Object... values)
Add Elements to List or KeyValue
if param Modulo 2 the Params can be Key,Value
or add all Values to List
|
SimpleKeyValueList<K,V> |
withKeyValue(java.lang.Object key,
java.lang.Object value) |
SimpleKeyValueList<K,V> |
withKeyValueString(java.lang.String keyValue,
java.lang.Class<?> valueType)
Init The Colleciton with short String
|
SimpleKeyValueList<K,V> |
withList(java.util.Collection<?> values) |
SimpleKeyValueList<K,V> |
withMap(java.util.Map<?,?> value) |
AbstractArray<K> |
without(java.lang.Object... values) |
addHashItem, addKeyValue, checkValue, clear, comparator, contains, containsAll, fireProperty, first, flag, get, getByIndex, getPositionKey, getValue, hashKey, hasKeyAndPos, indexOf, init, init, init, isAllowDuplicate, isAllowEmptyValue, isCaseSensitive, isComparator, isEmpty, isReadOnly, isVisible, iterator, last, lastIndexOf, move, pack, parseItem, removeAll, removeByObject, reset, retainAll, setAllowEmptyValue, setFlag, setValue, size, subList, toArray, toArray, toString, toString, withAllowDuplicate, withAllowEmptyValue, withCaseSensitive, withFlag, withSize, withVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, 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 setValue(int pos,
V value)
public 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> with(java.lang.Object... values)
BaseItemwith in interface BaseItemwith in class AbstractArray<K>values - Items to Add to Listpublic <ST extends SimpleKeyValueList<K,V>> ST with(K key, V value)
public boolean containsKey(java.lang.Object key)
public int getPositionValue(java.lang.Object o)
public boolean containsValue(java.lang.Object value)
public int indexOfValue(java.lang.Object value)
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 V removePos(int pos)
public SimpleKeyValueList<K,V> withMap(java.util.Map<?,?> value)
public java.lang.Object[] valuesArrayIntern()
public SimpleKeyValueList<K,V> withKeyValue(java.lang.Object key, java.lang.Object value)
public SimpleKeyValueList<K,V> addToKeyValue(java.lang.Object key, java.lang.Number value)
public SimpleKeyValueList<K,V> withKeyValueString(java.lang.String keyValue, java.lang.Class<?> valueType)
keyValue - The init KeyValue String Key:Value,Key:Value ...valueType - Class from Valuepublic AbstractArray<K> without(java.lang.Object... values)
without in class AbstractArray<K>