pyrio.streams.stream ==================== .. py:module:: pyrio.streams.stream Classes ------- .. autoapisummary:: pyrio.streams.stream.Stream Module Contents --------------- .. py:class:: Stream Bases: :py:obj:`pyrio.streams.BaseStream`, :py:obj:`pyrio.iterators.ItertoolsMixin` Abstraction over a sequence of elements supporting sequential aggregate operations .. py:method:: of(*iterable) :classmethod: Creates Stream from args .. py:method:: of_nullable(iterable) :classmethod: Creates Stream from args if iterable is not None; otherwise returns empty Stream .. py:method:: empty() :classmethod: Creates empty Stream .. py:method:: iterate(seed, operation, condition=None) :classmethod: Creates infinite ordered Stream .. py:method:: generate(supplier) :classmethod: Creates infinite unordered Stream with values generated by given supplier function .. py:method:: constant(element) :classmethod: Creates infinite Stream with given value .. py:method:: from_range(start, stop, step=1) :classmethod: Creates Stream from start (inclusive) to stop (exclusive) by an incremental step .. py:method:: take_nth(idx, default=None) Returns Optional with the nth element of the stream or a default value .. py:method:: all_equal(key=None) Returns True if all elements of the stream are equal to each other