Uses of Interface
io.vavr.collection.Stream
Packages that use Stream
Package
Description
Beside
API
the io.vavr package contains core types like (Checked)Functions and Tuples.Purely functional collections based on Traversable.
A property check framework built around Property which integrates well with unit test frameworks like junit.
-
Uses of Stream in io.vavr
-
Uses of Stream in io.vavr.collection
Classes in io.vavr.collection that implement StreamModifier and TypeClassDescriptionstatic class
Stream.Cons<T>
Non-emptyStream
, consisting of ahead
, andtail
.static final class
Stream.Empty<T>
The empty Stream.static final class
static final class
Fields in io.vavr.collection with type parameters of type StreamMethods in io.vavr.collection that return StreamModifier and TypeMethodDescriptionAppends itself to the end of stream withmapper
function.static <T> Stream
<T> Stream.asJavaMutable
(Consumer<? super List<T>> action) default <R> Stream
<R> Stream.collect
(PartialFunction<? super T, ? extends R> partialFunction) Stream.combinations()
Stream.combinations
(int k) static <T> Stream
<T> Lazily creates a Stream in O(1) which traverses along the concatenation of the given iterables.static <T> Stream
<T> Lazily creates a Stream in O(1) which traverses along the concatenation of the given iterables.static <T> Stream
<T> Constructs a Stream of a head element and a tail supplier.static <T> Stream
<T> Stream.continually
(Supplier<? extends T> supplier) Generates an (theoretically) infinitely long Stream using a value Supplier.static <T> Stream
<T> Stream.continually
(T t) Repeats an element infinitely often.static <T> Stream
<T> Stream.cycle()
Repeat the elements of this Stream infinitely.Stream.cycle
(int count) Repeat the elements of this Streamcount
times.Stream.distinct()
Stream.distinctBy
(Comparator<? super T> comparator) Stream.distinctBy
(Function<? super T, ? extends U> keyExtractor) Stream.drop
(int n) Stream.dropRight
(int n) Stream.dropRightUntil
(Predicate<? super T> predicate) Stream.dropRightWhile
(Predicate<? super T> predicate) static <T> Stream
<T> Stream.empty()
Returns the single instance of Nil.Extends (continues) thisStream
with a Stream of values created by applying consecutively providedFunction
to the last element of the original Stream.Extends (continues) thisStream
with values provided by aSupplier
Extends (continues) thisStream
with a constantly repeated value.static <T> Stream
<T> Returns a Stream containingn
values supplied by a given Suppliers
.static <T> Stream
<T> Stream.fill
(int n, T element) Returns a Stream containingn
times the givenelement
default <U> Stream
<U> Stream.from
(int value) Returns an infinitely long Stream ofint
values starting fromfrom
.Stream.from
(int value, int step) Returns an infinite long Stream ofint
values starting fromvalue
and spaced bystep
.Stream.from
(long value) Returns an infinitely long Stream oflong
values starting fromfrom
.Stream.from
(long value, long step) Returns an infinite long Stream oflong
values starting fromvalue
and spaced bystep
.Stream.init()
Stream.intersperse
(T element) static <T> Stream
<T> Generates a (theoretically) infinitely long Stream using a repeatedly invoked supplier that provides aSome
for each next value and aNone
for the end.static <T> Stream
<T> Generates a (theoretically) infinitely long Stream using a function to calculate the next value based on the previous.default <U> Stream
<U> static <T> Stream
<T> Narrows a widenedStream<? extends T>
toStream<T>
by performing a type-safe cast.static <T> Stream
<T> Stream.of
(T element) Returns a singletonStream
, i.e.static <T> Stream
<T> Stream.of
(T... elements) Creates a Stream of the given elements.Stream.ofAll
(boolean... elements) Creates a Stream from boolean values.Stream.ofAll
(byte... elements) Creates a Stream from byte values.Stream.ofAll
(char... elements) Creates a Stream from char values.Stream.ofAll
(double... elements) Creates a Stream values double values.Stream.ofAll
(float... elements) Creates a Stream from float values.Stream.ofAll
(int... elements) Creates a Stream from int values.Stream.ofAll
(long... elements) Creates a Stream from long values.Stream.ofAll
(short... elements) Creates a Stream from short values.static <T> Stream
<T> Creates a Stream of the given elements.static <T> Stream
<T> Creates a Stream that contains the elements of the givenStream
.Stream.permutations()
Stream.prependAll
(Iterable<? extends T> elements) Stream.range
(char from, char toExclusive) Stream.range
(int from, int toExclusive) Creates a Stream of int numbers starting fromfrom
, extending totoExclusive - 1
.Stream.range
(long from, long toExclusive) Creates a Stream of long numbers starting fromfrom
, extending totoExclusive - 1
.Stream.rangeBy
(char from, char toExclusive, int step) Stream.rangeBy
(double from, double toExclusive, double step) Stream.rangeBy
(int from, int toExclusive, int step) Creates a Stream of int numbers starting fromfrom
, extending totoExclusive - 1
, withstep
.Stream.rangeBy
(long from, long toExclusive, long step) Creates a Stream of long numbers starting fromfrom
, extending totoExclusive - 1
, withstep
.Stream.rangeClosed
(char from, char toInclusive) Stream.rangeClosed
(int from, int toInclusive) Creates a Stream of int numbers starting fromfrom
, extending totoInclusive
.Stream.rangeClosed
(long from, long toInclusive) Creates a Stream of long numbers starting fromfrom
, extending totoInclusive
.Stream.rangeClosedBy
(char from, char toInclusive, int step) Stream.rangeClosedBy
(double from, double toInclusive, double step) Stream.rangeClosedBy
(int from, int toInclusive, int step) Creates a Stream of int numbers starting fromfrom
, extending totoInclusive
, withstep
.Stream.rangeClosedBy
(long from, long toInclusive, long step) Creates a Stream of long numbers starting fromfrom
, extending totoInclusive
, withstep
.Deprecated.Stream.removeAt
(int index) Stream.removeFirst
(Predicate<T> predicate) Stream.removeLast
(Predicate<T> predicate) Stream.replaceAll
(T currentElement, T newElement) Stream.reverse()
Stream.rotateLeft
(int n) Stream.rotateRight
(int n) default <U> Stream
<U> Stream.scanLeft
(U zero, BiFunction<? super U, ? super T, ? extends U> operation) default <U> Stream
<U> Stream.scanRight
(U zero, BiFunction<? super T, ? super U, ? extends U> operation) Stream.shuffle()
Stream.slice
(int beginIndex, int endIndex) Stream.sortBy
(Comparator<? super U> comparator, Function<? super T, ? extends U> mapper) default <U extends Comparable<? super U>>
Stream<T> Stream.sorted()
Stream.sorted
(Comparator<? super T> comparator) Stream.subSequence
(int beginIndex) Stream.subSequence
(int beginIndex, int endIndex) static <T> Stream
<T> Returns a Stream containingn
values of a given Functionf
over a range of integer values from 0 ton - 1
.Stream.Empty.tail()
Stream.tail()
StreamModule.AppendElements.tail()
StreamModule.ConsImpl.tail()
Stream.take
(int n) Stream.takeRight
(int n) Stream.takeRightUntil
(Predicate<? super T> predicate) Stream.takeRightWhile
(Predicate<? super T> predicate) Transposes the rows and columns of aStream
matrix.TreeModule.traverseInOrder
(Tree.Node<T> node) TreeModule.traverseLevelOrder
(Tree.Node<T> node) TreeModule.traversePostOrder
(Tree.Node<T> node) TreeModule.traversePreOrder
(Tree.Node<T> node) static <T> Stream
<T> Creates a Stream from a seed value and a function.static <T,
U> Stream <U> Stream.unfoldLeft
(T seed, Function<? super T, Option<Tuple2<? extends T, ? extends U>>> f) Creates a Stream from a seed value and a function.static <T,
U> Stream <U> Stream.unfoldRight
(T seed, Function<? super T, Option<Tuple2<? extends U, ? extends T>>> f) Creates a Stream from a seed value and a function.HashMap.values()
default <U,
R> Stream <R> Stream.zipWith
(Iterable<? extends U> that, BiFunction<? super T, ? super U, ? extends R> mapper) Stream.zipWithIndex()
default <U> Stream
<U> Stream.zipWithIndex
(BiFunction<? super T, ? super Integer, ? extends U> mapper) Methods in io.vavr.collection that return types with arguments of type StreamModifier and TypeMethodDescriptionStream.collector()
Returns aCollector
which may be used in conjunction withStream.collect(java.util.stream.Collector)
to obtain aStream
.Stream.combinations()
Stream.combinations
(int k) Stream.crossProduct
(int power) Stream.grouped
(int size) Stream.initOption()
Stream.permutations()
Stream.sliding
(int size) Stream.sliding
(int size, int step) Stream.splitAt
(int n) Stream.splitAt
(int n) Stream.splitAtInclusive
(Predicate<? super T> predicate) Stream.splitAtInclusive
(Predicate<? super T> predicate) Stream.tailOption()
Transposes the rows and columns of aStream
matrix.Methods in io.vavr.collection with parameters of type StreamModifier and TypeMethodDescriptionstatic <T> Stream
<T> static <T> Stream
<T> Narrows a widenedStream<? extends T>
toStream<T>
by performing a type-safe cast.Transposes the rows and columns of aStream
matrix.Method parameters in io.vavr.collection with type arguments of type StreamModifier and TypeMethodDescriptionprivate Stream.Cons
<T> StreamModule.AppendSelf.appendAll
(Stream.Cons<T> stream, Function<? super Stream<T>, ? extends Stream<T>> mapper) private Stream.Cons
<T> StreamModule.AppendSelf.appendAll
(Stream.Cons<T> stream, Function<? super Stream<T>, ? extends Stream<T>> mapper) Appends itself to the end of stream withmapper
function.Appends itself to the end of stream withmapper
function.static <T> Stream
<T> Constructs a Stream of a head element and a tail supplier.default <U> U
Transforms thisStream
.Transposes the rows and columns of aStream
matrix.Constructor parameters in io.vavr.collection with type arguments of type StreamModifierConstructorDescription(package private)
(package private)
AppendSelf
(Stream.Cons<T> self, Function<? super Stream<T>, ? extends Stream<T>> mapper) (package private)
AppendSelf
(Stream.Cons<T> self, Function<? super Stream<T>, ? extends Stream<T>> mapper) (package private)
(package private)
-
Uses of Stream in io.vavr.test
Methods in io.vavr.test that return types with arguments of type Stream