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.
|
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, traits
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compare
public B id(ShapeId shapeId)
AbstractShapeBuilder
id
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)
AbstractShapeBuilder
addMember
in class AbstractShapeBuilder<B extends CollectionShape.Builder<B,S>,S extends CollectionShape>
member
- Member to add to the shape.public B clearMembers()
AbstractShapeBuilder
clearMembers
in class AbstractShapeBuilder<B extends CollectionShape.Builder<B,S>,S extends CollectionShape>
public B flattenMixins()
AbstractShapeBuilder
Flattening 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>