Top Inners
io.vavr.collection

pack-priv Interface StreamModule

Located in compilation unit of io.vavr.collection.Stream.


Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
public static interface
public static class
public static interface
public static class
public static class
StreamModule.SerializationProxy<
The component type of the underlying stream.
T
>

A serialization proxy which, in this context, is used to deserialize immutable, linked Streams with final instance fields.

public static interface
public static class
io.vavr.collection back to summary

public final Class StreamModule.AppendElements<T>

extends Stream.Cons<T>
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable

Field Summary

Modifier and TypeField and Description
private final Queue<T>
private static final long
Inherited from io.vavr.collection.Stream.Cons:
headtail

Constructor Summary

AccessConstructor and Description
pack-priv
AppendElements(T head, Queue<T> queue, Supplier<Stream<T>> tail)

Method Summary

Modifier and TypeMethod and Description
public Stream<T>
append(T
An element
element
)

Overrides default io.vavr.collection.Stream.append.

Appends an element to this.

public Stream<T>
appendAll(Iterable<? extends T>
An Iterable of elements
elements
)

Overrides default io.vavr.collection.Stream.appendAll.

Appends all given elements to this.

private void
public Stream<T>
tail()

Implements io.vavr.collection.Stream.tail.

Drops the first element of a non-empty Traversable.

private Object
Inherited from io.vavr.collection.Stream.Cons:
equalshashCodeheadisEmptyiteratortoString

Field Detail

queueback to summary
private final Queue<T> queue
serialVersionUIDback to summary
private static final long serialVersionUID

Hides io.vavr.collection.Stream.Cons.serialVersionUID, io.vavr.collection.Stream.serialVersionUID.

Constructor Detail

AppendElementsback to summary
pack-priv AppendElements(T head, Queue<T> queue, Supplier<Stream<T>> tail)

Method Detail

appendback to summary
public Stream<T> append(T element)

Overrides default io.vavr.collection.Stream.append.

Doc from io.vavr.collection.Seq.append.

Appends an element to this.

Parameters
element:T

An element

Returns:Stream<T>

A new Seq containing the given element appended to this elements

Annotations
@Override
appendAllback to summary
public Stream<T> appendAll(Iterable<? extends T> elements)

Overrides default io.vavr.collection.Stream.appendAll.

Doc from io.vavr.collection.Seq.appendAll.

Appends all given elements to this.

Parameters
elements:Iterable<? extends T>

An Iterable of elements

Returns:Stream<T>

A new Seq containing the given elements appended to this elements

Annotations
@Override
readObjectback to summary
private void readObject(ObjectInputStream stream) throws InvalidObjectException
Annotations
@GwtIncompatible:The Java serialization protocol is explicitly not supported
tailback to summary
public Stream<T> tail()

Implements io.vavr.collection.Stream.tail.

Doc from io.vavr.collection.Traversable.tail.

Drops the first element of a non-empty Traversable.

Returns:Stream<T>

A new instance of Traversable containing all elements except the first.

Annotations
@Override
writeReplaceback to summary
private Object writeReplace()
Annotations
@GwtIncompatible:The Java serialization protocol is explicitly not supported
io.vavr.collection back to summary

public final Class StreamModule.AppendSelf<T>

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final Stream.Cons<T>

Constructor Summary

AccessConstructor and Description
pack-priv
AppendSelf(Stream.Cons<T> self, Function<? super Stream<T>, ? extends Stream<T>> mapper)

Method Summary

Modifier and TypeMethod and Description
private Stream.Cons<T>
appendAll(Stream.Cons<T> stream, Function<? super Stream<T>, ? extends Stream<T>> mapper)

pack-priv Stream.Cons<T>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

selfback to summary
private final Stream.Cons<T> self

Constructor Detail

AppendSelfback to summary
pack-priv AppendSelf(Stream.Cons<T> self, Function<? super Stream<T>, ? extends Stream<T>> mapper)

Method Detail

appendAllback to summary
private Stream.Cons<T> appendAll(Stream.Cons<T> stream, Function<? super Stream<T>, ? extends Stream<T>> mapper)
streamback to summary
pack-priv Stream.Cons<T> stream()
io.vavr.collection back to summary

public Interface StreamModule.Combinations


Method Summary

Modifier and TypeMethod and Description
public static <T> Stream<Stream<T>>
apply(Stream<T> elements, int k)

Method Detail

applyback to summary
public static <T> Stream<Stream<T>> apply(Stream<T> elements, int k)
io.vavr.collection back to summary

public final Class StreamModule.ConsImpl<T>

extends Stream.Cons<T>
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable

Field Summary

Modifier and TypeField and Description
private static final long
Inherited from io.vavr.collection.Stream.Cons:
headtail

Constructor Summary

AccessConstructor and Description
pack-priv
ConsImpl(T head, Supplier<Stream<T>> tail)

Method Summary

Modifier and TypeMethod and Description
private void
public Stream<T>
tail()

Implements io.vavr.collection.Stream.tail.

Drops the first element of a non-empty Traversable.

private Object
Inherited from io.vavr.collection.Stream.Cons:
equalshashCodeheadisEmptyiteratortoString

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides io.vavr.collection.Stream.Cons.serialVersionUID, io.vavr.collection.Stream.serialVersionUID.

Constructor Detail

ConsImplback to summary
pack-priv ConsImpl(T head, Supplier<Stream<T>> tail)

Method Detail

readObjectback to summary
private void readObject(ObjectInputStream stream) throws InvalidObjectException
Annotations
@GwtIncompatible:The Java serialization protocol is explicitly not supported
tailback to summary
public Stream<T> tail()

