H - The type of ImmutableDataHolderE - The extended ImmutableDataBuilderpublic interface ImmutableDataBuilder<H extends ImmutableDataHolder<H>,E extends ImmutableDataBuilder<H,E>> extends DataBuilder<H>
DataBuilder except that it builds
ImmutableDataHolders. While the ImmutableDataHolder is like
a DataHolder, it is immutable.| Modifier and Type | Method and Description |
|---|---|
E |
add(DataManipulator<?,?> manipulator)
Adds the given
DataManipulator to the builder. |
E |
add(ImmutableDataManipulator<?,?> manipulator)
Adds the given
ImmutableDataManipulator to the builder. |
<V> E |
add(Key<? extends BaseValue<V>> key,
V value)
Adds the given
Key with the given value. |
H |
build()
Attempts to build a new
ImmutableDataHolder. |
E |
from(H holder)
Copies all known
DataManipulators from the given
ImmutableDataHolder. |
E |
reset()
Resets this builder to a "default" state such that there is no
remaining data to set.
|
buildE add(DataManipulator<?,?> manipulator)
DataManipulator to the builder. The
DataManipulator is copied when the ImmutableDataHolder
is created.manipulator - The manipulator to addE add(ImmutableDataManipulator<?,?> manipulator)
ImmutableDataManipulator to the builder.manipulator - The manipulator to add<V> E add(Key<? extends BaseValue<V>> key, V value)
Key with the given value.V - The type of the valuekey - The key to assign the value withvalue - The value to assign with the keyE from(H holder)
DataManipulators from the given
ImmutableDataHolder. This is a defensive copy as
DataManipulator is mutable.from in interface DataBuilder<H extends ImmutableDataHolder<H>>from in interface ResettableBuilder<H extends ImmutableDataHolder<H>,DataBuilder<H extends ImmutableDataHolder<H>>>holder - The ImmutableDataHolder to copy fromH build()
ImmutableDataHolder.E reset()
ResettableBuilderreset in interface DataBuilder<H extends ImmutableDataHolder<H>>reset in interface ResettableBuilder<H extends ImmutableDataHolder<H>,DataBuilder<H extends ImmutableDataHolder<H>>>