public class MutableStructure extends Object
MutableStructure represents a potentially nested object type which is used to represent
structured data.
The MutableStructure is a Structure implementation which is not threadsafe, and whose attributes can
be modified after instantiation.| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Value> |
attributes |
| Constructor and Description |
|---|
MutableStructure() |
MutableStructure(Map<String,Value> attributes) |
| Modifier and Type | Method and Description |
|---|---|
MutableStructure |
add(String key,
Boolean value) |
MutableStructure |
add(String key,
Double value) |
MutableStructure |
add(String key,
Instant value) |
MutableStructure |
add(String key,
Integer value) |
<T> MutableStructure |
add(String key,
List<Value> value) |
MutableStructure |
add(String key,
String value) |
MutableStructure |
add(String key,
Structure value) |
MutableStructure |
add(String key,
Value value) |
Map<String,Value> |
asMap()
Get all values.
|
Map<String,Object> |
asObjectMap()
Get all values as their underlying primitives types.
|
Value |
getValue(String key)
Get the value indexed by key.
|
Set<String> |
keySet()
Get all keys.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconvertValue, mapToStructure, mergepublic Set<String> keySet()
Structurepublic Value getValue(String key)
Structurekey - String the key.public MutableStructure add(String key, Value value)
public MutableStructure add(String key, Boolean value)
public MutableStructure add(String key, String value)
public MutableStructure add(String key, Integer value)
public MutableStructure add(String key, Double value)
public MutableStructure add(String key, Instant value)
public MutableStructure add(String key, Structure value)
public <T> MutableStructure add(String key, List<Value> value)
public Map<String,Object> asObjectMap()
asObjectMap in interface StructureCopyright © 2023. All rights reserved.