Class LL.Cons<T>

java.lang.Object
org.reactfx.util.LL<T>
org.reactfx.util.LL.Cons<T>
All Implemented Interfaces:
Iterable<T>
Enclosing class:
LL<T>

public static final class LL.Cons<T> extends LL<T>
  • Field Details

    • tail

      private final LL<? extends T> tail
    • size

      private final int size
  • Constructor Details

    • Cons

      private Cons(T head, LL<? extends T> tail)
  • Method Details

    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in class LL<T>
    • size

      public int size()
      Specified by:
      size in class LL<T>
    • head

      public T head()
      Specified by:
      head in class LL<T>
    • tail

      public LL<? extends T> tail()
      Specified by:
      tail in class LL<T>
    • map

      public <U> LL.Cons<U> map(Function<? super T,? extends U> f)
      Specified by:
      map in class LL<T>
    • fold

      public <R> R fold(R acc, BiFunction<? super R,? super T,? extends R> reduction)
      Specified by:
      fold in class LL<T>
    • iterator

      public final Iterator<T> iterator()
    • mapReduce

      public <R> Optional<R> mapReduce(Function<? super T,? extends R> map, BinaryOperator<R> reduce)
      Specified by:
      mapReduce in class LL<T>
    • mapReduce1

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