public static class NonEmptySet.Companion
Modifier and Type | Method and Description |
---|---|
<T> NonEmptySet<T> |
copyOf(java.util.Collection<? extends T> elements)
Returns a non-empty set containing each of elements, minus duplicates, in the order each appears first in
the source collection.
|
<T> NonEmptySet<T> |
of(T element)
Returns a singleton set containing element. This behaves the same as Collections.singleton but returns a
class NonEmptySet for the extra type-safety. |
<T> NonEmptySet<T> |
of(T first,
T second,
T rest)
Returns a non-empty set containing the given elements, minus duplicates, in the order each was specified.
|
public <T> NonEmptySet<T> of(T element)
Returns a singleton set containing element. This behaves the same as Collections.singleton but returns a
class NonEmptySet
for the extra type-safety.
class NonEmptySet
public <T> NonEmptySet<T> of(T first, T second, T rest)
Returns a non-empty set containing the given elements, minus duplicates, in the order each was specified.
public <T> NonEmptySet<T> copyOf(java.util.Collection<? extends T> elements)
Returns a non-empty set containing each of elements, minus duplicates, in the order each appears first in the source collection.