Class MutableListFactoryImpl
java.lang.Object
org.eclipse.collections.impl.list.mutable.MutableListFactoryImpl
- All Implemented Interfaces:
MutableListFactory
public class MutableListFactoryImpl extends Object implements MutableListFactory
-
Field Summary
Fields Modifier and Type Field Description static MutableListFactoryINSTANCE -
Constructor Summary
Constructors Constructor Description MutableListFactoryImpl() -
Method Summary
Modifier and Type Method Description <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>withAll(Iterable<? extends T> iterable)<T> MutableList<T>withInitialCapacity(int capacity)Same asMutableListFactory.empty().<T> MutableList<T>withNValues(int size, Function0<? extends T> factory)Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.collections.api.factory.list.MutableListFactory
of, of, ofAll, ofInitialCapacity, with, wrapCopy
-
Field Details
-
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
-