Package org.spongepowered.api.data.value
Interface WeightedCollectionValue.Immutable<E>
-
- Type Parameters:
E
- The type of weighted object
- All Superinterfaces:
CollectionValue<TableEntry<E>,WeightedTable<E>>
,CollectionValue.Immutable<TableEntry<E>,WeightedTable<E>,WeightedCollectionValue.Immutable<E>,WeightedCollectionValue.Mutable<E>>
,Iterable<TableEntry<E>>
,Value<WeightedTable<E>>
,Value.Immutable<WeightedTable<E>>
,WeightedCollectionValue<E>
- Enclosing interface:
- WeightedCollectionValue<E>
public static interface WeightedCollectionValue.Immutable<E> extends WeightedCollectionValue<E>, CollectionValue.Immutable<TableEntry<E>,WeightedTable<E>,WeightedCollectionValue.Immutable<E>,WeightedCollectionValue.Mutable<E>>
Represents a particular type ofCollectionValue.Immutable
that is backed by aWeightedTable
.
-
-
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.Value
Value.Factory, Value.Immutable<E>, Value.Mutable<E>
-
Nested classes/interfaces inherited from interface org.spongepowered.api.data.value.WeightedCollectionValue
WeightedCollectionValue.Immutable<E>, WeightedCollectionValue.Mutable<E>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default WeightedCollectionValue.Immutable<E>
asImmutable()
Retrieves an immutable form of this value.WeightedCollectionValue.Mutable<E>
asMutable()
Retrieves a mutable form of this value.default WeightedCollectionValue.Mutable<E>
asMutableCopy()
Retrieves a copy in the mutable form of this value.-
Methods inherited from interface org.spongepowered.api.data.value.CollectionValue
all, contains, containsAll, isEmpty, size
-
Methods inherited from interface org.spongepowered.api.data.value.CollectionValue.Immutable
transform, with, withAll, withElement, without, withoutAll, withoutAll
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Methods inherited from interface org.spongepowered.api.data.value.WeightedCollectionValue
get, key
-
-
-
-
Method Detail
-
asMutable
WeightedCollectionValue.Mutable<E> asMutable()
Description copied from interface:Value
Retrieves a mutable form of this value. Due to the vague nature of the value itself, some cases can already provide aValue.Mutable
instance where this would simply return itself. In other cases, where the retrieved value is anValue.Immutable
instance, a new mutable value is created with the same key and values.- Specified by:
asMutable
in interfaceCollectionValue<TableEntry<E>,WeightedTable<E>>
- Specified by:
asMutable
in interfaceCollectionValue.Immutable<TableEntry<E>,WeightedTable<E>,WeightedCollectionValue.Immutable<E>,WeightedCollectionValue.Mutable<E>>
- Specified by:
asMutable
in interfaceValue<E>
- Specified by:
asMutable
in interfaceValue.Immutable<E>
- Specified by:
asMutable
in interfaceWeightedCollectionValue<E>
- Returns:
- A mutable value
-
asMutableCopy
default WeightedCollectionValue.Mutable<E> asMutableCopy()
Description copied from interface:Value
Retrieves a copy in the mutable form of this value. The new is created with the same key and values.- Specified by:
asMutableCopy
in interfaceCollectionValue<TableEntry<E>,WeightedTable<E>>
- Specified by:
asMutableCopy
in interfaceCollectionValue.Immutable<TableEntry<E>,WeightedTable<E>,WeightedCollectionValue.Immutable<E>,WeightedCollectionValue.Mutable<E>>
- Specified by:
asMutableCopy
in interfaceValue<E>
- Specified by:
asMutableCopy
in interfaceValue.Immutable<E>
- Specified by:
asMutableCopy
in interfaceWeightedCollectionValue<E>
- Returns:
- A mutable value
-
asImmutable
default WeightedCollectionValue.Immutable<E> asImmutable()
Description copied from interface:Value
Retrieves an immutable form of this value. Due to the vague nature of the value itself, some cases can already provide aValue.Immutable
instance where this would simply return itself. In other cases, where the retrieved value is aValue.Mutable
instance, a new immutable value is created with the same key and values.- Specified by:
asImmutable
in interfaceCollectionValue<TableEntry<E>,WeightedTable<E>>
- Specified by:
asImmutable
in interfaceCollectionValue.Immutable<TableEntry<E>,WeightedTable<E>,WeightedCollectionValue.Immutable<E>,WeightedCollectionValue.Mutable<E>>
- Specified by:
asImmutable
in interfaceValue<E>
- Specified by:
asImmutable
in interfaceValue.Immutable<E>
- Specified by:
asImmutable
in interfaceWeightedCollectionValue<E>
- Returns:
- An immutable value
-
-