Interface MutableListFactory

    • Method Detail

      • with

        <T> MutableList<T> with​(T... items)
        Creates a new list using the passed items argument as the backing store.

        !!! WARNING: This method uses the passed in array, so can be very unsafe if the original array is held onto anywhere else. !!!

      • wrapCopy

        default <T> MutableList<T> wrapCopy​(T... array)
        Creates a new list by first copying the array passed in.
      • ofInitialCapacity

        default <T> MutableList<T> ofInitialCapacity​(int capacity)
        Same as empty(). but takes in initial capacity.
      • withInitialCapacity

        <T> MutableList<T> withInitialCapacity​(int capacity)
        Same as empty(). but takes in initial capacity.
      • withAll

        <T> MutableList<T> withAll​(java.lang.Iterable<? extends T> iterable)
      • fromStream

        <T> MutableList<T> fromStream​(java.util.stream.Stream<? extends T> stream)
        Since:
        10.0.