MutableListFactory
public class MutableListFactoryImpl extends java.lang.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(java.util.stream.Stream<? extends T> stream) |
|
<T> MutableList<T> |
with(T... items) |
|
<T> MutableList<T> |
withAll(java.lang.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, with
public static final MutableListFactory INSTANCE
public <T> MutableList<T> empty()
empty
in interface MutableListFactory
public <T> MutableList<T> with(T... items)
with
in interface MutableListFactory
public <T> MutableList<T> withInitialCapacity(int capacity)
MutableListFactory
MutableListFactory.empty()
. but takes in initial capacity.withInitialCapacity
in interface MutableListFactory
public <T> MutableList<T> withAll(java.lang.Iterable<? extends T> iterable)
withAll
in interface MutableListFactory
public <T> MutableList<T> withNValues(int size, Function0<? extends T> factory)
withNValues
in interface MutableListFactory
public <T> MutableList<T> fromStream(java.util.stream.Stream<? extends T> stream)
fromStream
in interface MutableListFactory
Copyright © 2004–2020. All rights reserved.