public interface AttributeMapValue extends MapValue<Attribute,List<AttributeModifier>>
MapValue
that handles the intricacies of
Attribute
s and the List
of AttributeModifier
s.
// todo probably rewrite attributes to work...Modifier and Type | Method and Description |
---|---|
ImmutableAttributeMapValue |
asImmutable()
Gets the
ImmutableValue version of this Value such that
all data is duplicated across to the new ImmutableValue . |
Value<Double> |
attributeValue(Attribute attribute)
Gets the finalized
Attribute 's actual value after all associated
AttributeModifier s are applied. |
Value<Double> |
base(Attribute attribute)
Gets the base attribute value before any
AttributeModifier s are
applied. |
AttributeMapValue |
put(Attribute key,
List<AttributeModifier> value)
Associates the provided key to the provided value.
|
AttributeMapValue |
putAll(Map<Attribute,List<AttributeModifier>> map)
Associates all provided
Map.Entry to this map value. |
AttributeMapValue |
remove(Attribute key)
Removes the association of the provided key to the value currently
associated.
|
AttributeMapValue |
removeAll(Iterable<Attribute> keys)
Removes all key value associations of the provided keys.
|
AttributeMapValue |
removeAll(java.util.function.Predicate<Map.Entry<Attribute,List<AttributeModifier>>> predicate)
|
containsKey, containsValue, entrySet, keySet, size, transform, values
AttributeMapValue put(Attribute key, List<AttributeModifier> value)
MapValue
put
in interface MapValue<Attribute,List<AttributeModifier>>
key
- The key to associate to the valuevalue
- The value associated with the keyAttributeMapValue putAll(Map<Attribute,List<AttributeModifier>> map)
MapValue
Map.Entry
to this map value.putAll
in interface MapValue<Attribute,List<AttributeModifier>>
map
- The map of key values to setAttributeMapValue remove(Attribute key)
MapValue
remove
in interface MapValue<Attribute,List<AttributeModifier>>
key
- The key to removeAttributeMapValue removeAll(Iterable<Attribute> keys)
MapValue
removeAll
in interface MapValue<Attribute,List<AttributeModifier>>
keys
- The keys to removeAttributeMapValue removeAll(java.util.function.Predicate<Map.Entry<Attribute,List<AttributeModifier>>> predicate)
MapValue
Predicate
to all Map.Entry
within this
MapValue
. Any entries that are false will be removed from the
map value.removeAll
in interface MapValue<Attribute,List<AttributeModifier>>
predicate
- The predicate to filerImmutableAttributeMapValue asImmutable()
Value
ImmutableValue
version of this Value
such that
all data is duplicated across to the new ImmutableValue
. Note
that once created, the ImmutableValue
is not going to change.asImmutable
in interface MapValue<Attribute,List<AttributeModifier>>
asImmutable
in interface Value<Map<Attribute,List<AttributeModifier>>>
ImmutableValue
instanceValue<Double> attributeValue(Attribute attribute)
Attribute
's actual value after all associated
AttributeModifier
s are applied.attribute
- The attribute to retrieve the final value forValue<Double> base(Attribute attribute)
AttributeModifier
s are
applied.attribute
- The attribute