Package fj.data

Class Stream.Nil<A>

  • All Implemented Interfaces:
    java.lang.Iterable<A>
    Enclosing class:
    Stream<A>

    private static final class Stream.Nil<A>
    extends Stream<A>
    • Constructor Detail

      • Nil

        private Nil()
    • Method Detail

      • head

        public A head()
        Description copied from class: Stream
        The first element of the stream or fails for the empty stream.
        Specified by:
        head in class Stream<A>
        Returns:
        The first element of the stream or fails for the empty stream.
      • tail

        public P1<Stream<A>> tail()
        Description copied from class: Stream
        The stream without the first element or fails for the empty stream.
        Specified by:
        tail in class Stream<A>
        Returns:
        The stream without the first element or fails for the empty stream.