Class PersistentVector.MutVector<F>

    • Method Detail

      • size

        public int size()
        Description copied from interface: Sized
        Returns the number of items in this collection or iterable.
        Specified by:
        size in interface Collection<F>
        Specified by:
        size in interface List<F>
        Specified by:
        size in interface Sized
      • append

        public MutList<F> append​(F val)
        Description copied from interface: MutList
        Adds one item to the end of the ImList.
        Specified by:
        append in interface BaseList<F>
        Specified by:
        append in interface MutList<F>
        Parameters:
        val - the value to insert
        Returns:
        a new ImList with the additional item at the end.
      • get

        public F get​(int i)
        Specified by:
        get in interface List<F>
      • replace

        public MutList<F> replace​(int idx,
                                  F e)
        Description copied from interface: MutList
        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<F>
        Specified by:
        replace in interface MutList<F>
        Parameters:
        idx - the index where the value should be stored.
        e - the value to store
        Returns:
        a new ImList with the replaced item