Class MapUtils
java.lang.Object
com.clickhouse.client.api.internal.MapUtils
Collection of utility methods for working with maps.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidstatic booleanGet a boolean value from a map.static booleanGet a boolean value from a p1, if not found, get from p2.static booleanGet a boolean value from a map.static intstatic long
-
Constructor Details
-
MapUtils
public MapUtils()
-
-
Method Details
-
applyLong
-
applyInt
-
getInt
-
getLong
-
getFlag
Get a boolean value from a map.- Parameters:
map- map to get value fromkey- key to get value for- Returns:
- boolean value
- Throws:
NullPointerException- if the key is missingIllegalArgumentException- if the value is not a boolean
-
getFlag
Get a boolean value from a map.- Parameters:
map- - configuration mapkey- - key of the propertydefaultValue- - value if not found- Returns:
- boolean value
-
getFlag
Get a boolean value from a p1, if not found, get from p2.- Parameters:
p1- - first mapp2- - second mapkey- - key of the property- Returns:
- boolean value
- Throws:
NullPointerException- if the key is missing in both maps
-