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 MutableListFactory
INSTANCE
-
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 passeditems
argument 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, wait
Methods 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:
empty
in interfaceMutableListFactory
-
with
Creates a new list using the passeditems
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. !!!
- Specified by:
with
in interfaceMutableListFactory
-
withInitialCapacity
Description copied from interface:MutableListFactory
Same asMutableListFactory.empty()
. but takes in initial capacity.- Specified by:
withInitialCapacity
in interfaceMutableListFactory
-
withAll
- Specified by:
withAll
in interfaceMutableListFactory
-
withNValues
- Specified by:
withNValues
in interfaceMutableListFactory
-
fromStream
- Specified by:
fromStream
in interfaceMutableListFactory
-