E
- The type of elementpublic interface ImmutableBoundedValue<E> extends BoundedValue<E>, ImmutableValue<E>
BoundedValue
that is immutable as an
ImmutableValue
.Modifier and Type | Method and Description |
---|---|
MutableBoundedValue<E> |
asMutable()
Creates a mutable
Value for this ImmutableValue . |
ImmutableBoundedValue<E> |
transform(Function<E,E> function)
Retrieves the underlying value for this
ImmutableValue and
applies the given Function onto that value, after which, the
product is sent to a new ImmutableValue replacing this one. |
getComparator, getMaxValue, getMinValue
with
ImmutableBoundedValue<E> transform(Function<E,E> function)
ImmutableValue
ImmutableValue
and
applies the given Function
onto that value, after which, the
product is sent to a new ImmutableValue
replacing this one.
If the ValueContainer
too is immutable, a new instance of
the ValueContainer
may be created. If the ValueContainer
is mutable, the same instance of the ValueContainer
is retained.
transform
in interface ImmutableValue<E>
function
- The function to apply onto the existing valueValueContainer
, a new instance if it too is
immutableMutableBoundedValue<E> asMutable()
ImmutableValue
Value
for this ImmutableValue
.asMutable
in interface ImmutableValue<E>