Package org.spongepowered.api.data.value
Interface ListValue.Immutable<E>
- Type Parameters:
- E- The type of element of this list value
- All Superinterfaces:
- CollectionValue<E,,- List<E>> - CollectionValue.Immutable<E,,- List<E>, - ListValue.Immutable<E>, - ListValue.Mutable<E>> - Iterable<E>,- ListValue<E>,- Value<List<E>>,- Value.Immutable<List<E>>
public static interface ListValue.Immutable<E>
extends ListValue<E>, CollectionValue.Immutable<E,List<E>,ListValue.Immutable<E>,ListValue.Mutable<E>>   
A type of 
CollectionValue.Immutable that is backed by a List.
 All "with" and "Without" methods are returning new instances as every
 instance is immutable.- 
Nested Class SummaryNested classes/interfaces inherited from interface org.spongepowered.api.data.value.CollectionValueCollectionValue.Immutable<E,C extends Collection<E>, I extends CollectionValue.Immutable<E, C, I, M>, M extends CollectionValue.Mutable<E, C, M, I>>, CollectionValue.Mutable<E, C extends Collection<E>, M extends CollectionValue.Mutable<E, C, M, I>, I extends CollectionValue.Immutable<E, C, I, M>> Nested classes/interfaces inherited from interface org.spongepowered.api.data.value.ListValueListValue.Immutable<E>, ListValue.Mutable<E>Nested classes/interfaces inherited from interface org.spongepowered.api.data.value.ValueValue.Factory, Value.Immutable<E>, Value.Mutable<E>
- 
Method SummaryModifier and TypeMethodDescriptiondefault ListValue.Immutable<E>Retrieves an immutable form of this value.Retrieves a mutable form of this value.Creates a newListValue.Immutablewith the desired element at the desired index.Creates a newListValue.Immutablewith the specified element at the specified position in the list.Creates a newListValue.Immutablewith the specified elements in the order that they are iterated to the list at the specified index.without(int index) Creates a newListValue.Immutablewithout the element at the specified index.Methods inherited from interface org.spongepowered.api.data.value.CollectionValueall, asMutableCopy, contains, containsAll, isEmpty, sizeMethods inherited from interface org.spongepowered.api.data.value.CollectionValue.ImmutableasMutableCopy, transform, with, withAll, withElement, without, withoutAll, withoutAllMethods inherited from interface java.lang.IterableforEach, iterator, spliterator
- 
Method Details- 
withCreates a newListValue.Immutablewith the specified element at the specified position in the list. As well, the element at the provided index is shifted to the right, increasing its and the elements thereafter their indices by one.- Parameters:
- index- The index to add the provided element at
- value- The element to add
- Returns:
- The new value, for chaining
 
- 
withCreates a newListValue.Immutablewith the specified elements in the order that they are iterated to the list at the specified index. The element at the provided index and elements thereafter are shifted to the right, increasing their indices by one.- Parameters:
- index- The index to add the elements at
- values- The elements to add
- Returns:
- The new value, for chaining
 
- 
withoutCreates a newListValue.Immutablewithout the element at the specified index. Shifts any subsequent elements to the left, subtracts one from their indices.- Parameters:
- index- The index of the element to exclude
- Returns:
- The new value, for chaining
 
- 
setCreates a newListValue.Immutablewith the desired element at the desired index.- Parameters:
- index- The index to replace the element
- element- The element to include at the index
- Returns:
- The new value, for chaining
 
- 
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.- Specified by:
- asMutablein interface- CollectionValue<E,- List<E>> 
- Specified by:
- asMutablein interface- CollectionValue.Immutable<E,- List<E>, - ListValue.Immutable<E>, - ListValue.Mutable<E>> 
- Specified by:
- asMutablein interface- ListValue<E>
- Specified by:
- asMutablein interface- Value<E>
- Specified by:
- asMutablein interface- Value.Immutable<E>
- Returns:
- A mutable value
 
- 
asImmutableDescription 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- CollectionValue.Immutable<E,- List<E>, - ListValue.Immutable<E>, - ListValue.Mutable<E>> 
- Specified by:
- asImmutablein interface- ListValue<E>
- Specified by:
- asImmutablein interface- Value<E>
- Specified by:
- asImmutablein interface- Value.Immutable<E>
- Returns:
- An immutable value
 
 
-