E - The type of element within the listM - The type of DataManipulatorI - The type of ImmutableDataManipulatorpublic abstract class AbstractListData<E,M extends ListData<E,M,I>,I extends ImmutableListData<E,I,M>> extends AbstractSingleData<List<E>,M,I> implements ListData<E,M,I>
ListDatas provided by the API.defaultValue, usedKey, value| Modifier | Constructor and Description |
|---|---|
protected |
AbstractListData(Key<ListValue<E>> usedKey,
List<E> value) |
protected |
AbstractListData(Key<ListValue<E>> usedKey,
List<E> value,
List<E> defaultValue) |
protected |
AbstractListData(List<E> value,
Key<? extends BaseValue<List<E>>> usedKey)
Deprecated.
Use
AbstractListData(Key, List) instead. |
| Modifier and Type | Method and Description |
|---|---|
abstract I |
asImmutable()
Gets an
ImmutableDataManipulator copy of this
DataManipulator such that all backed Values are copied
into ImmutableValue counterparts. |
List<E> |
asList()
Gets the
List value itself from this manipulator. |
boolean |
equals(Object obj) |
<V> Optional<V> |
get(Key<? extends BaseValue<V>> key)
|
ListValue<E> |
getListValue()
|
protected List<E> |
getValue()
A simple getter for usage with a
Supplier for
the AbstractData.registerFieldGetter(Key, Supplier) method. |
protected ListValue<E> |
getValueGetter()
Gets the
Value as a method since this manipulator only focuses
on a single value. |
int |
hashCode() |
protected M |
setValue(List<E> value)
A simple setter for usage with a
Consumer for
the AbstractData.registerFieldSetter(Key, Consumer) method. |
boolean |
supports(Key<?> key)
Checks if the given
Key is supported by this
ValueContainer. |
fillContainer, registerGettersAndSettersgetKeys, getValue, getValues, registerFieldGetter, registerFieldSetter, registerKeyValue, set, toContainer, transformclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddElement, addElement, addElements, contains, get, remove, remove, removeAll, removeAll, setElement, setElementscopy, fill, fill, from, set, set, set, set, transformgetContentVersion, toContainer@Deprecated protected AbstractListData(List<E> value, Key<? extends BaseValue<List<E>>> usedKey)
AbstractListData(Key, List) instead.protected ListValue<E> getValueGetter()
AbstractSingleDataValue as a method since this manipulator only focuses
on a single value.getValueGetter in class AbstractSingleData<List<E>,M extends ListData<E,M,I>,I extends ImmutableListData<E,I,M>>public <V> Optional<V> get(Key<? extends BaseValue<V>> key)
ValueContainerBaseValue
linked to the provided Key. If the Key is not
supported, Optional.empty() is returned. It is important
to check for support of a Key by either calling
ValueContainer.supports(BaseValue) or ValueContainer.supports(Key).public boolean supports(Key<?> key)
ValueContainerKey is supported by this
ValueContainer.public abstract I asImmutable()
DataManipulatorImmutableDataManipulator copy of this
DataManipulator such that all backed Values are copied
into ImmutableValue counterparts. Any changes to this
DataManipulator will NOT be reflected on the returned
ImmutableDataManipulator and vice versa.asImmutable in interface DataManipulator<M extends ListData<E,M,I>,I extends ImmutableListData<E,I,M>>asImmutable in class AbstractSingleData<List<E>,M extends ListData<E,M,I>,I extends ImmutableListData<E,I,M>>DataManipulator's data copied into a
ImmutableDataManipulatorprotected List<E> getValue()
AbstractSingleDataSupplier for
the AbstractData.registerFieldGetter(Key, Supplier) method.protected M setValue(List<E> value)
AbstractSingleDataConsumer for
the AbstractData.registerFieldSetter(Key, Consumer) method.public int hashCode()
public boolean equals(Object obj)