Interface WeightedCollectionValue.Mutable<E>
- Type Parameters:
E- The type of weighted object
- All Superinterfaces:
CollectionValue<TableEntry<E>, WeightedTable<E>>, CollectionValue.Mutable<TableEntry<E>, WeightedTable<E>, WeightedCollectionValue.Mutable<E>, WeightedCollectionValue.Immutable<E>>, Iterable<TableEntry<E>>, Value<WeightedTable<E>>, Value.Mutable<WeightedTable<E>>, WeightedCollectionValue<E>
- Enclosing interface:
WeightedCollectionValue<E>
public static interface WeightedCollectionValue.Mutable<E>
extends WeightedCollectionValue<E>, CollectionValue.Mutable<TableEntry<E>, WeightedTable<E>, WeightedCollectionValue.Mutable<E>, WeightedCollectionValue.Immutable<E>>
Represents a particular type of
CollectionValue.Mutable that is backed by
a WeightedTable.-
Nested Class Summary
Nested classes/interfaces inherited from interface CollectionValue
CollectionValue.Immutable<E,C, I, M>, CollectionValue.Mutable<E, C, M, I> Nested classes/interfaces inherited from interface Value
Value.Factory, Value.Immutable<E>, Value.Mutable<E>Nested classes/interfaces inherited from interface WeightedCollectionValue
WeightedCollectionValue.Immutable<E>, WeightedCollectionValue.Mutable<E> -
Method Summary
Modifier and TypeMethodDescriptionRetrieves an immutable form of this value.default WeightedCollectionValue.Mutable<E> Retrieves a mutable form of this value.default WeightedCollectionValue.Mutable<E> Retrieves a copy in the mutable form of this value.Methods inherited from interface CollectionValue
all, contains, containsAll, isEmpty, sizeMethods inherited from interface CollectionValue.Mutable
add, addAll, copy, remove, removeAll, removeAll, set, transformMethods inherited from interface Iterable
forEach, iterator, spliteratorMethods inherited from interface WeightedCollectionValue
get, key
-
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<TableEntry<E>, WeightedTable<E>>- Specified by:
asMutablein interfaceCollectionValue.Mutable<TableEntry<E>, WeightedTable<E>, WeightedCollectionValue.Mutable<E>, WeightedCollectionValue.Immutable<E>>- Specified by:
asMutablein interfaceValue<E>- Specified by:
asMutablein interfaceValue.Mutable<E>- Specified by:
asMutablein interfaceWeightedCollectionValue<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<TableEntry<E>, WeightedTable<E>>- Specified by:
asMutableCopyin interfaceCollectionValue.Mutable<TableEntry<E>, WeightedTable<E>, WeightedCollectionValue.Mutable<E>, WeightedCollectionValue.Immutable<E>>- Specified by:
asMutableCopyin interfaceValue<E>- Specified by:
asMutableCopyin interfaceValue.Mutable<E>- Specified by:
asMutableCopyin interfaceWeightedCollectionValue<E>- Returns:
- A mutable value
-
asImmutable
WeightedCollectionValue.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<TableEntry<E>, WeightedTable<E>>- Specified by:
asImmutablein interfaceCollectionValue.Mutable<TableEntry<E>, WeightedTable<E>, WeightedCollectionValue.Mutable<E>, WeightedCollectionValue.Immutable<E>>- Specified by:
asImmutablein interfaceValue<E>- Specified by:
asImmutablein interfaceValue.Mutable<E>- Specified by:
asImmutablein interfaceWeightedCollectionValue<E>- Returns:
- An immutable value
-