Interface Value.Mutable<E>

    • Method Detail

      • set

        Value.Mutable<E> set​(E value)
        Sets the underlying value to the provided value.
        Parameters:
        value - The value to set
        Returns:
        The owning ValueContainer
      • transform

        Value.Mutable<E> transform​(java.util.function.Function<E,​E> function)
        Attempts to transform the underlying value based on the provided Function such that the result of Function.apply(Object) will replace the underlying value.
        Parameters:
        function - The function to apply on the existing value
        Returns:
        The owning ValueContainer
      • asMutable

        default Value.Mutable<E> asMutable()
        Description copied from interface: Value
        Retrieves a mutable form of this value. Due to the vague nature of the value itself, some cases can already provide a Value.Mutable instance where this would simply return itself. In other cases, where the retrieved value is an Value.Immutable instance, a new mutable value is created with the same key and values.
        Specified by:
        asMutable in interface Value<E>
        Returns:
        A mutable value
      • asMutableCopy

        default Value.Mutable<E> asMutableCopy()
        Description copied from interface: Value
        Retrieves a copy in the mutable form of this value. The new is created with the same key and values.
        Specified by:
        asMutableCopy in interface Value<E>
        Returns:
        A mutable value
      • copy

        Value.Mutable<E> copy()
        Makes an independent copy of this Value.Mutable with the same initial data. Both this value and the new value will refer to the same object initially.
        Returns:
        A new copy of this Value.Mutable