Class MutableListFactoryImpl
java.lang.Object
org.eclipse.collections.impl.list.mutable.MutableListFactoryImpl
- All Implemented Interfaces:
MutableListFactory
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> MutableList<T> empty()<T> MutableList<T> fromStream(Stream<? extends T> stream) <T> MutableList<T> with(T... items) Creates a new list using the passeditemsargument as the backing store.<T> MutableList<T> <T> MutableList<T> withInitialCapacity(int capacity) Same asMutableListFactory.empty().<T> MutableList<T> withNValues(int size, Function0<? extends T> factory) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface MutableListFactory
of, of, ofAll, ofInitialCapacity, with, wrapCopy
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
MutableListFactoryImpl
public MutableListFactoryImpl()
-
-
Method Details
-
empty
- Specified by:
emptyin interfaceMutableListFactory
-
with
Creates a new list using the passeditemsargument 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. !!!
- Specified by:
within interfaceMutableListFactory
-
withInitialCapacity
Description copied from interface:MutableListFactorySame asMutableListFactory.empty(). but takes in initial capacity.- Specified by:
withInitialCapacityin interfaceMutableListFactory
-
withAll
- Specified by:
withAllin interfaceMutableListFactory
-
withNValues
- Specified by:
withNValuesin interfaceMutableListFactory
-
fromStream
- Specified by:
fromStreamin interfaceMutableListFactory
-