|
||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||
| Packages that use Stream | |
|---|---|
| net.sf.staccatocommons.collections.stream | This package contains the interfaces that define a Stream,
a lazy, rich, Iterable, an abstract implementation of it, and
the Streams hub with
class methods for creating simple Streams |
| Uses of Stream in net.sf.staccatocommons.collections.stream |
|---|
| Classes in net.sf.staccatocommons.collections.stream that implement Stream | |
|---|---|
class |
AbstractBasicStream<A>
Very minimal stream partial implementation that defines final methods that are, by spec, overloading or synonyms of the other stream methods |
class |
AbstractStream<A>
An abstract implementation of a Stream. |
| Methods in net.sf.staccatocommons.collections.stream that return Stream | ||
|---|---|---|
Stream<A> |
AbstractStream.append(A element)
|
|
Stream<A> |
Stream.append(A element)
Adds an element as the last one of the stream. |
|
Stream<A> |
Stream.append(Iterable<A> other)
Deprecated. use concat(Iterable) instead |
|
Stream<A> |
AbstractBasicStream.append(Iterable<A> other)
|
|
Stream<A> |
Stream.append(Thunk<A> thunk)
Deprecated. use delayedAppend(Thunk) instead |
|
Stream<A> |
AbstractBasicStream.append(Thunk<A> element)
|
|
Stream<A> |
AbstractStream.appendUndefined()
|
|
Stream<A> |
Stream.appendUndefined()
Concatenates this Stream with the undefined Stream. |
|
Stream<B> |
Stream.DeconsApplicable.apply(A head,
Stream<A> tail)
Applies this transformation to a non empty Stream splitted into tail and head. |
|
Stream<B> |
Stream.DelayedDeconsApplicable.apply(Thunk<A> head,
Stream<A> tail)
Applies this transformation to a non empty Stream splitted into tail and head's thunk. |
|
|
AbstractStream.branch(Applicable<? super A,? extends B> function0,
Applicable<? super A,? extends C> function1)
|
|
|
Stream.branch(Applicable<? super A,? extends B> function0,
Applicable<? super A,? extends C> function1)
Answers a Stream of pairs, where each one contains both results of applying the given functions. |
|
|
AbstractStream.clone(Applicable<? super A,? extends B> function)
|
|
|
Stream.clone(Applicable<? super A,? extends B> function)
Answers a stream that retrieves a tuple per each element, formed by the original element as the first component, and the result of applying the given function to it as the second component. |
|
Stream<A> |
AbstractStream.concat(A... elements)
|
|
Stream<A> |
Stream.concat(A... elements)
Concatenates this with the given elements
It answers an Stream that retrieves elements from this Stream, and
then, after its last element, the given elements. |
|
Stream<A> |
AbstractStream.concat(Iterable<? extends A> other)
|
|
Stream<A> |
Stream.concat(Iterable<? extends A> other)
Concatenates this with other
It answers an Stream that retrieves elements from this Stream, and
then, after its last element, from the given iterable. |
|
Stream<A> |
AbstractStream.concat(Iterator<? extends A> other)
|
|
Stream<A> |
Stream.concat(Iterator<? extends A> other)
Concatenates this with the given Iterator
It answers an Stream that retrieves elements from this Stream, and
then, after its last element, the given iterator's elements. |
|
static
|
Streams.cons(A... elements)
Creates a new Stream that retrieves the elements from the given
array. |
|
static
|
Streams.cons(A element)
Creates a new Stream that will retrieve just the given element |
|
static
|
Streams.cons(A head,
Stream<? extends A> tail)
Creates a new Stream that retrieves elements from a head, and
another Iterable, called tail. |
|
static
|
Streams.cons(Thunk<A> element)
Creates a one-element new Stream that will retrieve the thunk's value. |
|
static
|
Streams.cons(Thunk<A> head,
Stream<? extends A> tail)
Creates a new Stream that retrieves elements from a head's thunk,
and another Iterable, called tail. |
|
Stream<Tuple2<A,A>> |
AbstractStream.cross()
|
|
Stream<Tuple2<A,A>> |
Stream.cross()
Answers the Cartesian product of this stream and itself |
|
|
AbstractStream.cross(B... elements)
|
|
|
Stream.cross(B... elements)
Answers the cartesian product of this Stream and the given
elements. |
|
|
AbstractStream.cross(Iterable<B> other)
|
|
|
Stream.cross(Iterable<B> other)
Answers the cartesian product of this Stream and the given
Iterable |
|
|
AbstractStream.cross(Iterator<B> other)
|
|
|
Stream.cross(Iterator<B> other)
Answers the cartesian product of this Stream and the given
Iterator |
|
|
AbstractStream.cross(Stream<B> other)
|
|
|
Stream.cross(Stream<B> other)
Answers the Cartesian product of this stream and the given one |
|
Stream<Stream<A>> |
AbstractStream.crossStreams(Stream<Stream<A>> other)
|
|
Stream<Stream<A>> |
Stream.crossStreams(Stream<Stream<A>> streamOfStreams)
Answers the cartesian product of this Stream and each one of the
given streamOfStreams |
|
Stream<A> |
AbstractStream.delayedAppend(Thunk<A> thunk)
|
|
Stream<A> |
Stream.delayedAppend(Thunk<A> thunk)
Adds an element's thunk as the last one of the stream. |
|
Stream<A> |
AbstractStream.delayedPrepend(Thunk<A> thunk)
|
|
Stream<A> |
Stream.delayedPrepend(Thunk<A> thunk)
Adds an element's thunk as the first one of the stream. |
|
Stream<A> |
AbstractStream.drop(int amountOfElements)
|
|
Stream<A> |
Stream.drop(int amountOfElements)
Discards up to N elements from this Stream. |
|
Stream<A> |
AbstractStream.dropWhile(Evaluable<? super A> predicate)
|
|
Stream<A> |
Stream.dropWhile(Evaluable<? super A> predicate)
Discards all elements while they satisfy the given predicate |
|
Stream<A> |
Stream.each(Executable<? super A> block)
Maps the given side effect over this stream, by answering a Stream
that lazily applies the given side effect over each stream elements, and
retrieves them. |
|
static
|
Streams.empty()
Answers a Stream that has no elements. |
|
Stream<B> |
AbstractDelayedDeconsApplicable.emptyApply()
Returns an empty stream |
|
Stream<B> |
AbstractDeconsApplicable.emptyApply()
Returns an empty stream |
|
static Stream<Integer> |
Streams.enumerate(int start)
Iterates from the starting integer, adding 1. |
|
static Stream<Integer> |
Streams.enumerate(int start,
int stop)
Iterates from the start integer, by adding 1, up to the
stop integer, inclusive. |
|
static Stream<Integer> |
Streams.enumerate(int start,
int stop,
int step)
Iterates from the start integer, by adding step, up to the
stop integer, inclusive. |
|
Stream<A> |
AbstractStream.filter(Evaluable<? super A> predicate)
|
|
Stream<A> |
Stream.filter(Evaluable<? super A> predicate)
Preserves elements that satisfy the given predicate
Example:
//Answers stream [hello, world], which has only strings whose length is 5
Streams.cons("a", "hello", "world", "of", "streams", "!"). |
|
Stream<A> |
AbstractStream.filterIndex(Evaluable<Integer> predicate)
|
|
Stream<A> |
Stream.filterIndex(Evaluable<Integer> predicate)
Preserves elements that whose index satisfy the given predicate |
|
|
AbstractStream.flatMap(Function<? super A,? extends Iterable<? extends B>> function)
|
|
|
Stream.flatMap(Function<? super A,? extends Iterable<? extends B>> function)
Transformes each element into an iterable using the given function, and concatenates (flattens) the result |
|
|
AbstractStream.flatMapArray(Function<? super A,? extends B[]> function)
|
|
|
Stream.flatMapArray(Function<? super A,? extends B[]> function)
Transformes each element into an array using the given function, and concatenates (flattens) the result |
|
Stream<A> |
AbstractStream.force()
|
|
Stream<A> |
Stream.force()
Forces stream elements evaluation by converting it into a new ordered stream one that is not lazy and that has repeatable iteration order. |
|
static
|
Streams.from(A[] elements)
Creates a new Stream that retrieves the elements from the given
array. |
|
static Stream<Character> |
Streams.from(CharSequence charSequence)
Creates a new Stream that retrieves character elements from the
given charSequence |
|
static
|
Streams.from(Collection<? extends A> collection)
Creates a new Stream that will retrieve elements from the given
collection |
|
static
|
Streams.from(Deque<? extends A> list)
Creates a new Stream that retrieves elements from a Deque. |
|
static
|
Streams.from(Enumeration<? extends A> enumeration)
Creates a new Stream that retrieves elements from the given
Enumeration. |
|
static
|
Streams.from(Iterable<? extends A> iterable)
Create a new Stream that retrieves elements from the given
Iterable. |
|
static
|
Streams.from(Iterator<? extends A> iterator)
Creates a new Stream that retrieves elements from the given
iterator. |
|
static
|
Streams.from(List<? extends A> list)
Creates a new Stream that retrieves elements from a list. |
|
Stream<A> |
AbstractStream.incorporate(A element)
|
|
Stream<A> |
Stream.incorporate(A element)
Inserts the given value after each element of the stream. |
|
Stream<A> |
AbstractStream.incorporate(Function<? super A,? extends A> function)
|
|
Stream<A> |
Stream.incorporate(Function<? super A,? extends A> function)
Inserts after each element the result of applying the given function to it. |
|
Stream<Integer> |
AbstractStream.indices(Evaluable<? super A> predicate)
|
|
Stream<Integer> |
Stream.indices(Evaluable<? super A> predicate)
Answers a stream containing all the zero-based indices of the elements that matches the given predicate |
|
Stream<A> |
AbstractStream.insertBefore(A element,
A reference)
|
|
Stream<A> |
Stream.insertBefore(A element,
A reference)
Inserts element before the first occurrence of reference. |
|
Stream<A> |
AbstractStream.insertBeforeIndex(A element,
int position)
|
|
Stream<A> |
Stream.insertBeforeIndex(A element,
int index)
Inserts element at index - 1. |
|
Stream<A> |
AbstractStream.intersperse(A sep)
intersperse _ [] = [] intersperse _ [x] = [x] intersperse sep (x:xs) = x : sep : intersperse sep xs |
|
Stream<A> |
Stream.intersperse(A element)
Inserts the given element between each retrieved element of
this Stream |
|
static
|
Streams.iterate(A seed,
Applicable<? super A,? extends A> generator)
Creates a new infinite Stream that retrieves element from the
sequence where the nth element is the given function applied to the nth-1. |
|
static
|
Streams.iterateUntilNull(A seed,
Applicable<? super A,? extends A> generator)
Creates a new, potentially infinte Stream that iterates over the
given seed and generator, but will stop before any retrieved element would be
null. |
|
|
Stream.map(Applicable<? super A,? extends B> function)
Transforms each element using the given function |
|
|
AbstractBasicStream.map(Applicable<? super A,? extends B> function)
|
|
|
AbstractStream.map(Function<? super A,? extends B> function)
|
|
|
Stream.map(Function<? super A,? extends B> function)
Transforms each element using the given function. |
|
Stream<A> |
AbstractStream.memoize()
|
|
Stream<A> |
Stream.memoize()
Memoizes stream elements and their order, by answering a lazy stream with Repeatable iteration order that caches elements evaluated during
iteration. |
|
Stream<A> |
Stream.memorize()
Deprecated. the exact name of this concept is memoization, not memorization. Use memoize() instead |
|
Stream<A> |
AbstractBasicStream.memorize()
|
|
Stream<A> |
AbstractStream.prepend(A element)
|
|
Stream<A> |
Stream.prepend(A element)
Adds an element as the first one of the stream. |
|
Stream<A> |
Stream.prepend(Thunk<A> thunk)
Deprecated. use delayedPrepend(Thunk) |
|
Stream<A> |
AbstractBasicStream.prepend(Thunk<A> element)
|
|
static
|
Streams.repeat(A element)
Answers an infinite Stream that indefinitely retrieves the given element. |
|
static
|
Streams.repeat(Thunk<A> thunk)
Answers an infinite Stream that indefinitely retrieves the given thunk's value. |
|
Stream<A> |
AbstractStream.reverse()
|
|
Stream<A> |
Stream.reverse()
Reverses this Stream, by returning a new Stream that retrieves elements in the inverse order of this Stream. |
|
Stream<A> |
Stream.skip(A element)
Preserves all elements but those that are equal to the given one. |
|
Stream<A> |
AbstractStream.skipIndex(int index)
|
|
Stream<A> |
Stream.skipIndex(int index)
Answers a streams that retrieves all the elements of this one, except of that at the given index |
|
Stream<A> |
AbstractStream.slice(int lowerBound,
int upperBound)
|
|
Stream<A> |
Stream.slice(int beginIndex,
int endIndex)
Answers a stream that is a substream of this one. |
|
Stream<A> |
AbstractStream.sort()
|
|
Stream<A> |
Stream.sort()
Sorts this Stream, using their element's natural ordering |
|
Stream<A> |
AbstractStream.sortBy(Comparator<A> comparator)
|
|
Stream<A> |
Stream.sortBy(Comparator<A> comparator)
Sorts this Stream, using the given comparator |
|
|
Stream.sortOn(Applicable<? super A,B> function)
Sorts this Stream, using Compare.on(function) as comparator |
|
|
AbstractBasicStream.sortOn(Applicable<? super A,B> function)
|
|
Stream<A> |
AbstractStream.tail()
|
|
Stream<A> |
Stream.tail()
Answers the tail of the Stream |
|
Stream<A> |
AbstractStream.take(int amountOfElements)
|
|
Stream<A> |
Stream.take(int amountOfElements)
Preserves up to N elements. |
|
Stream<A> |
AbstractStream.takeWhile(Evaluable<? super A> predicate)
|
|
Stream<A> |
Stream.takeWhile(Evaluable<? super A> predicate)
Preserves all elements while they satisfy the given predicate |
|
|
AbstractStream.transform(Applicable<Stream<A>,? extends Stream<B>> function)
|
|
|
Stream.transform(Applicable<Stream<A>,? extends Stream<B>> function)
Lazily applies the given function to this Stream. |
|
|
AbstractStream.transform(Stream.DeconsApplicable<A,B> function)
|
|
|
Stream.transform(Stream.DeconsApplicable<A,B> function)
Lazily applies the given function to this stream,
deconstructing this stream into head and tail, or into an empty stream. |
|
|
AbstractStream.transform(Stream.DelayedDeconsApplicable<A,B> function)
|
|
|
Stream.transform(Stream.DelayedDeconsApplicable<A,B> function)
Lazily applies the given function to this stream,
deconstructing this stream into a head thunk and tail, or into an empty
stream. |
|
static
|
Streams.undefined()
Answers a one element Stream that throws an exception when trying
to access its element. |
|
|
Stream.zip(B... elements)
Returns a Stream formed by by pair of element from
this and the given elements. |
|
|
AbstractBasicStream.zip(B... elements)
|
|
|
Stream.zip(Iterable<B> iterable)
Returns a Stream formed by by pair of element from
this and the given iterable. |
|
|
AbstractBasicStream.zip(Iterable<B> iterable)
|
|
|
Stream.zip(Iterable<B> iterable,
Function2<? super A,? super B,C> function)
Deprecated. use zipWith(Function2, Iterable) |
|
|
AbstractBasicStream.zip(Iterable<B> iterable,
Function2<? super A,? super B,C> function)
|
|
|
Stream.zip(Iterator<B> other)
Returns a Stream formed by by pair of element from
this and the given Iterator. |
|
|
AbstractBasicStream.zip(Iterator<B> other)
|
|
|
AbstractStream.zipWith(Function2<? super A,? super B,C> function,
B... elements)
|
|
|
Stream.zipWith(Function2<? super A,? super B,C> function,
B... elements)
Returns a Stream formed by the result of applying the given
function to each pair of elements from this and
the given iterable. |
|
|
AbstractStream.zipWith(Function2<? super A,? super B,C> function,
Iterable<B> other)
|
|
|
Stream.zipWith(Function2<? super A,? super B,C> function,
Iterable<B> other)
Returns a Stream formed by the result of applying the given
function to each pair of elements from this and
the given iterable. |
|
|
AbstractStream.zipWith(Function2<? super A,? super B,C> function,
Iterator<B> other)
|
|
|
Stream.zipWith(Function2<? super A,? super B,C> function,
Iterator<B> other)
Returns a Stream formed by the result of applying the given
function to each pair of elements from this and
the other. |
|
| Methods in net.sf.staccatocommons.collections.stream that return types with arguments of type Stream | ||
|---|---|---|
Stream<Stream<A>> |
AbstractStream.crossStreams(Stream<Stream<A>> other)
|
|
Stream<Stream<A>> |
Stream.crossStreams(Stream<Stream<A>> streamOfStreams)
Answers the cartesian product of this Stream and each one of the
given streamOfStreams |
|
Tuple2<A,Stream<A>> |
AbstractStream.decons()
|
|
Tuple2<A,Stream<A>> |
Stream.decons()
Answers this stream split into head and tail. |
|
Tuple2<Thunk<A>,Stream<A>> |
AbstractStream.delayedDecons()
|
|
Tuple2<Thunk<A>,Stream<A>> |
Stream.delayedDecons()
Answers this non-empty stream split into a head thunk and tail. |
|
Tuple2<Stream<A>,Stream<A>> |
AbstractStream.streamPartition(Evaluable<? super A> predicate)
|
|
Tuple2<Stream<A>,Stream<A>> |
AbstractStream.streamPartition(Evaluable<? super A> predicate)
|
|
Tuple2<Stream<A>,Stream<A>> |
Stream.streamPartition(Evaluable<? super A> predicate)
Splits stream elements into two ordered streams, that support random access. |
|
Tuple2<Stream<A>,Stream<A>> |
Stream.streamPartition(Evaluable<? super A> predicate)
Splits stream elements into two ordered streams, that support random access. |
|
static
|
Streams.type()
Answers the Stream class, but preserving its element generic type. |
|
| Methods in net.sf.staccatocommons.collections.stream with parameters of type Stream | ||
|---|---|---|
Stream<B> |
Stream.DeconsApplicable.apply(A head,
Stream<A> tail)
Applies this transformation to a non empty Stream splitted into tail and head. |
|
Stream<B> |
Stream.DelayedDeconsApplicable.apply(Thunk<A> head,
Stream<A> tail)
Applies this transformation to a non empty Stream splitted into tail and head's thunk. |
|
static
|
Streams.cons(A head,
Stream<? extends A> tail)
Creates a new Stream that retrieves elements from a head, and
another Iterable, called tail. |
|
static
|
Streams.cons(Thunk<A> head,
Stream<? extends A> tail)
Creates a new Stream that retrieves elements from a head's thunk,
and another Iterable, called tail. |
|
|
AbstractStream.cross(Stream<B> other)
|
|
|
Stream.cross(Stream<B> other)
Answers the Cartesian product of this stream and the given one |
|
Stream<Stream<A>> |
AbstractStream.crossStreams(Stream<Stream<A>> other)
|
|
Stream<Stream<A>> |
Stream.crossStreams(Stream<Stream<A>> streamOfStreams)
Answers the cartesian product of this Stream and each one of the
given streamOfStreams |
|
| Method parameters in net.sf.staccatocommons.collections.stream with type arguments of type Stream | ||
|---|---|---|
Stream<Stream<A>> |
AbstractStream.crossStreams(Stream<Stream<A>> other)
|
|
Stream<Stream<A>> |
Stream.crossStreams(Stream<Stream<A>> streamOfStreams)
Answers the cartesian product of this Stream and each one of the
given streamOfStreams |
|
|
AbstractStream.transform(Applicable<Stream<A>,? extends Stream<B>> function)
|
|
|
AbstractStream.transform(Applicable<Stream<A>,? extends Stream<B>> function)
|
|
|
Stream.transform(Applicable<Stream<A>,? extends Stream<B>> function)
Lazily applies the given function to this Stream. |
|
|
Stream.transform(Applicable<Stream<A>,? extends Stream<B>> function)
Lazily applies the given function to this Stream. |
|
|
||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||