Interface DataHolder.Immutable<I extends DataHolder.Immutable<I>>

    • Method Detail

      • transform

        <E> Optional<I> transform​(Key<? extends Value<E>> key,
                                  Function<E,​E> function)
        Applies a transformation on the provided Value such that the return value of Function.apply(Object) will become the end resulting value set into the newly created DataHolder.Immutable.
        Type Parameters:
        E - The type of value
        Parameters:
        key - The key linked to
        function - The function to manipulate the value
        Returns:
        The newly created immutable value store
      • transform

        default <E> Optional<I> transform​(Supplier<? extends Key<? extends Value<E>>> key,
                                          Function<E,​E> function)
        Applies a transformation on the provided Value such that the return value of Function.apply(Object) will become the end resulting value set into the newly created DataHolder.Immutable.
        Type Parameters:
        E - The type of value
        Parameters:
        key - The key linked to
        function - The function to manipulate the value
        Returns:
        The newly created immutable value store
      • with

        <E> Optional<I> with​(Key<? extends Value<E>> key,
                             E value)
        Creates a new DataHolder.Immutable with the provided value by Key. If the key is supported by this value store, the returned value store will be present.
        Type Parameters:
        E - The type of value
        Parameters:
        key - The key to the value to set
        value - The value to set
        Returns:
        The new immutable value store
      • with

        default <E> Optional<I> with​(Supplier<? extends Key<? extends Value<E>>> key,
                                     E value)
        Creates a new DataHolder.Immutable with the provided value by Key. If the key is supported by this value store, the returned value store will be present.
        Type Parameters:
        E - The type of value
        Parameters:
        key - The key to the value to set
        value - The value to set
        Returns:
        The new immutable value store
      • with

        Optional<I> with​(Value<?> value)
        Offers the given value as defined by the provided Key such that if the Key is supported, a new DataHolder.Immutable is created.
        Parameters:
        value - The value to set
        Returns:
        The new immutable value store
      • without

        default Optional<I> without​(Value<?> value)
        Creates a new DataHolder.Immutable without the key of the provided Value. If the key is supported by this value store, the returned value store will be present.
        Parameters:
        value - The value
        Returns:
        The new immutable value store
      • without

        Optional<I> without​(Key<?> key)
        Creates a new DataHolder.Immutable without the provided Key. If the key is supported by this value store, the returned value store will be present.
        Parameters:
        key - The key to remove
        Returns:
        The new immutable value store
      • without

        default Optional<I> without​(Supplier<? extends Key<?>> key)
        Creates a new DataHolder.Immutable without the provided Key. If the key is supported by this value store, the returned value store will be present.
        Parameters:
        key - The key to remove
        Returns:
        The new immutable value store
      • mergeWith

        default I mergeWith​(I that)
        Attempts to merge the Value.Immutables from this DataHolder.Immutable and the given DataHolder.Immutable to produce a new instance of the merged result.
        Parameters:
        that - The other immutable value store to gather values from
        Returns:
        The new immutable value store instance