Interface Value.Immutable<E>

Type Parameters:
E - The type of value
All Superinterfaces:
Value<E>
All Known Subinterfaces:
CollectionValue.Immutable<E,C,I,M>, ListValue.Immutable<E>, MapValue.Immutable<K,V>, SetValue.Immutable<E>, WeightedCollectionValue.Immutable<E>
Enclosing interface:
Value<E>

public static interface Value.Immutable<E> extends Value<E>
Represents an immutable representation of a Value where any modifications of the underlying value result in a new instance of an Value.Immutable and/or the ValueContainer if the ValueContainer too is immutable.

The basis for immutability is that once created, the value can not be changed for any reason. Change requires a new instance to be created. As the Value.Immutable always has a ValueContainer, it is recommended that the owning ValueContainer too is immutable, unless the Value.Immutable is being passed around for data processing. The underlying value of an Value.Immutable may be itself mutable, however utilizing any provided methods by any of the Value.Immutable classes is recommended.