MutableSetFactory
public class MutableSetFactoryImpl extends Object implements MutableSetFactory
Modifier and Type | Field | Description |
---|---|---|
static MutableSetFactory |
INSTANCE |
Constructor | Description |
---|---|
MutableSetFactoryImpl() |
Modifier and Type | Method | Description |
---|---|---|
<T> MutableSet<T> |
empty() |
|
<T> MutableSet<T> |
fromStream(Stream<? extends T> stream) |
|
<T> MutableSet<T> |
with(T... items) |
|
<T> MutableSet<T> |
withAll(Iterable<? extends T> items) |
|
<T> MutableSet<T> |
withInitialCapacity(int capacity) |
Same as
MutableSetFactory.empty() . |
of, of, ofAll, ofInitialCapacity, with
public static final MutableSetFactory INSTANCE
public <T> MutableSet<T> empty()
empty
in interface MutableSetFactory
public <T> MutableSet<T> withInitialCapacity(int capacity)
MutableSetFactory
MutableSetFactory.empty()
. but takes in initial capacity.withInitialCapacity
in interface MutableSetFactory
public <T> MutableSet<T> with(T... items)
with
in interface MutableSetFactory
public <T> MutableSet<T> withAll(Iterable<? extends T> items)
withAll
in interface MutableSetFactory
public <T> MutableSet<T> fromStream(Stream<? extends T> stream)
fromStream
in interface MutableSetFactory
Copyright © 2004–2019. All rights reserved.