public interface Structure
Structure represents a potentially nested object type which is used to represent
structured data.| Modifier and Type | Method and Description |
|---|---|
Map<String,Value> |
asMap()
Get all values, as a map of Values.
|
Map<String,Object> |
asObjectMap()
Get all values, with as a map of Object.
|
default Object |
convertValue(Value value)
Converts the Value into its equivalent primitive type.
|
Value |
getValue(String key)
Get the value indexed by key.
|
Set<String> |
keySet()
Get all keys.
|
static Structure |
mapToStructure(Map<String,Object> map)
Transform an object map to a
Structure type. |
default <T extends Structure> |
merge(Function<Map<String,Value>,Structure> newStructure,
Map<String,Value> base,
Map<String,Value> overriding)
Recursively merges the base map with the overriding map.
|
Value getValue(String key)
key - String the key.Map<String,Value> asMap()
Map<String,Object> asObjectMap()
default Object convertValue(Value value)
value - - Value object to convertdefault <T extends Structure> Map<String,Value> merge(Function<Map<String,Value>,Structure> newStructure, Map<String,Value> base, Map<String,Value> overriding)
T - Structure typenewStructure - function to create the right structurebase - base map to mergeoverriding - overriding map to mergeCopyright © 2023. All rights reserved.