B - Concrete builder type.S - Shape type being created.public abstract static class CollectionShape.Builder<B extends CollectionShape.Builder<B,S>,S extends CollectionShape> extends AbstractShapeBuilder<B,S>
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
B |
addMember(MemberShape member)
Adds a member to the shape IFF the shape supports members.
|
B |
clearMembers()
Removes all members from the builder.
|
B |
flattenMixins()
Removes mixins from a shape and flattens them into the shape.
|
java.util.Optional<MemberShape> |
getMember(java.lang.String memberName)
Gets the optional member with the given name.
|
B |
id(ShapeId shapeId)
Sets the shape ID of the shape.
|
B |
member(MemberShape member)
Sets the member of the collection.
|
B |
member(ShapeId target)
Sets the member of the collection.
|
B |
member(ShapeId target,
java.util.function.Consumer<MemberShape.Builder> memberUpdater)
Sets the member of the collection.
|
addMixin, addTrait, addTraits, clearMixins, clearTraits, getAllTraits, getId, getShapeType, getSourceLocation, id, mixins, removeMixin, removeTrait, removeTrait, source, source, traitsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparepublic java.util.Optional<MemberShape> getMember(java.lang.String memberName)
AbstractShapeBuildergetMember in class AbstractShapeBuilder<B extends CollectionShape.Builder<B,S>,S extends CollectionShape>public B id(ShapeId shapeId)
AbstractShapeBuilderid in class AbstractShapeBuilder<B extends CollectionShape.Builder<B,S>,S extends CollectionShape>shapeId - Shape ID to set.public B member(MemberShape member)
member - Member of the collection to set.public B member(ShapeId target)
target - Target of the member.public B member(ShapeId target, java.util.function.Consumer<MemberShape.Builder> memberUpdater)
target - Target of the member.memberUpdater - Consumer that can update the created member shape.public B addMember(MemberShape member)
AbstractShapeBuilderaddMember in class AbstractShapeBuilder<B extends CollectionShape.Builder<B,S>,S extends CollectionShape>member - Member to add to the shape.public B clearMembers()
AbstractShapeBuilderclearMembers in class AbstractShapeBuilder<B extends CollectionShape.Builder<B,S>,S extends CollectionShape>public B flattenMixins()
AbstractShapeBuilderFlattening a mixin into a shape copies the traits and members of a mixin onto the shape, effectively resulting in the same shape but with no trace of the mixin relationship.
flattenMixins in class AbstractShapeBuilder<B extends CollectionShape.Builder<B,S>,S extends CollectionShape>