Package io.stargate.sdk.core.domain
Class ObjectMap
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,Object>
Wrapper to parse Rows as an HashMap.
- Author:
- Cedrick LUNVEN (@clunven)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<K> KAccess element from the mapgetBoolean(String k) Access element from the mapAccess element from the mapAccess element from the mapAccess element from the mapAccess element from the mapgetInteger(String k) Access element from the map<K> List<K> Access element from the mapstatic com.fasterxml.jackson.databind.ObjectMapperInitialize object mapper.<K> Set<K> Access element from the mapAccess element from the mapstatic ObjectMapConvert if possible.Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
ObjectMap
public ObjectMap()Default constructor -
ObjectMap
Copy constructor.- Parameters:
map- current Map
-
-
Method Details
-
getObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()Initialize object mapper.- Returns:
- mapper
-
get
Access element from the map- Type Parameters:
K- type f parameters- Parameters:
key- current configuration keytype- configuration typerequired- if the key is required- Returns:
- configuration value
-
getSet
-
getList
-
getString
Access element from the map- Parameters:
k- current configuration key- Returns:
- configuration value
-
getDouble
Access element from the map- Parameters:
k- current configuration key- Returns:
- configuration value
-
getInteger
Access element from the map- Parameters:
k- current configuration key- Returns:
- configuration value
-
getBoolean
Access element from the map- Parameters:
k- current configuration key- Returns:
- configuration value
-
getFloat
Access element from the map- Parameters:
k- current configuration key- Returns:
- configuration value
-
getLong
Access element from the map- Parameters:
k- current configuration key- Returns:
- configuration value
-
getShort
Access element from the map- Parameters:
k- current configuration key- Returns:
- configuration value
-
getByte
Access element from the map- Parameters:
k- current configuration key- Returns:
- configuration value
-
getCharacter
Access element from the map- Parameters:
k- current configuration key- Returns:
- configuration value
-
of
Convert if possible.- Parameters:
o- current object- Returns:
- object map
-