Constructor and Description |
---|
MapUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
put(Map<String,Object> target,
Map<String,Object> map,
MapControl control)
Put the entries in the
map into the target map. |
static void |
put(Map<String,Object> target,
String key,
boolean value,
boolean falseIncluded)
Put the given key-value pair into the
target map when the
value is true or falseIncluded is true . |
static void |
put(Map<String,Object> target,
String key,
int value,
boolean zeroIncluded)
Put the given key-value pair into the
target map when the
value is not 0 or zeroIncluded is true . |
static void |
put(Map<String,Object> target,
String key,
long value,
boolean zeroIncluded)
Put the given key-value pair into the
target map when the
value is not 0 or zeroIncluded is true . |
static void |
put(Map<String,Object> target,
String key,
Map<String,Object> value,
boolean nullIncluded)
Put the given key-value pair into the
target map when the
value is not null or nullIncluded is true . |
static <T> void |
put(Map<String,Object> target,
String key,
T[] array,
boolean nullIncluded)
Put the given key-array pair into the
target map when the
array is not null or nullIncluded is
true . |
static void |
put(Map<String,Object> target,
String baseKey,
TaggedValue[] array,
boolean nullIncluded)
Put
"{baseKey}#{tag}" properties into the target
map. |
static <T> void |
put(Map<String,Object> target,
String key,
T value,
boolean nullIncluded)
Put the given key-value pair into the
target map when the
value is not null or nullIncluded is
true . |
static void |
putJsonArray(Map<String,Object> target,
String key,
String json,
boolean nullIncluded)
Convert the given
json into a List instance and put
the instance into the target map with the key . |
static void |
putJsonObject(Map<String,Object> target,
String key,
String json,
boolean nullIncluded)
Convert the given
json into a Map instance and put
the instance into the target map with the key . |
public static void put(Map<String,Object> target, String key, boolean value, boolean falseIncluded)
target
map when the
value
is true
or falseIncluded
is true
.public static void put(Map<String,Object> target, String key, int value, boolean zeroIncluded)
target
map when the
value
is not 0 or zeroIncluded
is true
.public static void put(Map<String,Object> target, String key, long value, boolean zeroIncluded)
target
map when the
value
is not 0 or zeroIncluded
is true
.public static void put(Map<String,Object> target, String key, Map<String,Object> value, boolean nullIncluded)
target
map when the
value
is not null or nullIncluded
is true
.public static <T> void put(Map<String,Object> target, String key, T value, boolean nullIncluded)
target
map when the
value
is not null
or nullIncluded
is
true
.
Note that the value of value.toString()
is put into the
target
map, not the value
itself.
public static <T> void put(Map<String,Object> target, String key, T[] array, boolean nullIncluded)
target
map when the
array
is not null
or nullIncluded
is
true
.
Note that elements in the array are converted to String
instances by the toString()
method and added to a new
List
instance, and the List
instance is put into
the target
map.
public static void put(Map<String,Object> target, String baseKey, TaggedValue[] array, boolean nullIncluded)
"{baseKey}#{tag}"
properties into the target
map.public static void putJsonObject(Map<String,Object> target, String key, String json, boolean nullIncluded)
json
into a Map
instance and put
the instance into the target
map with the key
.
If nullIncluded
is true
, the key
is put into
the target
map even when the given json
is null
.
public static void putJsonArray(Map<String,Object> target, String key, String json, boolean nullIncluded)
json
into a List
instance and put
the instance into the target
map with the key
.
If nullIncluded
is true
, the key
is put into
the target
map even when the given json
is null
.
Copyright © 2024. All rights reserved.