Class ObjectNode.Builder
- java.lang.Object
-
- software.amazon.smithy.model.node.ObjectNode.Builder
-
- All Implemented Interfaces:
SmithyBuilder<ObjectNode>
- Enclosing class:
- ObjectNode
public static final class ObjectNode.Builder extends java.lang.Object implements SmithyBuilder<ObjectNode>
Builder used to efficiently create an ObjectNode.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectNode
build()
Creates an immutable object that is created from the properties that have been set on the builder.boolean
hasMember(java.lang.String key)
ObjectNode.Builder
merge(ObjectNode other)
ObjectNode.Builder
sourceLocation(SourceLocation sourceLocation)
ObjectNode.Builder
withMember(java.lang.String key, boolean value)
ObjectNode.Builder
withMember(java.lang.String key, java.lang.Number value)
ObjectNode.Builder
withMember(java.lang.String key, java.lang.String value)
<T extends ToNode>
ObjectNode.BuilderwithMember(java.lang.String key, T value)
<T extends ToNode>
ObjectNode.BuilderwithMember(StringNode key, T value)
<T extends ToNode>
ObjectNode.BuilderwithOptionalMember(java.lang.String key, java.util.Optional<T> value)
ObjectNode.Builder
withoutMember(java.lang.String memberName)
-
-
-
Method Detail
-
build
public ObjectNode build()
Description copied from interface:SmithyBuilder
Creates an immutable object that is created from the properties that have been set on the builder.- Specified by:
build
in interfaceSmithyBuilder<ObjectNode>
- Returns:
- an instance of T
-
sourceLocation
public ObjectNode.Builder sourceLocation(SourceLocation sourceLocation)
-
hasMember
public boolean hasMember(java.lang.String key)
-
withMember
public <T extends ToNode> ObjectNode.Builder withMember(StringNode key, T value)
-
withMember
public <T extends ToNode> ObjectNode.Builder withMember(java.lang.String key, T value)
-
withMember
public ObjectNode.Builder withMember(java.lang.String key, java.lang.String value)
-
withMember
public ObjectNode.Builder withMember(java.lang.String key, boolean value)
-
withMember
public ObjectNode.Builder withMember(java.lang.String key, java.lang.Number value)
-
withOptionalMember
public <T extends ToNode> ObjectNode.Builder withOptionalMember(java.lang.String key, java.util.Optional<T> value)
-
withoutMember
public ObjectNode.Builder withoutMember(java.lang.String memberName)
-
merge
public ObjectNode.Builder merge(ObjectNode other)
-
-