public interface DataManipulatorRegistry
DataManipulator
s and their respective
DataManipulatorBuilder
s. Registration should occur prior to
GameState.SERVER_ABOUT_TO_START
.Modifier and Type | Method and Description |
---|---|
<T extends DataManipulator<T,I>,I extends ImmutableDataManipulator<I,T>> |
getBuilder(Class<T> manipulatorClass)
Attempts to retrieve the builder for the given
DataManipulator . |
<T extends DataManipulator<T,I>,I extends ImmutableDataManipulator<I,T>> |
getBuilderForImmutable(Class<I> immutableManipulatorClass)
Attempts to retrieve the builder for the given
ImmutableDataManipulator . |
<T extends DataManipulator<T,I>,I extends ImmutableDataManipulator<I,T>> |
register(Class<T> manipulatorClass,
Class<I> immutableManipulatorClass,
DataManipulatorBuilder<T,I> builder)
Registers the given
DataManipulator class with it's associated
DataManipulatorBuilder . |
<T extends DataManipulator<T,I>,I extends ImmutableDataManipulator<I,T>> void register(Class<T> manipulatorClass, Class<I> immutableManipulatorClass, DataManipulatorBuilder<T,I> builder)
DataManipulator
class with it's associated
DataManipulatorBuilder
. The builder can be used to create new
instances of the given DataManipulator
for data retrieval,
data representation, and mass application of a DataManipulator
to multiple DataHolder
s.T
- The type of data manipulatorI
- The type of immutable datamanipulatormanipulatorClass
- The class of the data manipulatorimmutableManipulatorClass
- The class of the immutable datamanipulatorbuilder
- The builder instance of the data manipulator<T extends DataManipulator<T,I>,I extends ImmutableDataManipulator<I,T>> Optional<DataManipulatorBuilder<T,I>> getBuilder(Class<T> manipulatorClass)
DataManipulator
.
If the DataManipulator
was not registered, multiple systems
could fail to retrieve specific data.
T
- The type of manipulatorI
- The type of immutable manipulatormanipulatorClass
- The manipulator class<T extends DataManipulator<T,I>,I extends ImmutableDataManipulator<I,T>> Optional<DataManipulatorBuilder<T,I>> getBuilderForImmutable(Class<I> immutableManipulatorClass)
ImmutableDataManipulator
.
If the ImmutableDataManipulator
was not registered, multiple
systems could fail to retrieve specific data.
T
- The type of DataManipulatorI
- The type of ImmutableDataManipulatorimmutableManipulatorClass
- The immutable manipulator class