Package org.reactfx.util
Class LL<T>
java.lang.Object
org.reactfx.util.LL<T>
- All Implemented Interfaces:
Iterable<T>
Immutable singly-linked list.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
static <T> LL
<? extends T> static <T> LL.Cons
<T> abstract <R> R
fold
(R acc, BiFunction<? super R, ? super T, ? extends R> reduction) abstract T
head()
abstract boolean
isEmpty()
abstract <U> LL
<U> <U> U
mapFirst2
(BiFunction<? super T, ? super T, ? extends U> f) <U> U
mapFirst3
(TriFunction<? super T, ? super T, ? super T, ? extends U> f) <U> U
<U> U
<U> U
abstract <R> Optional
<R> mapReduce
(Function<? super T, ? extends R> map, BinaryOperator<R> reduce) static <T> LL
<T> nil()
private static <T> LL
<T> static <T> LL.Cons
<T> of
(T head, T... tail) abstract int
size()
stream()
tail()
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Constructor Details
-
LL
private LL()
-
-
Method Details
-
nil
-
cons
-
of
-
of
-
concat
-
isEmpty
public abstract boolean isEmpty() -
size
public abstract int size() -
head
-
tail
-
map
-
fold
-
mapReduce
public abstract <R> Optional<R> mapReduce(Function<? super T, ? extends R> map, BinaryOperator<R> reduce) -
all
-
mapFirst2
-
mapFirst3
-
mapFirst4
-
mapFirst5
-
mapFirst6
-
toString
-
stream
-