Package org.spongepowered.api.data.value
Interface SetValue.Mutable<E>
- Type Parameters:
E- The type of elements supported
- All Superinterfaces:
CollectionValue<E,,Set<E>> CollectionValue.Mutable<E,,Set<E>, SetValue.Mutable<E>, SetValue.Immutable<E>> Iterable<E>,SetValue<E>,Value<Set<E>>,Value.Mutable<Set<E>>
public static interface SetValue.Mutable<E>
extends SetValue<E>, CollectionValue.Mutable<E,Set<E>,SetValue.Mutable<E>,SetValue.Immutable<E>>
Represents a type of
CollectionValue.Mutable backed by a Set. The
reasoning is that a Set retains no ordering of the elements it
contains.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.spongepowered.api.data.value.CollectionValue
CollectionValue.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.SetValue
SetValue.Immutable<E>, SetValue.Mutable<E>Nested classes/interfaces inherited from interface org.spongepowered.api.data.value.Value
Value.Factory, Value.Immutable<E>, Value.Mutable<E> -
Method Summary
Modifier and TypeMethodDescriptionRetrieves an immutable form of this value.default SetValue.Mutable<E> Retrieves a mutable form of this value.default SetValue.Mutable<E> Retrieves a copy in the mutable form of this value.Methods inherited from interface org.spongepowered.api.data.value.CollectionValue
all, contains, containsAll, isEmpty, sizeMethods inherited from interface org.spongepowered.api.data.value.CollectionValue.Mutable
add, addAll, copy, remove, removeAll, removeAll, set, transformMethods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
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 interfaceCollectionValue<E,Set<E>> - Specified by:
asMutablein interfaceCollectionValue.Mutable<E,Set<E>, SetValue.Mutable<E>, SetValue.Immutable<E>> - Specified by:
asMutablein interfaceSetValue<E>- Specified by:
asMutablein interfaceValue<E>- Specified by:
asMutablein interfaceValue.Mutable<E>- Returns:
- A mutable value
-
asMutableCopy
Description copied from interface:ValueRetrieves a copy in the mutable form of this value. The new is created with the same key and values.- Specified by:
asMutableCopyin interfaceCollectionValue<E,Set<E>> - Specified by:
asMutableCopyin interfaceCollectionValue.Mutable<E,Set<E>, SetValue.Mutable<E>, SetValue.Immutable<E>> - Specified by:
asMutableCopyin interfaceSetValue<E>- Specified by:
asMutableCopyin interfaceValue<E>- Specified by:
asMutableCopyin interfaceValue.Mutable<E>- Returns:
- A mutable value
-
asImmutable
SetValue.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 interfaceCollectionValue<E,Set<E>> - Specified by:
asImmutablein interfaceCollectionValue.Mutable<E,Set<E>, SetValue.Mutable<E>, SetValue.Immutable<E>> - Specified by:
asImmutablein interfaceSetValue<E>- Specified by:
asImmutablein interfaceValue<E>- Specified by:
asImmutablein interfaceValue.Mutable<E>- Returns:
- An immutable value
-