The underlying collection type with unknown element type
The underlying collection type with unknown element type
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
Creates a collection with the specified elements
Creates a collection with the specified elements.
The standard CanBuildFrom
instance for CC objects
The standard CanBuildFrom
instance for CC objects.
The created value is an instance of class GenericCanBuildFrom
,
which forwards calls to create a new builder to the
genericBuilder
method of the requesting collection.
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.
The empty collection of type CC[A]
The empty collection of type CC[A]
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.
Tests whether the given predicate p
holds
for some corresponding elements of the argument lists
Tests whether the given predicate p
holds
for some corresponding elements of the argument lists.
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
.
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
.
Concatenate all the elements of a given list of lists
Concatenate all the elements of a given list of lists.
the list of lists that are to be concatenated
the concatenation of all the lists
Tests whether the given predicate p
holds
for all corresponding elements of the argument lists
Tests whether the given predicate p
holds
for all corresponding elements of the argument lists.
Converts a range of an array into a list
Converts a range of an array into a list.
the array to convert
the first index to consider
the lenght of the range to convert
a list that contains the same elements than arr
in the same order
Converts an array into a list
Converts an array into a list.
the array to convert
a list that contains the same elements than arr
in the same order
Converts an iterator to a list
Converts an iterator to a list.
the iterator to convert
a list that contains the elements returned by successive
calls to it.next
Parses a string which contains substrings separated by a separator character and returns a list of all substrings
Parses a string which contains substrings separated by a separator character and returns a list of all substrings.
the string to parse
the separator character
the list of substrings
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)), ...
Returns the Left
values in the given Iterable
of Either
s
Returns the Left
values in the given Iterable
of Either
s.
Create a list containing several copies of an element
Create a list containing several copies of an element.
the length of the resulting list
the element composing the resulting list
a list composed of n elements all equal to elem
Returns the list resulting from applying the given function f
to corresponding elements of the argument lists
Returns the list resulting from applying the given function f
to corresponding elements of the argument lists.
function to apply to each pair of elements.
[f(a0,b0), ..., f(an,bn)]
if the lists are
[a0, ..., ak]
, [b0, ..., bl]
and
n = min(k,l)
Returns the list resulting from applying the given function
f
to corresponding elements of the argument lists
Returns the list resulting from applying the given function
f
to corresponding elements of the argument lists.
function to apply to each pair of elements.
[f(a_{0},b_{0},c_{0}),
..., f(a_{n},b_{n},c_{n})]
if the lists are [a_{0}, ..., a_{k}]
,
[b_{0}, ..., b_{l}]
,
[c_{0}, ..., c_{m}]
and
n = min(k,l,m)
Like xs map f, but returns xs
unchanged if function
f
maps all elements to themselves
Like xs map f, but returns xs
unchanged if function
f
maps all elements to themselves.
The default builder for CC objects
The default builder for CC objects.
Create a sorted list with element valuesv_{n+1} = step(v_{n})
where v_{0} = start
and elements are in the range between start
(inclusive)
and end
(exclusive)
Create a sorted list with element valuesv_{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 list
the end value of the list
the increment function of the list, which given v_{n}
,
computes v_{n+1}
. Must be monotonically increasing
or decreasing.
the sorted list of all integers in range [start;end).
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
Returns the Right
values in the givenIterable
of Either
s
Returns the Right
values in the givenIterable
of Either
s.
Transforms an Iterable of Eithers into a pair of lists
Transforms an Iterable of Eithers into a pair of lists.
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
.
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)
Returns the given list of characters as a string
Returns the given list of characters as a string.
the list to convert.
the list in form of a string.
Returns a string representation of the object
Returns a string representation of the object.
The default representation is platform dependent.
Transposes a list of lists
Transposes a list of lists. pre: All element lists have the same length.
the list of lists
the transposed list of lists
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
Transforms an iterable of pairs into a pair of lists
Transforms an iterable of pairs into a pair of lists.
the iterable of pairs to unzip
a pair of lists.
Transforms a list of pairs into a pair of lists
Transforms a list of pairs into a pair of lists.
the list of pairs to unzip
a pair of lists.
$factoryInfo