Modifier and Type | Method and Description |
---|---|
static <E> Set<E> |
create()
Returns an empty set.
|
static <E> Set<E> |
freeze(E[] elements)
Returns a frozen set which has copy of the elements.
|
static <E> Set<E> |
freeze(Iterable<? extends E> elements)
Returns a frozen set which has copy of the elements.
|
static <E> Set<E> |
from(E[] elements)
Returns a set which consists of the specified elements.
|
static <E> Set<E> |
from(Iterable<? extends E> elements)
Returns a set which has copy of the elements.
|
static <E> Set<E> |
of(E elem)
Returns a set which consists of the specified element.
|
static <E> Set<E> |
of(E elem1,
E elem2)
Returns a set which consists of the specified elements.
|
static <E> Set<E> |
of(E elem1,
E elem2,
E elem3)
Returns a set which consists of the specified elements.
|
static <E> Set<E> |
of(E elem1,
E elem2,
E elem3,
E elem4,
E... rest)
Returns a set which consists of the specified elements.
|
public static <E> Set<E> create()
E
- element typepublic static <E> Set<E> of(E elem)
E
- element typeelem
- the elementpublic static <E> Set<E> of(E elem1, E elem2)
E
- element typeelem1
- the first elementelem2
- the second elementpublic static <E> Set<E> of(E elem1, E elem2, E elem3)
E
- element typeelem1
- the first elementelem2
- the second elementelem3
- the third element@SafeVarargs public static <E> Set<E> of(E elem1, E elem2, E elem3, E elem4, E... rest)
E
- element typeelem1
- the first elementelem2
- the second elementelem3
- the third elementelem4
- the fourth elementrest
- the rest elementspublic static <E> Set<E> from(E[] elements)
E
- element typeelements
- the elementspublic static <E> Set<E> from(Iterable<? extends E> elements)
E
- element typeelements
- the elementsIllegalArgumentException
- if some parameters were null
public static <E> Set<E> freeze(Iterable<? extends E> elements)
E
- element typeelements
- the elementsIllegalArgumentException
- if some parameters were null
public static <E> Set<E> freeze(E[] elements)
E
- element typeelements
- the elementsIllegalArgumentException
- if some parameters were null
Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.