Class LL<T>

java.lang.Object
org.reactfx.util.LL<T>
All Implemented Interfaces:
Iterable<T>
Direct Known Subclasses:
LL.Cons, LL.Nil

public abstract class LL<T> extends Object implements Iterable<T>
Immutable singly-linked list.
  • Constructor Details

    • LL

      private LL()
  • Method Details

    • nil

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

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

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

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

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

      public abstract boolean isEmpty()
    • size

      public abstract int size()
    • head

      public abstract T head()
    • tail

      public abstract LL<? extends T> tail()
    • map

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

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

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

      public boolean all(Predicate<T> cond)
    • mapFirst2

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

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

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

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

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

      public String toString()
      Overrides:
      toString in class Object
    • stream

      public Stream<T> stream()