K - the type of the keys in the mappublic interface IMutableConstrainedMap<K> extends IConstrainedMap<K>
IConstrainedMap. Note that it is the values that can be mutated.
Existing constraints cannot be modified. However, some implementations may allow adding
constraints for keys that currently doesn't have a constraint, and thus no current value.| Modifier and Type | Method and Description |
|---|---|
<T> void |
put(K key,
IConstraint<T> constraint,
T value)
Map
key to value, if allowed according to constraint and additional
restrictions on this map such as a conflicting constraint being in effect
for this key. |
void |
put(K key,
Object value)
Map
key to value, if allowed according to either an existing
constraint or an implicit default constraint, if available. |
<T> void |
putPersistedString(K key,
IConstraint<T> constraint,
String persisted)
Map
key to the value obtained by parsing persisted, if allowed according to
constraint and additional restrictions on this map such as a conflicting
constraint being in effect for this key. |
void |
putPersistedString(K key,
String persisted)
Map
key to the value obtained by parsing persisted, if allowed according to
either an existing constraint or an implicit default constraint, if
available. |
emptyWithSameConstraints, get, getConstraint, getPersistableString, keySet, mutableCopyvoid put(K key, Object value) throws QuantityConversionException
key to value, if allowed according to either an existing
constraint or an implicit default constraint, if available.ClassCastException - if the actual type of value prevents it from being acceptedIllegalArgumentException - if some restriction built into this map prevents values to be added for
key, or possibly if some type aspect of value prevents it from
being acceptedQuantityConversionException - if value is rejected by the constraint in some other wayvoid putPersistedString(K key, String persisted) throws QuantityConversionException
key to the value obtained by parsing persisted, if allowed according to
either an existing constraint or an implicit default constraint, if
available.IllegalArgumentException - if some restriction built into this map prevents values to be added for
keyQuantityConversionException - if persisted is rejected by the constraint in some way<T> void put(K key, IConstraint<T> constraint, T value) throws QuantityConversionException
key to value, if allowed according to constraint and additional
restrictions on this map such as a conflicting constraint being in effect
for this key.IllegalArgumentException - if some restriction built into this map prevents values to be added for
key, or a different constraint being in effect for
key, or possibly if some type aspect of value prevents it from
being acceptedQuantityConversionException - if value is rejected by the constraint in some other way<T> void putPersistedString(K key, IConstraint<T> constraint, String persisted) throws QuantityConversionException
key to the value obtained by parsing persisted, if allowed according to
constraint and additional restrictions on this map such as a conflicting
constraint being in effect for this key.IllegalArgumentException - if some restriction built into this map prevents values to be added for
key, or a different constraint being in effect for
keyQuantityConversionException - if persisted is rejected by the constraint in some other wayCopyright © 2019. All rights reserved.