ImmutableBagFactory
public enum ImmutableBagFactoryImpl extends java.lang.Enum<ImmutableBagFactoryImpl> implements ImmutableBagFactory
Enum Constant | Description |
---|---|
INSTANCE |
Modifier and Type | Method | Description |
---|---|---|
<T> ImmutableBag<T> |
empty() |
|
<T> ImmutableBag<T> |
of() |
Same as
ImmutableBagFactory.empty() . |
<T> ImmutableBag<T> |
of(T element) |
Same as
ImmutableBagFactory.with(Object) . |
<T> ImmutableBag<T> |
of(T... elements) |
Same as
ImmutableBagFactory.with(Object[]) . |
<T> ImmutableBag<T> |
ofAll(java.lang.Iterable<? extends T> items) |
|
static ImmutableBagFactoryImpl |
valueOf(java.lang.String name) |
Returns the enum constant of this type with the specified name.
|
static ImmutableBagFactoryImpl[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
<T> ImmutableBag<T> |
with() |
Same as
ImmutableBagFactory.empty() . |
<T> ImmutableBag<T> |
with(T element) |
|
<T> ImmutableBag<T> |
with(T... elements) |
|
<T> ImmutableBag<T> |
withAll(java.lang.Iterable<? extends T> items) |
public static final ImmutableBagFactoryImpl INSTANCE
public static ImmutableBagFactoryImpl[] values()
for (ImmutableBagFactoryImpl c : ImmutableBagFactoryImpl.values()) System.out.println(c);
public static ImmutableBagFactoryImpl valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic <T> ImmutableBag<T> empty()
empty
in interface ImmutableBagFactory
public <T> ImmutableBag<T> of()
ImmutableBagFactory
ImmutableBagFactory.empty()
.of
in interface ImmutableBagFactory
public <T> ImmutableBag<T> with()
ImmutableBagFactory
ImmutableBagFactory.empty()
.with
in interface ImmutableBagFactory
public <T> ImmutableBag<T> of(T element)
ImmutableBagFactory
ImmutableBagFactory.with(Object)
.of
in interface ImmutableBagFactory
public <T> ImmutableBag<T> with(T element)
with
in interface ImmutableBagFactory
public <T> ImmutableBag<T> of(T... elements)
ImmutableBagFactory
ImmutableBagFactory.with(Object[])
.of
in interface ImmutableBagFactory
public <T> ImmutableBag<T> with(T... elements)
with
in interface ImmutableBagFactory
public <T> ImmutableBag<T> ofAll(java.lang.Iterable<? extends T> items)
ImmutableBagFactory
ofAll
in interface ImmutableBagFactory
public <T> ImmutableBag<T> withAll(java.lang.Iterable<? extends T> items)
withAll
in interface ImmutableBagFactory
Copyright © 2004–2018. All rights reserved.