Package org.spongepowered.api.data.value
Interface ListValue<E>
- 
- All Superinterfaces:
- CollectionValue<E,List<E>>,- Iterable<E>,- Value<List<E>>
 - All Known Subinterfaces:
- ListValue.Immutable<E>,- ListValue.Mutable<E>
 
 public interface ListValue<E> extends CollectionValue<E,List<E>> 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceListValue.Immutable<E>A type ofCollectionValue.Immutablethat is backed by aList.static interfaceListValue.Mutable<E>A type ofCollectionValue.Mutablethat is backed by aList.- 
Nested classes/interfaces inherited from interface org.spongepowered.api.data.value.ValueValue.Factory
 
- 
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description ListValue.Immutable<E>asImmutable()Retrieves an immutable form of this value.ListValue.Mutable<E>asMutable()Retrieves a mutable form of this value.Eget(int index)Gets the desired element at the desired index.static <E> ListValue.Immutable<E>immutableOf(Supplier<? extends Key<? extends ListValue<E>>> key, List<E> element)static <E> ListValue.Immutable<E>immutableOf(Key<? extends ListValue<E>> key, List<E> element)intindexOf(E element)Queries for the index of the provided element.Key<? extends ListValue<E>>key()Gets the key for thisValue.static <E> ListValue.Mutable<E>mutableOf(Supplier<? extends Key<? extends ListValue<E>>> key, List<E> element)static <E> ListValue.Mutable<E>mutableOf(Key<? extends ListValue<E>> key, List<E> element)- 
Methods inherited from interface org.spongepowered.api.data.value.CollectionValueall, asMutableCopy, contains, containsAll, isEmpty, size
 - 
Methods inherited from interface java.lang.IterableforEach, iterator, spliterator
 
- 
 
- 
- 
- 
Method Detail- 
mutableOfstatic <E> ListValue.Mutable<E> mutableOf(Key<? extends ListValue<E>> key, List<E> element) - Type Parameters:
- E- The element type
- Parameters:
- key- The key
- element- The element
- Returns:
- The constructed mutable value
 
 - 
mutableOfstatic <E> ListValue.Mutable<E> mutableOf(Supplier<? extends Key<? extends ListValue<E>>> key, List<E> element) - Type Parameters:
- E- The element type
- Parameters:
- key- The key
- element- The element
- Returns:
- The constructed mutable value
 
 - 
immutableOfstatic <E> ListValue.Immutable<E> immutableOf(Key<? extends ListValue<E>> key, List<E> element) - Type Parameters:
- E- The element type
- Parameters:
- key- The key
- element- The element
- Returns:
- The constructed immutable value
 
 - 
immutableOfstatic <E> ListValue.Immutable<E> immutableOf(Supplier<? extends Key<? extends ListValue<E>>> key, List<E> element) - Type Parameters:
- E- The element type
- Parameters:
- key- The key
- element- The element
- Returns:
- The constructed immutable value
 
 - 
keyKey<? extends ListValue<E>> key() Description copied from interface:ValueGets the key for thisValue.
 - 
getE get(int index) Gets the desired element at the desired index.- Parameters:
- index- The index of the element to return
- Returns:
- The element at the desired index
- Throws:
- IndexOutOfBoundsException- if the index is out of range
 
 - 
indexOfint indexOf(E element) Queries for the index of the provided element. If the element is not contained in this list, -1 is returned.- Parameters:
- element- The element to get the index from
- Returns:
- The index of the element, -1 if not available
 
 - 
asMutableListValue.Mutable<E> asMutable() Description copied from interface:ValueRetrieves a mutable form of this value. Due to the vague nature of the value itself, some cases can already provide aValue.Mutableinstance where this would simply return itself. In other cases, where the retrieved value is anValue.Immutableinstance, a new mutable value is created with the same key and values.
 - 
asImmutableListValue.Immutable<E> asImmutable() Description copied from interface:ValueRetrieves an immutable form of this value. Due to the vague nature of the value itself, some cases can already provide aValue.Immutableinstance where this would simply return itself. In other cases, where the retrieved value is aValue.Mutableinstance, a new immutable value is created with the same key and values.- Specified by:
- asImmutablein interface- CollectionValue<E,List<E>>
- Specified by:
- asImmutablein interface- Value<E>
- Returns:
- An immutable value
 
 
- 
 
-