public class BasicEntityBuilder extends EntityBuilder
General-purpose builder for entities.
id, idSet, type| Constructor and Description |
|---|
BasicEntityBuilder(EntityType type)
Create a new entity builder for a type.
|
| Modifier and Type | Method and Description |
|---|---|
Entity |
build()
Build the entity.
|
EntityBuilder |
clearAttribute(TypedName<?> name)
Clear an attribute.
|
<T> EntityBuilder |
setAttribute(TypedName<T> name,
T val)
Set an attribute in the entity.
|
reset, setAttribute, setDoubleAttribute, setId, setLongAttributepublic BasicEntityBuilder(EntityType type)
Create a new entity builder for a type.
type - The entity type.public <T> EntityBuilder setAttribute(TypedName<T> name, T val)
EntityBuilderSet an attribute in the entity.
setAttribute in class EntityBuildername - The name of the attribute to set.val - The attribute value.public EntityBuilder clearAttribute(TypedName<?> name)
EntityBuilderClear an attribute.
clearAttribute in class EntityBuildername - The name of the attribute to clear.public Entity build()
EntityBuilderBuild the entity.
build in class EntityBuilder