Top Description Inners Constructors Methods
org.reactfx.util

public abstract Class LL<T>

extends Object
implements Iterable<T>
Class Inheritance
All Implemented Interfaces
java.lang.Iterable
Known Direct Subclasses
org.reactfx.util.LL.Nil, org.reactfx.util.LL.Cons
Imports
java.util.Collections, .Iterator, .NoSuchElementException, .Optional, .Spliterator, java.util.function.BiFunction, .BinaryOperator, .Consumer, .Function, .Predicate, java.util.stream.Stream, .StreamSupport

Immutable singly-linked list.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
private static class
LL.Nil<T>

Constructor Summary

AccessConstructor and Description
private
LL()

Method Summary

Modifier and TypeMethod and Description
public boolean
all(Predicate<T> cond)

public static <T> LL<? extends T>
concat(LL<? extends T> l1, LL<? extends T> l2)

public static <T> LL.Cons<T>
cons(T head, LL<? extends T> tail)

public abstract <R> R
fold(R acc, BiFunction<? super R, ? super T, ? extends R> reduction)

public abstract T
head()

public abstract boolean
public abstract <U> LL<U>
map(Function<? super T, ? extends U> f)

public <U> U
mapFirst2(BiFunction<? super T, ? super T, ? extends U> f)

public <U> U
mapFirst3(TriFunction<? super T, ? super T, ? super T, ? extends U> f)

public <U> U
mapFirst4(TetraFunction<? super T, ? super T, ? super T, ? super T, ? extends U> f)

public <U> U
mapFirst5(PentaFunction<? super T, ? super T, ? super T, ? super T, ? super T, ? extends U> f)

public <U> U
mapFirst6(HexaFunction<? super T, ? super T, ? super T, ? super T, ? super T, ? super T, ? extends U> f)

public abstract <R> Optional<R>
mapReduce(Function<? super T, ? extends R> map, BinaryOperator<R> reduce)

public static <T> LL<T>
nil()

public static <T> LL.Cons<T>
of(T head, T... tail)

private static <T> LL<T>
of(T[] elems, int to, LL<T> tail)

public abstract int
size()

public Stream<T>
public abstract LL<? extends T>
tail()

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Constructor Detail

LLback to summary
private LL()

Method Detail

allback to summary
public boolean all(Predicate<T> cond)
concatback to summary
public static <T> LL<? extends T> concat(LL<? extends T> l1, LL<? extends T> l2)
consback to summary
public static <T> LL.Cons<T> cons(T head, LL<? extends T> tail)
foldback to summary
public abstract <R> R fold(R acc, BiFunction<? super R, ? super T, ? extends R> reduction)
headback to summary
public abstract T head()
isEmptyback to summary
public abstract boolean isEmpty()
mapback to summary
public abstract <U> LL<U> map(Function<? super T, ? extends U> f)
mapFirst2back to summary
public <U> U mapFirst2(BiFunction<? super T, ? super T, ? extends U> f)
mapFirst3back to summary
public <U> U mapFirst3(TriFunction<? super T, ? super T, ? super T, ? extends U> f)
mapFirst4back to summary
public <U> U mapFirst4(TetraFunction<? super T, ? super T, ? super T, ? super T, ? extends U> f)
mapFirst5back to summary
public <U> U mapFirst5(PentaFunction<? super T, ? super T, ? super T, ? super T, ? super T, ? extends U> f)
mapFirst6back to summary
public <U> U mapFirst6(HexaFunction<? super T, ? super T, ? super T, ? super T, ? super T, ? super T, ? extends U> f)
mapReduceback to summary
public abstract <R> Optional<R> mapReduce(Function<? super T, ? extends R> map, BinaryOperator<R> reduce)
nilback to summary
public static <T> LL<T> nil()
ofback to summary
public static <T> LL.Cons<T> of(T head, T... tail)
Annotations
@SafeVarargs
ofback to summary
private static <T> LL<T> of(T[] elems, int to, LL<T> tail)
sizeback to summary
public abstract int size()
streamback to summary
public Stream<T> stream()
tailback to summary
public abstract LL<? extends T> tail()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
org.reactfx.util back to summary

public final Class LL.Cons<T>

extends LL<T>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final T
private final int
private final LL<? extends T>

Constructor Summary

AccessConstructor and Description
private
Cons(T head, LL<? extends T> tail)

Method Summary

Modifier and TypeMethod and Description
public <R> R
fold(R acc, BiFunction<? super R, ? super T, ? extends R> reduction)

Implements abstract org.reactfx.util.LL.fold.

public T
head()

Implements abstract org.reactfx.util.LL.head.

public boolean
isEmpty()

Implements abstract org.reactfx.util.LL.isEmpty.

public final Iterator<T>
iterator()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

public <U> LL.Cons<U>
map(Function<? super T, ? extends U> f)

Implements abstract org.reactfx.util.LL.map.

