public class NonEmptySet<T>
An immutable ordered non-empty set.
Modifier and Type | Class and Description |
---|---|
static class |
NonEmptySet.Companion |
Modifier and Type | Field and Description |
---|---|
static NonEmptySet.Companion |
Companion |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(java.lang.Object element) |
boolean |
containsAll(java.util.Collection<? extends java.lang.Object> elements) |
boolean |
equals(java.lang.Object other) |
void |
forEach(java.util.function.Consumer<? super T> action) |
int |
getSize() |
int |
hashCode() |
T |
head()
Returns the first element of the set.
|
boolean |
isEmpty() |
java.util.Iterator<T> |
iterator() |
java.util.stream.Stream<T> |
parallelStream() |
java.util.Spliterator<T> |
spliterator() |
java.util.stream.Stream<T> |
stream() |
java.lang.String |
toString() |
public static NonEmptySet.Companion Companion
public T head()
Returns the first element of the set.
public boolean isEmpty()
public java.util.Iterator<T> iterator()
public void forEach(java.util.function.Consumer<? super T> action)
public java.util.stream.Stream<T> stream()
public java.util.stream.Stream<T> parallelStream()
public java.util.Spliterator<T> spliterator()
public boolean equals(java.lang.Object other)
public int hashCode()
public java.lang.String toString()
public int getSize()
public boolean contains(java.lang.Object element)
public boolean containsAll(java.util.Collection<? extends java.lang.Object> elements)