E
- The type of enum valueM
- The manipulator typeI
- The immutable manipulator typepublic abstract class AbstractSingleEnumData<E extends Enum<E>,M extends DataManipulator<M,I>,I extends ImmutableDataManipulator<I,M>> extends AbstractSingleData<E,M,I>
DataManipulator
s.defaultValue, usedKey, value
Modifier | Constructor and Description |
---|---|
protected |
AbstractSingleEnumData(E value,
Key<? extends BaseValue<E>> usedKey,
E defaultValue)
Deprecated.
Use
AbstractSingleEnumData(Key, Enum, Enum) instead. |
protected |
AbstractSingleEnumData(Key<Value<E>> usedKey,
E value) |
protected |
AbstractSingleEnumData(Key<Value<E>> usedKey,
E value,
E defaultValue) |
Modifier and Type | Method and Description |
---|---|
protected DataContainer |
fillContainer(DataContainer dataContainer)
Implement this method to add the data to be persisted.
|
protected Value<E> |
getValueGetter()
Gets the
Value as a method since this manipulator only focuses
on a single value. |
DataContainer |
toContainer()
Serializes this object into a comprehensible
DataContainer . |
asImmutable, equals, get, getValue, hashCode, registerGettersAndSetters, setValue, supports
getKeys, getValue, getValues, registerFieldGetter, registerFieldSetter, registerKeyValue, set, transform
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
copy, fill, fill, from, set, set, set
getContentVersion
getOrElse, getOrNull, require, supports
@Deprecated protected AbstractSingleEnumData(E value, Key<? extends BaseValue<E>> usedKey, E defaultValue)
AbstractSingleEnumData(Key, Enum, Enum)
instead.public DataContainer toContainer()
DataSerializable
DataContainer
.toContainer
in interface DataSerializable
toContainer
in class AbstractData<M extends DataManipulator<M,I>,I extends ImmutableDataManipulator<I,M>>
protected DataContainer fillContainer(DataContainer dataContainer)
AbstractData
fillContainer
in class AbstractSingleData<E extends Enum<E>,M extends DataManipulator<M,I>,I extends ImmutableDataManipulator<I,M>>
dataContainer
- The data containerprotected Value<E> getValueGetter()
AbstractSingleData
Value
as a method since this manipulator only focuses
on a single value.getValueGetter
in class AbstractSingleData<E extends Enum<E>,M extends DataManipulator<M,I>,I extends ImmutableDataManipulator<I,M>>