Implements io.vavr.collection.Stream.tail.

Doc from io.vavr.collection.Traversable.tail.

Drops the first element of a non-empty Traversable.

Returns:Stream<T>

A new instance of Traversable containing all elements except the first.

Annotations
@Override
writeReplaceback to summary
private Object writeReplace()
Annotations
@GwtIncompatible:The Java serialization protocol is explicitly not supported
io.vavr.collection back to summary

public Interface StreamModule.DropRight


Method Summary

Modifier and TypeMethod and Description
public static <T> Stream<T>
apply(List<T> front, List<T> rear, Stream<T> remaining)

Method Detail

applyback to summary
public static <T> Stream<T> apply(List<T> front, List<T> rear, Stream<T> remaining)
io.vavr.collection back to summary

public final Class StreamModule.FlatMapIterator<T, U>

extends Object
implements Iterator<U>
Class Inheritance
All Implemented Interfaces
io.vavr.collection.Iterator, io.vavr.collection.Traversable, io.vavr.Value, java.lang.Iterable, io.vavr.collection.Foldable, java.util.Iterator

Field Summary

Modifier and TypeField and Description
pack-priv Iterator<? extends U>
pack-priv final Iterator<? extends T>
pack-priv final Function<? super T, ? extends Iterable<? extends U>>

Constructor Summary

AccessConstructor and Description
pack-priv
FlatMapIterator(Iterator<? extends T> inputs, Function<? super T, ? extends Iterable<? extends U>> mapper)

Method Summary

Modifier and TypeMethod and Description
public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.

public U
next()

Implements java.util.Iterator.next.

Returns the next element in the iteration.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

currentback to summary
pack-priv Iterator<? extends U> current
inputsback to summary
pack-priv final Iterator<? extends T> inputs
mapperback to summary
pack-priv final Function<? super T, ? extends Iterable<? extends U>> mapper

Constructor Detail

FlatMapIteratorback to summary
pack-priv FlatMapIterator(Iterator<? extends T> inputs, Function<? super T, ? extends Iterable<? extends U>> mapper)

Method Detail

hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Doc from java.util.Iterator.hasNext.

Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:boolean

true if the iteration has more elements

Annotations
@Override
nextback to summary
public U next()

Implements java.util.Iterator.next.

Doc from java.util.Iterator.next.

Returns the next element in the iteration.

Returns:U

the next element in the iteration

Annotations
@Override
io.vavr.collection back to summary

public final Class StreamModule.SerializationProxy<T>

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Annotations
@GwtIncompatible:The Java serialization protocol is explicitly not supported
Type Parameters
<T>
The component type of the underlying stream.

A serialization proxy which, in this context, is used to deserialize immutable, linked Streams with final instance fields.

Field Summary

Modifier and TypeField and Description
private static final long
private transient Stream.Cons<T>

Constructor Summary

AccessConstructor and Description
pack-priv
SerializationProxy(Stream.Cons<T>
a Cons
stream
)

Constructor for the case of serialization.

Method Summary

Modifier and TypeMethod and Description
private void
readObject(ObjectInputStream
An object deserialization stream.
s
)

Read an object from a deserialization stream.

private Object

Returns:

A deserialized instance of the enclosing class.
readResolve
()

readResolve method for the serialization proxy pattern.

private void
writeObject(ObjectOutputStream
An object serialization stream.
s
)

Write an object to a serialization stream.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID
streamback to summary
private transient Stream.Cons<T> stream

Constructor Detail

SerializationProxyback to summary
pack-priv SerializationProxy(Stream.Cons<T> stream)

Constructor for the case of serialization.

The constructor of a SerializationProxy takes an argument that concisely represents the logical state of an instance of the enclosing class.

Parameters
stream:Stream.Cons<T>

a Cons

Method Detail

readObjectback to summary
private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException

Read an object from a deserialization stream.

Parameters
s:ObjectInputStream

An object deserialization stream.

Exceptions
ClassNotFoundException:
If the object's class read from the stream cannot be found.
IOException:
If an error occurs reading from the stream.
InvalidObjectException:
If the stream contains no stream elements.
readResolveback to summary
private Object readResolve()

readResolve method for the serialization proxy pattern.

Returns a logically equivalent instance of the enclosing class. The presence of this method causes the serialization system to translate the serialization proxy back into an instance of the enclosing class upon deserialization.

Returns:Object

A deserialized instance of the enclosing class.

writeObjectback to summary
private void writeObject(ObjectOutputStream s) throws IOException

Write an object to a serialization stream.

Parameters
s:ObjectOutputStream

An object serialization stream.

Exceptions
IOException:
If an error occurs writing to the stream.
io.vavr.collection back to summary

public Interface StreamModule.StreamFactory


Method Summary

Modifier and TypeMethod and Description
public static <T> Stream<T>
create(Iterator<? extends T> iterator)

Method Detail

createback to summary
public static <T> Stream<T> create(Iterator<? extends T> iterator)
io.vavr.collection back to summary

public final Class StreamModule.StreamIterator<T>

extends AbstractIterator<T>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private Supplier<Stream<T>>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public T
public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.

Inherited from io.vavr.collection.AbstractIterator:
nexttoString

Field Detail

currentback to summary
private Supplier<Stream<T>> current

Constructor Detail

StreamIteratorback to summary
pack-priv StreamIterator(Stream.Cons<T> stream)

Method Detail

getNextback to summary
public T getNext()

Implements abstract io.vavr.collection.AbstractIterator.getNext.

Annotations
@Override
hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Doc from java.util.Iterator.hasNext.

Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:boolean

true if the iteration has more elements

Annotations
@Override