public interface ImmutableDataManipulatorBuilder<I extends ImmutableDataManipulator<I,M>,M extends DataManipulator<M,I>> extends DataBuilder<I>
Modifier and Type | Method and Description |
---|---|
Optional<I> |
createFrom(DataHolder dataHolder)
Attempts to read data from the given
DataHolder and constructs
a new copy of the DataManipulator as an instance of
T . |
Optional<I> |
createFrom(ImmutableDataHolder<?> dataHolder)
Creates the desired
ImmutableDataManipulator from the provided
ImmutableDataHolder , if it is supported. |
I |
createImmutable()
Creates a new specific
ImmutableDataManipulator for consumption. |
ImmutableDataManipulatorBuilder<I,M> |
reset()
Resets this builder to a "default" state such that there is no
remaining data to set.
|
build, from
I createImmutable()
ImmutableDataManipulator
for consumption.Optional<I> createFrom(DataHolder dataHolder)
DataHolder
and constructs
a new copy of the DataManipulator
as an instance of
T
.
If the DataHolder
does not contain the necessary information
to pre-populate the DataManipulator
, a fresh new
DataManipulator
is returned. If the DataManipulator
is
incompatible with the DataHolder
, Optional.empty()
is
returned.
dataHolder
- The DataHolder
to extract dataDataManipulator
with relevant data
filled from the given DataHolder
, if availableOptional<I> createFrom(ImmutableDataHolder<?> dataHolder)
ImmutableDataManipulator
from the provided
ImmutableDataHolder
, if it is supported.dataHolder
- The data holderImmutableDataManipulatorBuilder<I,M> reset()
ResettableBuilder
reset
in interface DataBuilder<I extends ImmutableDataManipulator<I,M>>
reset
in interface ResettableBuilder<I extends ImmutableDataManipulator<I,M>,DataBuilder<I extends ImmutableDataManipulator<I,M>>>