Class StreamModule.AppendElements<T>

    • Constructor Detail

      • AppendElements

        AppendElements​(T head,
                       Queue<T> queue,
                       java.util.function.Supplier<Stream<T>> tail)
    • Method Detail

      • append

        public Stream<T> append​(T element)
        Description copied from interface: Seq
        Returns a new sequence with the given element appended at the end.
        Specified by:
        append in interface LinearSeq<T>
        Specified by:
        append in interface Seq<T>
        Specified by:
        append in interface Stream<T>
        Parameters:
        element - the element to append
        Returns:
        a new Seq containing all elements of this sequence followed by the given element
      • appendAll

        public Stream<T> appendAll​(@NonNull java.lang.Iterable<? extends T> elements)
        Description copied from interface: Seq
        Returns a new sequence with all elements from the given Iterable appended at the end of this sequence.
        Specified by:
        appendAll in interface LinearSeq<T>
        Specified by:
        appendAll in interface Seq<T>
        Specified by:
        appendAll in interface Stream<T>
        Parameters:
        elements - the elements to append; must not be null
        Returns:
        a new Seq containing all elements of this sequence followed by the given elements
      • tail

        public Stream<T> tail()
        Description copied from interface: Traversable
        Returns a new Traversable without its first element.
        Specified by:
        tail in interface LinearSeq<T>
        Specified by:
        tail in interface Seq<T>
        Specified by:
        tail in interface Stream<T>
        Specified by:
        tail in interface Traversable<T>
        Returns:
        a new Traversable containing all elements except the first
      • writeReplace

        @GwtIncompatible("The Java serialization protocol is explicitly not supported")
        private java.lang.Object writeReplace()
      • readObject

        @GwtIncompatible("The Java serialization protocol is explicitly not supported")
        private void readObject​(java.io.ObjectInputStream stream)
                         throws java.io.InvalidObjectException
        Throws:
        java.io.InvalidObjectException