public static final class AbstractBuilder.BuilderElement extends AbstractElement
Note: This class if final to allow the class comparison in
AbstractBuilder
.subElements() method.
ELEMENT_TYPE
Constructor and Description |
---|
AbstractBuilder.BuilderElement(String name,
AbstractBuilder builder)
Creates a new
AbstractBuilder.BuilderElement . |
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor visitor)
Accepts the visitor and calls the appropriate method on the visitor based
on the element type.
|
Element |
build()
Constructs the final form of the element being constructed by the
encapsulated builder.
|
ElementType |
getType()
Returns the type for the BSON type.
|
AbstractBuilder.BuilderElement |
withName(String name)
Creates a new element with the same type and value as this element but
with the specified name.
|
public AbstractBuilder.BuilderElement(String name, AbstractBuilder builder)
AbstractBuilder.BuilderElement
.name
- The name for the element to build.builder
- The Builder doing the building.public void accept(Visitor visitor)
visitor
- The visitor for the element.public Element build()
public ElementType getType()
public AbstractBuilder.BuilderElement withName(String name)
Returns a new AbstractBuilder.BuilderElement
.
name
- The new name for the element.Copyright © 2011-2013 Allanbank Consulting, Inc.. All Rights Reserved.