The underlying collection type with unknown element type
The underlying collection type with unknown element type
A lazy cons cell, from which streams are built
A wrapper class that adds #::
for cons and #:::
for concat as operations
to streams
A generic implementation of the CanBuildFrom
trait, which forwards
all calls to apply(from)
to the genericBuilder
methof of
collection from
, and which forwards all calls of apply()
to the
newBuilder
method of this factory
A builder for streams
The factory for streams
An extractor that allows to pattern match streams with #::
A stream consisting of given elements @return a new collection with elements elems
A stream consisting of given elements @return a new collection with elements elems
The concatenation of all streams returned by an iterator
The concatenation of all streams returned by an iterator
The concatenation of a sequence of streams
The concatenation of a sequence of streams
Concatenates all argument collections into a single collection
Concatenates all argument collections into a single collection.
the collections that are to be concatenated.
the concatenation of all the collections.
An alternative way of building and matching Streams using Stream
A wrapper method that adds #::
for cons and #::: for concat as operations
to streams
A wrapper method that adds #::
for cons and #::: for concat as operations
to streams.
Create an infinite stream containing the given element
Create an infinite stream containing the given element.
the element composing the resulting stream
the stream containing an infinite number of elem
Create an infinite stream containing the given element expression (which is computed for each occurrence)
Create an infinite stream containing the given element expression (which is computed for each occurrence)
the element composing the resulting stream
the stream containing an infinite number of elem
The empty stream
This method is used to compare the receiver object (this
)
with the argument object (arg0
) for equivalence
This method is used to compare the receiver object (this
)
with the argument object (arg0
) for equivalence.
The default implementations of this method is an equivalence relation:
x
of type Any
,
x.equals(x)
should return true
.x
and y
of type
Any
, x.equals(y)
should return true
if and only
if y.equals(x)
returns true
.x
, y
, and z
of type AnyRef
if x.equals(y)
returns true
and
y.equals(z)
returns
true
, then x.equals(z)
should return true
.
If you override this method, you should verify that
your implementation remains an equivalence relation.
Additionally, when overriding this method it is often necessary to
override hashCode
to ensure that objects that are
"equal" (o1.equals(o2)
returns true
)
hash to the same Int
(o1.hashCode.equals(o2.hashCode)
).
the object to compare against this object for equality.
true
if the receiver object is equivalent to the argument; false
otherwise.
Produces a collection containing the results of some element computation a number of times
Produces a collection containing the results of some element computation a number of times.
the number of elements contained in the collection.
the element computation
A collection that contains the results of n
evaluations of elem
.
Produces a five-dimensional collection containing the results of some element computation a number of times
Produces a five-dimensional collection containing the results of some element computation a number of times.
the number of elements in the 1st dimension
the number of elements in the 2nd dimension
the number of elements in the 3nd dimension
the number of elements in the 4th dimension
the number of elements in the 5th dimension
the element computation
A collection that contains the results of n1 x n2 x n3 x n4 x n5
evaluations of elem
.
Produces a four-dimensional collection containing the results of some element computation a number of times
Produces a four-dimensional collection containing the results of some element computation a number of times.
the number of elements in the 1st dimension
the number of elements in the 2nd dimension
the number of elements in the 3nd dimension
the number of elements in the 4th dimension
the element computation
A collection that contains the results of n1 x n2 x n3 x n4
evaluations of elem
.
Produces a three-dimensional collection containing the results of some element computation a number of times
Produces a three-dimensional collection containing the results of some element computation a number of times.
the number of elements in the 1st dimension
the number of elements in the 2nd dimension
the number of elements in the 3nd dimension
the element computation
A collection that contains the results of n1 x n2 x n3
evaluations of elem
.
Produces a two-dimensional collection containing the results of some element computation a number of times
Produces a two-dimensional collection containing the results of some element computation a number of times.
the number of elements in the 1st dimension
the number of elements in the 2nd dimension
the element computation
A collection that contains the results of n1 x n2
evaluations of elem
.
Create an infinite stream starting at start
and incrementing by 1
Create an infinite stream starting at start
and incrementing by 1.
the start value of the stream
the stream starting at value start
.
Create an infinite stream starting at start
and incrementing by step step
Create an infinite stream starting at start
and incrementing by step step
the start value of the stream
the increment value of the stream
the stream starting at value start
.
A stream containing all elements of a given iterator, in the order they are produced
A stream containing all elements of a given iterator, in the order they are produced.
The iterator producing the stream's elements
Returns a hash code value for the object
Returns a hash code value for the object.
The default hashing algorithm is platform dependent.
Note that it is allowed for two objects to have identical hash
codes (o1.hashCode.equals(o2.hashCode)
) yet not be
equal (o1.equals(o2)
returns false
). A
degenerate implementation could always return 0
.
However, it is required that if two objects are equal
(o1.equals(o2)
returns true
) that they
have identical hash codes
(o1.hashCode.equals(o2.hashCode)
). Therefore, when
overriding this method, be sure to verify that the behavior is
consistent with the equals
method.
Produces a collection containing repeated applications of a function to a start value
Produces a collection containing repeated applications of a function to a start value.
the start value of the collection
the number of elements contained inthe collection
the function that's repeatedly applied
a collection with len
values in the sequence start, f(start), f(f(start)), ...
An infinite stream that repeatedly applies a given function to a start value
An infinite stream that repeatedly applies a given function to a start value.
the start value of the stream
the function that's repeatedly applied
the stream returning the infinite sequence of values start, f(start), f(f(start)), ...
Create a stream containing several copies of an element
Create a stream containing several copies of an element.
the length of the resulting stream
the element composing the resulting stream
the stream composed of n elements all equal to elem
Creates a new builder for a stream
Create a stream with element values
v_{n+1} = step(v_{n})
where v_{0} = start
and elements are in the range between start
(inclusive)
and end
(exclusive)
Create a stream with element values
v_{n+1} = step(v_{n})
where v_{0} = start
and elements are in the range between start
(inclusive)
and end
(exclusive)
the start value of the stream
the end value of the stream
the increment function of the stream, must be monotonically increasing or decreasing
the stream starting at value start
.
Produces a collection containing equally spaced values in some integer interval
Produces a collection containing equally spaced values in some integer interval.
the start value of the collection
the end value of the collection (the first value NOT contained)
the difference between successive elements of the collection (must be positive or negative)
a collection with values start, start + step, ...
up to, but excluding end
Produces a collection containing a sequence of increasing of integers
Produces a collection containing a sequence of increasing of integers.
the end value of the collection (the first value NOT contained)
a collection with values start, start + 1, ..., end - 1
Produces a collection containing values of a given function over a range of integer values starting from 0
Produces a collection containing values of a given function over a range of integer values starting from 0.
The number of elements in the collection
The function computing element values
A collection consisting of elements f(0), ..., f(n -1)
Produces a five-dimensional collection containing values of a given function over ranges of integer values starting from 0
Produces a five-dimensional collection containing values of a given function over ranges of integer values starting from 0.
the number of elements in the 1st dimension
the number of elements in the 2nd dimension
the number of elements in the 3nd dimension
the number of elements in the 4th dimension
the number of elements in the 5th dimension
The function computing element values
A collection consisting of elements f(i1, i2, i3, i4, i5)
for 0 <= i1 < n1
, 0 <= i2 < n2
, 0 <= i3 < n3
, 0 <= i4 < n4
, and 0 <= i5 < n5
.
Produces a four-dimensional collection containing values of a given function over ranges of integer values starting from 0
Produces a four-dimensional collection containing values of a given function over ranges of integer values starting from 0.
the number of elements in the 1st dimension
the number of elements in the 2nd dimension
the number of elements in the 3nd dimension
the number of elements in the 4th dimension
The function computing element values
A collection consisting of elements f(i1, i2, i3, i4)
for 0 <= i1 < n1
, 0 <= i2 < n2
, 0 <= i3 < n3
, and 0 <= i4 < n4
.
Produces a three-dimensional collection containing values of a given function over ranges of integer values starting from 0
Produces a three-dimensional collection containing values of a given function over ranges of integer values starting from 0.
the number of elements in the 1st dimension
the number of elements in the 2nd dimension
the number of elements in the 3nd dimension
The function computing element values
A collection consisting of elements f(i1, i2, i3)
for 0 <= i1 < n1
, 0 <= i2 < n2
, and 0 <= i3 < n3
.
Produces a two-dimensional collection containing values of a given function over ranges of integer values starting from 0
Produces a two-dimensional collection containing values of a given function over ranges of integer values starting from 0.
the number of elements in the 1st dimension
the number of elements in the 2nd dimension
The function computing element values
A collection consisting of elements f(i1, i2)
for 0 <= i1 < n1
and 0 <= i2 < n2
.
Returns a string representation of the object
Returns a string representation of the object.
The default representation is platform dependent.
This method is called in a pattern match { case Seq(
This method is called in a pattern match { case Seq(...) => }.
the selector value
sequence wrapped in an option, if this is a Seq, otherwise none
The object
Stream
provides helper functions to manipulate streams.