public <R> Optional<R>
mapReduce(Function<? super T, ? extends R> map, BinaryOperator<R> reduce)

Implements abstract org.reactfx.util.LL.mapReduce.

public <R> R
mapReduce1(Function<? super T, ? extends R> map, BinaryOperator<R> reduce)

public int
size()

Implements abstract org.reactfx.util.LL.size.

public LL<? extends T>
tail()

Implements abstract org.reactfx.util.LL.tail.

Inherited from org.reactfx.util.LL:
allconcatconsmapFirst2mapFirst3mapFirst4mapFirst5mapFirst6nilofstreamtoString

Field Detail

headback to summary
private final T head
sizeback to summary
private final int size
tailback to summary
private final LL<? extends T> tail

Constructor Detail

Consback to summary
private Cons(T head, LL<? extends T> tail)

Method Detail

foldback to summary
public <R> R fold(R acc, BiFunction<? super R, ? super T, ? extends R> reduction)

Implements abstract org.reactfx.util.LL.fold.

Annotations
@Override
headback to summary
public T head()

Implements abstract org.reactfx.util.LL.head.

Annotations
@Override
isEmptyback to summary
public boolean isEmpty()

Implements abstract org.reactfx.util.LL.isEmpty.

Annotations
@Override
iteratorback to summary
public final Iterator<T> iterator()

Implements java.lang.Iterable.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Annotations
@Override
mapback to summary
public <U> LL.Cons<U> map(Function<? super T, ? extends U> f)

Implements abstract org.reactfx.util.LL.map.

Annotations
@Override
mapReduceback to summary
public <R> Optional<R> mapReduce(Function<? super T, ? extends R> map, BinaryOperator<R> reduce)

Implements abstract org.reactfx.util.LL.mapReduce.

Annotations
@Override
mapReduce1back to summary
public <R> R mapReduce1(Function<? super T, ? extends R> map, BinaryOperator<R> reduce)
sizeback to summary
public int size()

Implements abstract org.reactfx.util.LL.size.

Annotations
@Override
tailback to summary
public LL<? extends T> tail()

Implements abstract org.reactfx.util.LL.tail.

Annotations
@Override
org.reactfx.util back to summary

private Class LL.Nil<T>

extends LL<T>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final LL.Nil<?>

Constructor Summary

AccessConstructor and Description
private
Nil()

Method Summary

Modifier and TypeMethod and Description
public <R> R
fold(R acc, BiFunction<? super R, ? super T, ? extends R> reduction)

Implements abstract org.reactfx.util.LL.fold.

public T
head()

Implements abstract org.reactfx.util.LL.head.

pack-priv static <T> LL.Nil<T>
public boolean
isEmpty()

Implements abstract org.reactfx.util.LL.isEmpty.

public Iterator<T>
iterator()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

public <U> LL<U>
map(Function<? super T, ? extends U> f)

Implements abstract org.reactfx.util.LL.map.

public <R> Optional<R>
mapReduce(Function<? super T, ? extends R> map, BinaryOperator<R> reduce)

Implements abstract org.reactfx.util.LL.mapReduce.

public int
size()

Implements abstract org.reactfx.util.LL.size.

public LL<T>
tail()

Implements abstract org.reactfx.util.LL.tail.

Inherited from org.reactfx.util.LL:
allconcatconsmapFirst2mapFirst3mapFirst4mapFirst5mapFirst6nilofstreamtoString

Field Detail

INSTANCEback to summary
private static final LL.Nil<?> INSTANCE

Constructor Detail

Nilback to summary
private Nil()

Method Detail

foldback to summary
public <R> R fold(R acc, BiFunction<? super R, ? super T, ? extends R> reduction)

Implements abstract org.reactfx.util.LL.fold.

Annotations
@Override
headback to summary
public T head()

Implements abstract org.reactfx.util.LL.head.

Annotations
@Override
instanceback to summary
pack-priv static <T> LL.Nil<T> instance()
Annotations
@SuppressWarnings:unchecked
isEmptyback to summary
public boolean isEmpty()

Implements abstract org.reactfx.util.LL.isEmpty.

Annotations
@Override
iteratorback to summary
public Iterator<T> iterator()

Implements java.lang.Iterable.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Annotations
@Override
mapback to summary
public <U> LL<U> map(Function<? super T, ? extends U> f)

Implements abstract org.reactfx.util.LL.map.

Annotations
@Override
mapReduceback to summary
public <R> Optional<R> mapReduce(Function<? super T, ? extends R> map, BinaryOperator<R> reduce)

Implements abstract org.reactfx.util.LL.mapReduce.

Annotations
@Override
sizeback to summary
public int size()

Implements abstract org.reactfx.util.LL.size.

Annotations
@Override
tailback to summary
public LL<T> tail()

Implements abstract org.reactfx.util.LL.tail.

Annotations
@Override