Class LL.Cons<T>

  • All Implemented Interfaces:
    java.lang.Iterable<T>
    Enclosing class:
    LL<T>

    public static final class LL.Cons<T>
    extends LL<T>
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.reactfx.util.LL

        LL.Cons<T>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private T head  
      private int size  
      private LL<? extends T> tail  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Cons​(T head, LL<? extends T> tail)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <R> R fold​(R acc, java.util.function.BiFunction<? super R,​? super T,​? extends R> reduction)  
      T head()  
      boolean isEmpty()  
      java.util.Iterator<T> iterator()  
      <U> LL.Cons<U> map​(java.util.function.Function<? super T,​? extends U> f)  
      <R> java.util.Optional<R> mapReduce​(java.util.function.Function<? super T,​? extends R> map, java.util.function.BinaryOperator<R> reduce)  
      <R> R mapReduce1​(java.util.function.Function<? super T,​? extends R> map, java.util.function.BinaryOperator<R> reduce)  
      int size()  
      LL<? extends T> tail()  
      • 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, spliterator
    • Field Detail

      • head

        private final T head
      • tail

        private final LL<? extends T> tail
      • size

        private final int size
    • Constructor Detail

      • Cons

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

      • 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​(java.util.function.Function<? super T,​? extends U> f)
        Specified by:
        map in class LL<T>
      • fold

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

        public final java.util.Iterator<T> iterator()
      • mapReduce

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

        public <R> R mapReduce1​(java.util.function.Function<? super T,​? extends R> map,
                                java.util.function.BinaryOperator<R> reduce)