MutableListFactorypublic class MutableListFactoryImpl extends Object implements MutableListFactory
| Modifier and Type | Field | Description |
|---|---|---|
static MutableListFactory |
INSTANCE |
| Constructor | Description |
|---|---|
MutableListFactoryImpl() |
| Modifier and Type | Method | Description |
|---|---|---|
<T> MutableList<T> |
empty() |
|
<T> MutableList<T> |
fromStream(Stream<? extends T> stream) |
|
<T> MutableList<T> |
with(T... items) |
|
<T> MutableList<T> |
withAll(Iterable<? extends T> iterable) |
|
<T> MutableList<T> |
withInitialCapacity(int capacity) |
Same as
MutableListFactory.empty(). |
<T> MutableList<T> |
withNValues(int size,
Function0<? extends T> factory) |
of, of, ofAll, ofInitialCapacity, withpublic static final MutableListFactory INSTANCE
public <T> MutableList<T> empty()
empty in interface MutableListFactorypublic <T> MutableList<T> with(T... items)
with in interface MutableListFactorypublic <T> MutableList<T> withInitialCapacity(int capacity)
MutableListFactoryMutableListFactory.empty(). but takes in initial capacity.withInitialCapacity in interface MutableListFactorypublic <T> MutableList<T> withAll(Iterable<? extends T> iterable)
withAll in interface MutableListFactorypublic <T> MutableList<T> withNValues(int size, Function0<? extends T> factory)
withNValues in interface MutableListFactorypublic <T> MutableList<T> fromStream(Stream<? extends T> stream)
fromStream in interface MutableListFactoryCopyright © 2004–2019. All rights reserved.