Interface MutableList<E>

    • Method Detail

      • append

        MutableList<E> append​(E val)
        Adds one item to the end of the ImList.
        Specified by:
        append in interface BaseList<E>
        Parameters:
        val - the value to insert
        Returns:
        a new ImList with the additional item at the end.
      • immutable

        ImList<E> immutable()
        Returns a immutable version of this mutable list.
      • concat

        default MutableList<E> concat​(java.lang.Iterable<? extends E> es)
        Efficiently adds items to the end of this ImList.
        Specified by:
        concat in interface BaseList<E>
        Specified by:
        concat in interface Transformable<E>
        Specified by:
        concat in interface UnmodIterable<E>
        Parameters:
        es - the values to insert
        Returns:
        a new ImList with the additional items at the end.
      • replace

        MutableList<E> replace​(int idx,
                               E e)
        Replace the item at the given index. Note: i.replace(i.size(), o) used to be equivalent to i.concat(o), but it probably won't be for the RRB tree implementation, so this will change too.
        Specified by:
        replace in interface BaseList<E>
        Parameters:
        idx - the index where the value should be stored.
        e - the value to store
        Returns:
        a new ImList with the replaced item