Interface ListValue.Immutable<E>

    • Method Detail

      • with

        ListValue.Immutable<E> with​(int index,
                                    E value)
        Creates a new ListValue.Immutable with the specified element at the specified position in the list. As well, the element at the provided index is shifted to the right, increasing its and the elements thereafter their indices by one.
        Parameters:
        index - The index to add the provided element at
        value - The element to add
        Returns:
        The new value, for chaining
      • with

        ListValue.Immutable<E> with​(int index,
                                    java.lang.Iterable<E> values)
        Creates a new ListValue.Immutable with the specified elements in the order that they are iterated to the list at the specified index. The element at the provided index and elements thereafter are shifted to the right, increasing their indices by one.
        Parameters:
        index - The index to add the elements at
        values - The elements to add
        Returns:
        The new value, for chaining
      • without

        ListValue.Immutable<E> without​(int index)
        Creates a new ListValue.Immutable without the element at the specified index. Shifts any subsequent elements to the left, subtracts one from their indices.
        Parameters:
        index - The index of the element to exclude
        Returns:
        The new value, for chaining
      • set

        ListValue.Immutable<E> set​(int index,
                                   E element)
        Creates a new ListValue.Immutable with the desired element at the desired index.
        Parameters:
        index - The index to replace the element
        element - The element to include at the index
        Returns:
        The new value, for chaining