Class ValueMap
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- java.util.LinkedHashMap<K,V>
-
- com.amazonaws.services.dynamodbv2.document.utils.FluentHashMap<String,Object>
-
- com.amazonaws.services.dynamodbv2.document.utils.ValueMap
-
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,Object>
public class ValueMap extends FluentHashMap<String,Object>
Utility class for value maps.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description ValueMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValueMapwith(String key, Object val)Sets the value of the specified key to the given value.ValueMapwithBinary(String key, byte[] val)Sets the value of the specified key in the current ValueMap to the given value.ValueMapwithBinarySet(String key, byte[]... val)Sets the value of the specified key in the current ValueMap to the given value.ValueMapwithBinarySet(String key, Set<byte[]> val)Sets the value of the specified key in the current ValueMap to the given value.ValueMapwithBoolean(String key, boolean val)Sets the value of the specified key in the current ValueMap to the boolean value.ValueMapwithInt(String key, int val)Sets the value of the specified key in the current ValueMap to the given value.ValueMapwithList(String key, Object... vals)Sets the value of the specified key in the current ValueMap to the given values as a list.ValueMapwithList(String key, List<?> val)Sets the value of the specified key in the current ValueMap to the given value.ValueMapwithLong(String key, long val)Sets the value of the specified key in the current ValueMap to the given value.ValueMapwithMap(String key, Map<String,?> val)Sets the value of the specified key in the current ValueMap to the given value.ValueMapwithNull(String key)Sets the value of the specified key to null.ValueMapwithNumber(String key, Number val)Sets the value of the specified key in the current ValueMap to the given value.ValueMapwithNumber(String key, BigDecimal val)Sets the value of the specified key in the current ValueMap to the given value.ValueMapwithNumberSet(String key, Number... val)Sets the value of the specified key in the current ValueMap to the given value.ValueMapwithNumberSet(String key, BigDecimal... val)Sets the value of the specified key in the current ValueMap to the given value.ValueMapwithNumberSet(String key, Set<BigDecimal> val)Sets the value of the specified key in the current ValueMap to the given value.ValueMapwithString(String key, String val)Sets the value of the specified key in the current ValueMap to the given value.ValueMapwithStringSet(String key, String... val)Sets the value of the specified key in the current ValueMap to the given value.ValueMapwithStringSet(String key, Set<String> val)Sets the value of the specified key in the current ValueMap to the given value.-
Methods inherited from class com.amazonaws.services.dynamodbv2.document.utils.FluentHashMap
delete
-
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
-
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
-
-
-
Method Detail
-
withString
public ValueMap withString(String key, String val)
Sets the value of the specified key in the current ValueMap to the given value.
-
withNumber
public ValueMap withNumber(String key, BigDecimal val)
Sets the value of the specified key in the current ValueMap to the given value.
-
withNumber
public ValueMap withNumber(String key, Number val)
Sets the value of the specified key in the current ValueMap to the given value.
-
withInt
public ValueMap withInt(String key, int val)
Sets the value of the specified key in the current ValueMap to the given value.
-
withLong
public ValueMap withLong(String key, long val)
Sets the value of the specified key in the current ValueMap to the given value.
-
withBinary
public ValueMap withBinary(String key, byte[] val)
Sets the value of the specified key in the current ValueMap to the given value.
-
withStringSet
public ValueMap withStringSet(String key, Set<String> val)
Sets the value of the specified key in the current ValueMap to the given value.
-
withStringSet
public ValueMap withStringSet(String key, String... val)
Sets the value of the specified key in the current ValueMap to the given value.
-
withNumberSet
public ValueMap withNumberSet(String key, Set<BigDecimal> val)
Sets the value of the specified key in the current ValueMap to the given value.
-
withNumberSet
public ValueMap withNumberSet(String key, BigDecimal... val)
Sets the value of the specified key in the current ValueMap to the given value.
-
withNumberSet
public ValueMap withNumberSet(String key, Number... val)
Sets the value of the specified key in the current ValueMap to the given value.
-
withBinarySet
public ValueMap withBinarySet(String key, Set<byte[]> val)
Sets the value of the specified key in the current ValueMap to the given value.
-
withBinarySet
public ValueMap withBinarySet(String key, byte[]... val)
Sets the value of the specified key in the current ValueMap to the given value.
-
withList
public ValueMap withList(String key, List<?> val)
Sets the value of the specified key in the current ValueMap to the given value.
-
withList
public ValueMap withList(String key, Object... vals)
Sets the value of the specified key in the current ValueMap to the given values as a list.
-
withMap
public ValueMap withMap(String key, Map<String,?> val)
Sets the value of the specified key in the current ValueMap to the given value.
-
withBoolean
public ValueMap withBoolean(String key, boolean val)
Sets the value of the specified key in the current ValueMap to the boolean value.
-
with
public ValueMap with(String key, Object val)
Sets the value of the specified key to the given value. A value can be a- Number
- String
- binary (ie byte array or byte buffer)
- boolean
- null
- list (of any of the types on this list)
- map (with string key to value of any of the types on this list)
- set (of any of the types on this list)
-
-