public interface ImmutableAttributeMapValue extends ImmutableMapValue<Attribute,List<AttributeModifier>>
ImmutableMapValue
specifically handling
Attribute
s and the AttributeModifier
s that modify the
final value. The underlying list as well is not mutable once offered to an
ImmutableAttributeMapValue
.Modifier and Type | Method and Description |
---|---|
AttributeMapValue |
asMutable()
Creates a mutable
Value for this ImmutableValue . |
ImmutableValue<Double> |
attributeValue(Attribute attribute)
Gets the finalized
Attribute 's actual value after all associated
AttributeModifier s are applied. |
ImmutableValue<Double> |
base(Attribute attribute)
Gets the base
Attribute value. |
ImmutableAttributeMapValue |
transform(Function<Map<Attribute,List<AttributeModifier>>,Map<Attribute,List<AttributeModifier>>> 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. |
ImmutableAttributeMapValue |
with(Attribute key,
List<AttributeModifier> value)
Associates the provided key to the provided value in the new map.
|
ImmutableAttributeMapValue |
with(Map<Attribute,List<AttributeModifier>> value)
Creates a new
ImmutableValue with the given E typed
value, such that if the owning ValueContainer is immutable, the
ValueContainer too is recreated as a new instance with the new
ImmutableValue . |
ImmutableAttributeMapValue |
withAll(Map<Attribute,List<AttributeModifier>> value)
Associates all provided
Map.Entry along with all pre-existing
map entries in a new ImmutableMapValue . |
ImmutableAttributeMapValue |
without(Attribute key)
Creates a new
ImmutableMapValue without the provided key and the
associated value. |
ImmutableAttributeMapValue |
withoutAll(Iterable<Attribute> keys)
Creates a new
ImmutableMapValue without the provided keys and
their associated values. |
ImmutableAttributeMapValue |
withoutAll(Predicate<Map.Entry<Attribute,List<AttributeModifier>>> predicate)
Creates a new
ImmutableMapValue such that all entries are
filtered by the provided Predicate , any that return
true are retained in the new value. |
containsKey, containsValue, entrySet, keySet, size, values
ImmutableAttributeMapValue with(Attribute key, List<AttributeModifier> value)
ImmutableMapValue
with
in interface ImmutableMapValue<Attribute,List<AttributeModifier>>
key
- The key to associate to the valuevalue
- The value associated with the keyImmutableAttributeMapValue with(Map<Attribute,List<AttributeModifier>> value)
ImmutableValue
ImmutableValue
with the given E
typed
value, such that if the owning ValueContainer
is immutable, the
ValueContainer
too is recreated as a new instance with the new
ImmutableValue
.with
in interface ImmutableMapValue<Attribute,List<AttributeModifier>>
with
in interface ImmutableValue<Map<Attribute,List<AttributeModifier>>>
value
- The value to replaceValueContainer
, a new instance if it too is
immutableImmutableAttributeMapValue withAll(Map<Attribute,List<AttributeModifier>> value)
ImmutableMapValue
Map.Entry
along with all pre-existing
map entries in a new ImmutableMapValue
.withAll
in interface ImmutableMapValue<Attribute,List<AttributeModifier>>
value
- The map of key values to setImmutableAttributeMapValue without(Attribute key)
ImmutableMapValue
ImmutableMapValue
without the provided key and the
associated value.without
in interface ImmutableMapValue<Attribute,List<AttributeModifier>>
key
- The key to exclude the associationImmutableAttributeMapValue withoutAll(Iterable<Attribute> keys)
ImmutableMapValue
ImmutableMapValue
without the provided keys and
their associated values.withoutAll
in interface ImmutableMapValue<Attribute,List<AttributeModifier>>
keys
- The keys to excludeImmutableAttributeMapValue withoutAll(Predicate<Map.Entry<Attribute,List<AttributeModifier>>> predicate)
ImmutableMapValue
ImmutableMapValue
such that all entries are
filtered by the provided Predicate
, any that return
true
are retained in the new value. Elements that return
true
from Predicate.apply(Object)
are kept, and
those that return false
are excluded.withoutAll
in interface ImmutableMapValue<Attribute,List<AttributeModifier>>
predicate
- The predicate to filterImmutableAttributeMapValue transform(Function<Map<Attribute,List<AttributeModifier>>,Map<Attribute,List<AttributeModifier>>> 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 ImmutableMapValue<Attribute,List<AttributeModifier>>
transform
in interface ImmutableValue<Map<Attribute,List<AttributeModifier>>>
function
- The function to apply onto the existing valueValueContainer
, a new instance if it too is
immutableAttributeMapValue asMutable()
ImmutableValue
Value
for this ImmutableValue
.asMutable
in interface ImmutableMapValue<Attribute,List<AttributeModifier>>
asMutable
in interface ImmutableValue<Map<Attribute,List<AttributeModifier>>>
ImmutableValue<Double> attributeValue(Attribute attribute)
Attribute
's actual value after all associated
AttributeModifier
s are applied.attribute
- The attribute to retrieveImmutableValue<Double> base(Attribute attribute)
Attribute
value.attribute
- The base attribute