Test two objects for inequality.
Test two objects for inequality.
true
if !(this == that), false otherwise.
Equivalent to x.hashCode
except for boxed numeric types and null
.
Equivalent to x.hashCode
except for boxed numeric types and null
.
For numerics, it returns a hash value which is consistent
with value equality: if two value type instances compare
as true, then ## will produce the same hash value for each
of them.
For null
returns a hashcode where null.hashCode
throws a
NullPointerException
.
a hash value consistent with ==
[use case] Returns a new array containing the elements from the left hand operand followed by the elements from the right hand operand.
Returns a new array containing the elements from the left hand operand followed by the elements from the right hand operand. The element type of the array is the most specific superclass encompassing the element types of the two operands.
Example:
scala> val a = List(1) a: List[Int] = List(1) scala> val b = List(2) b: List[Int] = List(2) scala> val c = a ++ b c: List[Int] = List(1, 2) scala> val d = List('a') d: List[Char] = List(a) scala> val e = c ++ d e: List[AnyVal] = List(1, 2, a)
the element type of the returned collection.
the traversable to append.
a new array which contains all elements of this array
followed by all elements of that
.
[use case] Returns a new array containing the elements from the left hand operand followed by the elements from the right hand operand.
Returns a new array containing the elements from the left hand operand followed by the elements from the right hand operand. The element type of the array is the most specific superclass encompassing the element types of the two operands.
Example:
scala> val a = List(1) a: List[Int] = List(1) scala> val b = List(2) b: List[Int] = List(2) scala> val c = a ++ b c: List[Int] = List(1, 2) scala> val d = List('a') d: List[Char] = List(a) scala> val e = c ++ d e: List[AnyVal] = List(1, 2, a)
the element type of the returned collection.
the traversable to append.
a new array which contains all elements of this array
followed by all elements of that
.
[use case] Returns a new array containing the elements from the left hand operand followed by the elements from the right hand operand.
Returns a new array containing the elements from the left hand operand followed by the elements from the right hand operand. The element type of the array is the most specific superclass encompassing the element types of the two operands.
Example:
scala> val a = List(1) a: List[Int] = List(1) scala> val b = List(2) b: List[Int] = List(2) scala> val c = a ++ b c: List[Int] = List(1, 2) scala> val d = List('a') d: List[Char] = List(a) scala> val e = c ++ d e: List[AnyVal] = List(1, 2, a)
the element type of the returned collection.
the traversable to append.
a new array which contains all elements of this array
followed by all elements of that
.
[use case] Returns a new array containing the elements from the left hand operand followed by the elements from the right hand operand.
Returns a new array containing the elements from the left hand operand followed by the elements from the right hand operand. The element type of the array is the most specific superclass encompassing the element types of the two operands.
Example:
scala> val a = List(1) a: List[Int] = List(1) scala> val b = List(2) b: List[Int] = List(2) scala> val c = a ++ b c: List[Int] = List(1, 2) scala> val d = List('a') d: List[Char] = List(a) scala> val e = c ++ d e: List[AnyVal] = List(1, 2, a)
the element type of the returned collection.
the traversable to append.
a new array which contains all elements of this array
followed by all elements of that
.
[use case] Returns a new array containing the elements from the left hand operand followed by the elements from the right hand operand.
Returns a new array containing the elements from the left hand operand followed by the elements from the right hand operand. The element type of the array is the most specific superclass encompassing the element types of the two operands.
Example:
scala> val a = List(1) a: List[Int] = List(1) scala> val b = List(2) b: List[Int] = List(2) scala> val c = a ++ b c: List[Int] = List(1, 2) scala> val d = List('a') d: List[Char] = List(a) scala> val e = c ++ d e: List[AnyVal] = List(1, 2, a)
the element type of the returned collection.
the traversable to append.
a new array which contains all elements of this array
followed by all elements of that
.
[use case] Returns a new array containing the elements from the left hand operand followed by the elements from the right hand operand.
Returns a new array containing the elements from the left hand operand followed by the elements from the right hand operand. The element type of the array is the most specific superclass encompassing the element types of the two operands.
Example:
scala> val a = List(1) a: List[Int] = List(1) scala> val b = List(2) b: List[Int] = List(2) scala> val c = a ++ b c: List[Int] = List(1, 2) scala> val d = List('a') d: List[Char] = List(a) scala> val e = c ++ d e: List[AnyVal] = List(1, 2, a)
the element type of the returned collection.
the traversable to append.
a new array which contains all elements of this array
followed by all elements of that
.
[use case] Returns a new array containing the elements from the left hand operand followed by the elements from the right hand operand.
Returns a new array containing the elements from the left hand operand followed by the elements from the right hand operand. The element type of the array is the most specific superclass encompassing the element types of the two operands.
Example:
scala> val a = List(1) a: List[Int] = List(1) scala> val b = List(2) b: List[Int] = List(2) scala> val c = a ++ b c: List[Int] = List(1, 2) scala> val d = List('a') d: List[Char] = List(a) scala> val e = c ++ d e: List[AnyVal] = List(1, 2, a)
the element type of the returned collection.
the traversable to append.
a new array which contains all elements of this array
followed by all elements of that
.
[use case] Returns a new array containing the elements from the left hand operand followed by the elements from the right hand operand.
Returns a new array containing the elements from the left hand operand followed by the elements from the right hand operand. The element type of the array is the most specific superclass encompassing the element types of the two operands.
Example:
scala> val a = List(1) a: List[Int] = List(1) scala> val b = List(2) b: List[Int] = List(2) scala> val c = a ++ b c: List[Int] = List(1, 2) scala> val d = List('a') d: List[Char] = List(a) scala> val e = c ++ d e: List[AnyVal] = List(1, 2, a)
the element type of the returned collection.
the traversable to append.
a new array which contains all elements of this array
followed by all elements of that
.
[use case] Returns a new array containing the elements from the left hand operand followed by the elements from the right hand operand.
Returns a new array containing the elements from the left hand operand followed by the elements from the right hand operand. The element type of the array is the most specific superclass encompassing the element types of the two operands.
Example:
scala> val a = List(1) a: List[Int] = List(1) scala> val b = List(2) b: List[Int] = List(2) scala> val c = a ++ b c: List[Int] = List(1, 2) scala> val d = List('a') d: List[Char] = List(a) scala> val e = c ++ d e: List[AnyVal] = List(1, 2, a)
the element type of the returned collection.
the traversable to append.
a new array which contains all elements of this array
followed by all elements of that
.
[use case] Returns a new array containing the elements from the left hand operand followed by the elements from the right hand operand.
Returns a new array containing the elements from the left hand operand followed by the elements from the right hand operand. The element type of the array is the most specific superclass encompassing the element types of the two operands.
Example:
scala> val a = List(1) a: List[Int] = List(1) scala> val b = List(2) b: List[Int] = List(2) scala> val c = a ++ b c: List[Int] = List(1, 2) scala> val d = List('a') d: List[Char] = List(a) scala> val e = c ++ d e: List[AnyVal] = List(1, 2, a)
the element type of the returned collection.
the traversable to append.
a new array which contains all elements of this array
followed by all elements of that
.
[use case] Returns a new array containing the elements from the left hand operand followed by the elements from the right hand operand.
Returns a new array containing the elements from the left hand operand followed by the elements from the right hand operand. The element type of the array is the most specific superclass encompassing the element types of the two operands.
Example:
scala> val a = List(1) a: List[Int] = List(1) scala> val b = List(2) b: List[Int] = List(2) scala> val c = a ++ b c: List[Int] = List(1, 2) scala> val d = List('a') d: List[Char] = List(a) scala> val e = c ++ d e: List[AnyVal] = List(1, 2, a)
the element type of the returned collection.
the traversable to append.
a new array which contains all elements of this array
followed by all elements of that
.
As with ++
, returns a new collection containing the elements from the
left operand followed by the elements from the right operand.
As with ++
, returns a new collection containing the elements from the
left operand followed by the elements from the right operand.
It differs from ++
in that the right operand determines the type of
the resulting collection rather than the left one.
Mnemonic: the COLon is on the side of the new COLlection type.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = LinkedList(2) y: scala.collection.mutable.LinkedList[Int] = LinkedList(2) scala> val z = x ++: y z: scala.collection.mutable.LinkedList[Int] = LinkedList(1, 2)
This overload exists because: for the implementation of ++:
we should
reuse that of ++
because many collections override it with more
efficient versions.
Since TraversableOnce
has no ++
method, we have to implement that
directly, but Traversable
and down can use the overload.
the element type of the returned collection.
the class of the returned collection. Where possible, That
is
the same class as the current collection class Repr
, but this
depends on the element type B
being admissible for that class,
which means that an implicit instance of type CanBuildFrom[Repr, B, That]
is found.
the traversable to append.
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
a new collection of type That
which contains all elements
of this mutable indexed sequence followed by all elements of that
.
[use case] As with ++
, returns a new collection containing the elements from the left operand followed by the
elements from the right operand.
As with ++
, returns a new collection containing the elements from the left operand followed by the
elements from the right operand.
It differs from ++
in that the right operand determines the type of
the resulting collection rather than the left one.
Mnemonic: the COLon is on the side of the new COLlection type.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = LinkedList(2) y: scala.collection.mutable.LinkedList[Int] = LinkedList(2) scala> val z = x ++: y z: scala.collection.mutable.LinkedList[Int] = LinkedList(1, 2)
the element type of the returned collection.
the traversable to append.
a new array which contains all elements of this array
followed by all elements of that
.
As with ++
, returns a new collection containing the elements from the
left operand followed by the elements from the right operand.
As with ++
, returns a new collection containing the elements from the
left operand followed by the elements from the right operand.
It differs from ++
in that the right operand determines the type of
the resulting collection rather than the left one.
Mnemonic: the COLon is on the side of the new COLlection type.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = LinkedList(2) y: scala.collection.mutable.LinkedList[Int] = LinkedList(2) scala> val z = x ++: y z: scala.collection.mutable.LinkedList[Int] = LinkedList(1, 2)
This overload exists because: for the implementation of ++:
we should
reuse that of ++
because many collections override it with more
efficient versions.
Since TraversableOnce
has no ++
method, we have to implement that
directly, but Traversable
and down can use the overload.
the element type of the returned collection.
the class of the returned collection. Where possible, That
is
the same class as the current collection class Repr
, but this
depends on the element type B
being admissible for that class,
which means that an implicit instance of type CanBuildFrom[Repr, B, That]
is found.
the traversable to append.
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
a new collection of type That
which contains all elements
of this mutable indexed sequence followed by all elements of that
.
[use case] As with ++
, returns a new collection containing the elements from the left operand followed by the
elements from the right operand.
As with ++
, returns a new collection containing the elements from the left operand followed by the
elements from the right operand.
It differs from ++
in that the right operand determines the type of
the resulting collection rather than the left one.
Mnemonic: the COLon is on the side of the new COLlection type.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = LinkedList(2) y: scala.collection.mutable.LinkedList[Int] = LinkedList(2) scala> val z = x ++: y z: scala.collection.mutable.LinkedList[Int] = LinkedList(1, 2)
the element type of the returned collection.
the traversable to append.
a new array which contains all elements of this array
followed by all elements of that
.
As with ++
, returns a new collection containing the elements from the
left operand followed by the elements from the right operand.
As with ++
, returns a new collection containing the elements from the
left operand followed by the elements from the right operand.
It differs from ++
in that the right operand determines the type of
the resulting collection rather than the left one.
Mnemonic: the COLon is on the side of the new COLlection type.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = LinkedList(2) y: scala.collection.mutable.LinkedList[Int] = LinkedList(2) scala> val z = x ++: y z: scala.collection.mutable.LinkedList[Int] = LinkedList(1, 2)
This overload exists because: for the implementation of ++:
we should
reuse that of ++
because many collections override it with more
efficient versions.
Since TraversableOnce
has no ++
method, we have to implement that
directly, but Traversable
and down can use the overload.
the element type of the returned collection.
the class of the returned collection. Where possible, That
is
the same class as the current collection class Repr
, but this
depends on the element type B
being admissible for that class,
which means that an implicit instance of type CanBuildFrom[Repr, B, That]
is found.
the traversable to append.
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
a new collection of type That
which contains all elements
of this mutable indexed sequence followed by all elements of that
.
[use case] As with ++
, returns a new collection containing the elements from the left operand followed by the
elements from the right operand.
As with ++
, returns a new collection containing the elements from the left operand followed by the
elements from the right operand.
It differs from ++
in that the right operand determines the type of
the resulting collection rather than the left one.
Mnemonic: the COLon is on the side of the new COLlection type.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = LinkedList(2) y: scala.collection.mutable.LinkedList[Int] = LinkedList(2) scala> val z = x ++: y z: scala.collection.mutable.LinkedList[Int] = LinkedList(1, 2)
the element type of the returned collection.
the traversable to append.
a new array which contains all elements of this array
followed by all elements of that
.
As with ++
, returns a new collection containing the elements from the
left operand followed by the elements from the right operand.
As with ++
, returns a new collection containing the elements from the
left operand followed by the elements from the right operand.
It differs from ++
in that the right operand determines the type of
the resulting collection rather than the left one.
Mnemonic: the COLon is on the side of the new COLlection type.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = LinkedList(2) y: scala.collection.mutable.LinkedList[Int] = LinkedList(2) scala> val z = x ++: y z: scala.collection.mutable.LinkedList[Int] = LinkedList(1, 2)
This overload exists because: for the implementation of ++:
we should
reuse that of ++
because many collections override it with more
efficient versions.
Since TraversableOnce
has no ++
method, we have to implement that
directly, but Traversable
and down can use the overload.
the element type of the returned collection.
the class of the returned collection. Where possible, That
is
the same class as the current collection class Repr
, but this
depends on the element type B
being admissible for that class,
which means that an implicit instance of type CanBuildFrom[Repr, B, That]
is found.
the traversable to append.
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
a new collection of type That
which contains all elements
of this mutable indexed sequence followed by all elements of that
.
[use case] As with ++
, returns a new collection containing the elements from the left operand followed by the
elements from the right operand.
As with ++
, returns a new collection containing the elements from the left operand followed by the
elements from the right operand.
It differs from ++
in that the right operand determines the type of
the resulting collection rather than the left one.
Mnemonic: the COLon is on the side of the new COLlection type.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = LinkedList(2) y: scala.collection.mutable.LinkedList[Int] = LinkedList(2) scala> val z = x ++: y z: scala.collection.mutable.LinkedList[Int] = LinkedList(1, 2)
the element type of the returned collection.
the traversable to append.
a new array which contains all elements of this array
followed by all elements of that
.
As with ++
, returns a new collection containing the elements from the
left operand followed by the elements from the right operand.
As with ++
, returns a new collection containing the elements from the
left operand followed by the elements from the right operand.
It differs from ++
in that the right operand determines the type of
the resulting collection rather than the left one.
Mnemonic: the COLon is on the side of the new COLlection type.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = LinkedList(2) y: scala.collection.mutable.LinkedList[Int] = LinkedList(2) scala> val z = x ++: y z: scala.collection.mutable.LinkedList[Int] = LinkedList(1, 2)
This overload exists because: for the implementation of ++:
we should
reuse that of ++
because many collections override it with more
efficient versions.
Since TraversableOnce
has no ++
method, we have to implement that
directly, but Traversable
and down can use the overload.
the element type of the returned collection.
the class of the returned collection. Where possible, That
is
the same class as the current collection class Repr
, but this
depends on the element type B
being admissible for that class,
which means that an implicit instance of type CanBuildFrom[Repr, B, That]
is found.
the traversable to append.
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
a new collection of type That
which contains all elements
of this mutable indexed sequence followed by all elements of that
.
[use case] As with ++
, returns a new collection containing the elements from the left operand followed by the
elements from the right operand.
As with ++
, returns a new collection containing the elements from the left operand followed by the
elements from the right operand.
It differs from ++
in that the right operand determines the type of
the resulting collection rather than the left one.
Mnemonic: the COLon is on the side of the new COLlection type.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = LinkedList(2) y: scala.collection.mutable.LinkedList[Int] = LinkedList(2) scala> val z = x ++: y z: scala.collection.mutable.LinkedList[Int] = LinkedList(1, 2)
the element type of the returned collection.
the traversable to append.
a new array which contains all elements of this array
followed by all elements of that
.
As with ++
, returns a new collection containing the elements from the
left operand followed by the elements from the right operand.
As with ++
, returns a new collection containing the elements from the
left operand followed by the elements from the right operand.
It differs from ++
in that the right operand determines the type of
the resulting collection rather than the left one.
Mnemonic: the COLon is on the side of the new COLlection type.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = LinkedList(2) y: scala.collection.mutable.LinkedList[Int] = LinkedList(2) scala> val z = x ++: y z: scala.collection.mutable.LinkedList[Int] = LinkedList(1, 2)
This overload exists because: for the implementation of ++:
we should
reuse that of ++
because many collections override it with more
efficient versions.
Since TraversableOnce
has no ++
method, we have to implement that
directly, but Traversable
and down can use the overload.
the element type of the returned collection.
the class of the returned collection. Where possible, That
is
the same class as the current collection class Repr
, but this
depends on the element type B
being admissible for that class,
which means that an implicit instance of type CanBuildFrom[Repr, B, That]
is found.
the traversable to append.
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
a new collection of type That
which contains all elements
of this mutable indexed sequence followed by all elements of that
.
[use case] As with ++
, returns a new collection containing the elements from the left operand followed by the
elements from the right operand.
As with ++
, returns a new collection containing the elements from the left operand followed by the
elements from the right operand.
It differs from ++
in that the right operand determines the type of
the resulting collection rather than the left one.
Mnemonic: the COLon is on the side of the new COLlection type.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = LinkedList(2) y: scala.collection.mutable.LinkedList[Int] = LinkedList(2) scala> val z = x ++: y z: scala.collection.mutable.LinkedList[Int] = LinkedList(1, 2)
the element type of the returned collection.
the traversable to append.
a new array which contains all elements of this array
followed by all elements of that
.
As with ++
, returns a new collection containing the elements from the
left operand followed by the elements from the right operand.
As with ++
, returns a new collection containing the elements from the
left operand followed by the elements from the right operand.
It differs from ++
in that the right operand determines the type of
the resulting collection rather than the left one.
Mnemonic: the COLon is on the side of the new COLlection type.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = LinkedList(2) y: scala.collection.mutable.LinkedList[Int] = LinkedList(2) scala> val z = x ++: y z: scala.collection.mutable.LinkedList[Int] = LinkedList(1, 2)
This overload exists because: for the implementation of ++:
we should
reuse that of ++
because many collections override it with more
efficient versions.
Since TraversableOnce
has no ++
method, we have to implement that
directly, but Traversable
and down can use the overload.
the element type of the returned collection.
the class of the returned collection. Where possible, That
is
the same class as the current collection class Repr
, but this
depends on the element type B
being admissible for that class,
which means that an implicit instance of type CanBuildFrom[Repr, B, That]
is found.
the traversable to append.
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
a new collection of type That
which contains all elements
of this mutable indexed sequence followed by all elements of that
.
[use case] As with ++
, returns a new collection containing the elements from the left operand followed by the
elements from the right operand.
As with ++
, returns a new collection containing the elements from the left operand followed by the
elements from the right operand.
It differs from ++
in that the right operand determines the type of
the resulting collection rather than the left one.
Mnemonic: the COLon is on the side of the new COLlection type.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = LinkedList(2) y: scala.collection.mutable.LinkedList[Int] = LinkedList(2) scala> val z = x ++: y z: scala.collection.mutable.LinkedList[Int] = LinkedList(1, 2)
the element type of the returned collection.
the traversable to append.
a new array which contains all elements of this array
followed by all elements of that
.
As with ++
, returns a new collection containing the elements from the
left operand followed by the elements from the right operand.
As with ++
, returns a new collection containing the elements from the
left operand followed by the elements from the right operand.
It differs from ++
in that the right operand determines the type of
the resulting collection rather than the left one.
Mnemonic: the COLon is on the side of the new COLlection type.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = LinkedList(2) y: scala.collection.mutable.LinkedList[Int] = LinkedList(2) scala> val z = x ++: y z: scala.collection.mutable.LinkedList[Int] = LinkedList(1, 2)
This overload exists because: for the implementation of ++:
we should
reuse that of ++
because many collections override it with more
efficient versions.
Since TraversableOnce
has no ++
method, we have to implement that
directly, but Traversable
and down can use the overload.
the element type of the returned collection.
the class of the returned collection. Where possible, That
is
the same class as the current collection class Repr
, but this
depends on the element type B
being admissible for that class,
which means that an implicit instance of type CanBuildFrom[Repr, B, That]
is found.
the traversable to append.
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
a new collection of type That
which contains all elements
of this mutable indexed sequence followed by all elements of that
.
[use case] As with ++
, returns a new collection containing the elements from the left operand followed by the
elements from the right operand.
As with ++
, returns a new collection containing the elements from the left operand followed by the
elements from the right operand.
It differs from ++
in that the right operand determines the type of
the resulting collection rather than the left one.
Mnemonic: the COLon is on the side of the new COLlection type.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = LinkedList(2) y: scala.collection.mutable.LinkedList[Int] = LinkedList(2) scala> val z = x ++: y z: scala.collection.mutable.LinkedList[Int] = LinkedList(1, 2)
the element type of the returned collection.
the traversable to append.
a new array which contains all elements of this array
followed by all elements of that
.
As with ++
, returns a new collection containing the elements from the
left operand followed by the elements from the right operand.
As with ++
, returns a new collection containing the elements from the
left operand followed by the elements from the right operand.
It differs from ++
in that the right operand determines the type of
the resulting collection rather than the left one.
Mnemonic: the COLon is on the side of the new COLlection type.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = LinkedList(2) y: scala.collection.mutable.LinkedList[Int] = LinkedList(2) scala> val z = x ++: y z: scala.collection.mutable.LinkedList[Int] = LinkedList(1, 2)
This overload exists because: for the implementation of ++:
we should
reuse that of ++
because many collections override it with more
efficient versions.
Since TraversableOnce
has no ++
method, we have to implement that
directly, but Traversable
and down can use the overload.
the element type of the returned collection.
the class of the returned collection. Where possible, That
is
the same class as the current collection class Repr
, but this
depends on the element type B
being admissible for that class,
which means that an implicit instance of type CanBuildFrom[Repr, B, That]
is found.
the traversable to append.
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
a new collection of type That
which contains all elements
of this mutable indexed sequence followed by all elements of that
.
[use case] As with ++
, returns a new collection containing the elements from the left operand followed by the
elements from the right operand.
As with ++
, returns a new collection containing the elements from the left operand followed by the
elements from the right operand.
It differs from ++
in that the right operand determines the type of
the resulting collection rather than the left one.
Mnemonic: the COLon is on the side of the new COLlection type.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = LinkedList(2) y: scala.collection.mutable.LinkedList[Int] = LinkedList(2) scala> val z = x ++: y z: scala.collection.mutable.LinkedList[Int] = LinkedList(1, 2)
the element type of the returned collection.
the traversable to append.
a new array which contains all elements of this array
followed by all elements of that
.
As with ++
, returns a new collection containing the elements from the
left operand followed by the elements from the right operand.
As with ++
, returns a new collection containing the elements from the
left operand followed by the elements from the right operand.
It differs from ++
in that the right operand determines the type of
the resulting collection rather than the left one.
Mnemonic: the COLon is on the side of the new COLlection type.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = LinkedList(2) y: scala.collection.mutable.LinkedList[Int] = LinkedList(2) scala> val z = x ++: y z: scala.collection.mutable.LinkedList[Int] = LinkedList(1, 2)
This overload exists because: for the implementation of ++:
we should
reuse that of ++
because many collections override it with more
efficient versions.
Since TraversableOnce
has no ++
method, we have to implement that
directly, but Traversable
and down can use the overload.
the element type of the returned collection.
the class of the returned collection. Where possible, That
is
the same class as the current collection class Repr
, but this
depends on the element type B
being admissible for that class,
which means that an implicit instance of type CanBuildFrom[Repr, B, That]
is found.
the traversable to append.
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
a new collection of type That
which contains all elements
of this mutable indexed sequence followed by all elements of that
.
[use case] As with ++
, returns a new collection containing the elements from the left operand followed by the
elements from the right operand.
As with ++
, returns a new collection containing the elements from the left operand followed by the
elements from the right operand.
It differs from ++
in that the right operand determines the type of
the resulting collection rather than the left one.
Mnemonic: the COLon is on the side of the new COLlection type.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = LinkedList(2) y: scala.collection.mutable.LinkedList[Int] = LinkedList(2) scala> val z = x ++: y z: scala.collection.mutable.LinkedList[Int] = LinkedList(1, 2)
the element type of the returned collection.
the traversable to append.
a new array which contains all elements of this array
followed by all elements of that
.
As with ++
, returns a new collection containing the elements from the
left operand followed by the elements from the right operand.
As with ++
, returns a new collection containing the elements from the
left operand followed by the elements from the right operand.
It differs from ++
in that the right operand determines the type of
the resulting collection rather than the left one.
Mnemonic: the COLon is on the side of the new COLlection type.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = LinkedList(2) y: scala.collection.mutable.LinkedList[Int] = LinkedList(2) scala> val z = x ++: y z: scala.collection.mutable.LinkedList[Int] = LinkedList(1, 2)
This overload exists because: for the implementation of ++:
we should
reuse that of ++
because many collections override it with more
efficient versions.
Since TraversableOnce
has no ++
method, we have to implement that
directly, but Traversable
and down can use the overload.
the element type of the returned collection.
the class of the returned collection. Where possible, That
is
the same class as the current collection class Repr
, but this
depends on the element type B
being admissible for that class,
which means that an implicit instance of type CanBuildFrom[Repr, B, That]
is found.
the traversable to append.
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
a new collection of type That
which contains all elements
of this mutable indexed sequence followed by all elements of that
.
[use case] As with ++
, returns a new collection containing the elements from the left operand followed by the
elements from the right operand.
As with ++
, returns a new collection containing the elements from the left operand followed by the
elements from the right operand.
It differs from ++
in that the right operand determines the type of
the resulting collection rather than the left one.
Mnemonic: the COLon is on the side of the new COLlection type.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = LinkedList(2) y: scala.collection.mutable.LinkedList[Int] = LinkedList(2) scala> val z = x ++: y z: scala.collection.mutable.LinkedList[Int] = LinkedList(1, 2)
the element type of the returned collection.
the traversable to append.
a new array which contains all elements of this array
followed by all elements of that
.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Note: /:
is alternate syntax for foldLeft
; z /: xs
is the same as
xs foldLeft z
.
Examples:
Note that the folding function used to compute b is equivalent to that used to compute c.
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = (5 /: a)(_+_) b: Int = 15 scala> val c = (5 /: a)((x,y) => x + y) c: Int = 15
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right with the start value z
on the left:
op(...op(op(z, x_1), x_2), ..., x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Note: /:
is alternate syntax for foldLeft
; z /: xs
is the same as
xs foldLeft z
.
Examples:
Note that the folding function used to compute b is equivalent to that used to compute c.
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = (5 /: a)(_+_) b: Int = 15 scala> val c = (5 /: a)((x,y) => x + y) c: Int = 15
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right with the start value z
on the left:
op(...op(op(z, x_1), x_2), ..., x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Note: /:
is alternate syntax for foldLeft
; z /: xs
is the same as
xs foldLeft z
.
Examples:
Note that the folding function used to compute b is equivalent to that used to compute c.
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = (5 /: a)(_+_) b: Int = 15 scala> val c = (5 /: a)((x,y) => x + y) c: Int = 15
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right with the start value z
on the left:
op(...op(op(z, x_1), x_2), ..., x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Note: /:
is alternate syntax for foldLeft
; z /: xs
is the same as
xs foldLeft z
.
Examples:
Note that the folding function used to compute b is equivalent to that used to compute c.
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = (5 /: a)(_+_) b: Int = 15 scala> val c = (5 /: a)((x,y) => x + y) c: Int = 15
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right with the start value z
on the left:
op(...op(op(z, x_1), x_2), ..., x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Note: /:
is alternate syntax for foldLeft
; z /: xs
is the same as
xs foldLeft z
.
Examples:
Note that the folding function used to compute b is equivalent to that used to compute c.
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = (5 /: a)(_+_) b: Int = 15 scala> val c = (5 /: a)((x,y) => x + y) c: Int = 15
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right with the start value z
on the left:
op(...op(op(z, x_1), x_2), ..., x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Note: /:
is alternate syntax for foldLeft
; z /: xs
is the same as
xs foldLeft z
.
Examples:
Note that the folding function used to compute b is equivalent to that used to compute c.
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = (5 /: a)(_+_) b: Int = 15 scala> val c = (5 /: a)((x,y) => x + y) c: Int = 15
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right with the start value z
on the left:
op(...op(op(z, x_1), x_2), ..., x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Note: /:
is alternate syntax for foldLeft
; z /: xs
is the same as
xs foldLeft z
.
Examples:
Note that the folding function used to compute b is equivalent to that used to compute c.
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = (5 /: a)(_+_) b: Int = 15 scala> val c = (5 /: a)((x,y) => x + y) c: Int = 15
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right with the start value z
on the left:
op(...op(op(z, x_1), x_2), ..., x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Note: /:
is alternate syntax for foldLeft
; z /: xs
is the same as
xs foldLeft z
.
Examples:
Note that the folding function used to compute b is equivalent to that used to compute c.
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = (5 /: a)(_+_) b: Int = 15 scala> val c = (5 /: a)((x,y) => x + y) c: Int = 15
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right with the start value z
on the left:
op(...op(op(z, x_1), x_2), ..., x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Note: /:
is alternate syntax for foldLeft
; z /: xs
is the same as
xs foldLeft z
.
Examples:
Note that the folding function used to compute b is equivalent to that used to compute c.
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = (5 /: a)(_+_) b: Int = 15 scala> val c = (5 /: a)((x,y) => x + y) c: Int = 15
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right with the start value z
on the left:
op(...op(op(z, x_1), x_2), ..., x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Note: :\
is alternate syntax for foldRight
; xs :\ z
is the same as
xs foldRight z
.
Examples:
Note that the folding function used to compute b is equivalent to that used to compute c.
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = (a :\ 5)(_+_) b: Int = 15 scala> val c = (a :\ 5)((x,y) => x + y) c: Int = 15
the result type of the binary operator.
the start value
the binary operator
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left with the start value z
on the right:
op(x_1, op(x_2, ... op(x_n, z)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Note: :\
is alternate syntax for foldRight
; xs :\ z
is the same as
xs foldRight z
.
Examples:
Note that the folding function used to compute b is equivalent to that used to compute c.
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = (a :\ 5)(_+_) b: Int = 15 scala> val c = (a :\ 5)((x,y) => x + y) c: Int = 15
the result type of the binary operator.
the start value
the binary operator
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left with the start value z
on the right:
op(x_1, op(x_2, ... op(x_n, z)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Note: :\
is alternate syntax for foldRight
; xs :\ z
is the same as
xs foldRight z
.
Examples:
Note that the folding function used to compute b is equivalent to that used to compute c.
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = (a :\ 5)(_+_) b: Int = 15 scala> val c = (a :\ 5)((x,y) => x + y) c: Int = 15
the result type of the binary operator.
the start value
the binary operator
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left with the start value z
on the right:
op(x_1, op(x_2, ... op(x_n, z)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Note: :\
is alternate syntax for foldRight
; xs :\ z
is the same as
xs foldRight z
.
Examples:
Note that the folding function used to compute b is equivalent to that used to compute c.
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = (a :\ 5)(_+_) b: Int = 15 scala> val c = (a :\ 5)((x,y) => x + y) c: Int = 15
the result type of the binary operator.
the start value
the binary operator
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left with the start value z
on the right:
op(x_1, op(x_2, ... op(x_n, z)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Note: :\
is alternate syntax for foldRight
; xs :\ z
is the same as
xs foldRight z
.
Examples:
Note that the folding function used to compute b is equivalent to that used to compute c.
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = (a :\ 5)(_+_) b: Int = 15 scala> val c = (a :\ 5)((x,y) => x + y) c: Int = 15
the result type of the binary operator.
the start value
the binary operator
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left with the start value z
on the right:
op(x_1, op(x_2, ... op(x_n, z)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Note: :\
is alternate syntax for foldRight
; xs :\ z
is the same as
xs foldRight z
.
Examples:
Note that the folding function used to compute b is equivalent to that used to compute c.
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = (a :\ 5)(_+_) b: Int = 15 scala> val c = (a :\ 5)((x,y) => x + y) c: Int = 15
the result type of the binary operator.
the start value
the binary operator
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left with the start value z
on the right:
op(x_1, op(x_2, ... op(x_n, z)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Note: :\
is alternate syntax for foldRight
; xs :\ z
is the same as
xs foldRight z
.
Examples:
Note that the folding function used to compute b is equivalent to that used to compute c.
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = (a :\ 5)(_+_) b: Int = 15 scala> val c = (a :\ 5)((x,y) => x + y) c: Int = 15
the result type of the binary operator.
the start value
the binary operator
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left with the start value z
on the right:
op(x_1, op(x_2, ... op(x_n, z)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Note: :\
is alternate syntax for foldRight
; xs :\ z
is the same as
xs foldRight z
.
Examples:
Note that the folding function used to compute b is equivalent to that used to compute c.
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = (a :\ 5)(_+_) b: Int = 15 scala> val c = (a :\ 5)((x,y) => x + y) c: Int = 15
the result type of the binary operator.
the start value
the binary operator
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left with the start value z
on the right:
op(x_1, op(x_2, ... op(x_n, z)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Note: :\
is alternate syntax for foldRight
; xs :\ z
is the same as
xs foldRight z
.
Examples:
Note that the folding function used to compute b is equivalent to that used to compute c.
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = (a :\ 5)(_+_) b: Int = 15 scala> val c = (a :\ 5)((x,y) => x + y) c: Int = 15
the result type of the binary operator.
the start value
the binary operator
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left with the start value z
on the right:
op(x_1, op(x_2, ... op(x_n, z)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
The expression x == that
is equivalent to if (x eq null) that eq null else x.equals(that)
.
The expression x == that
is equivalent to if (x eq null) that eq null else x.equals(that)
.
the object to compare against this object for equality.
true
if the receiver object is equivalent to the argument; false
otherwise.
Aggregates the results of applying an operator to subsequent elements.
Aggregates the results of applying an operator to subsequent elements.
This is a more general form of fold
and reduce
. It has similar
semantics, but does not require the result to be a supertype of the
element type. It traverses the elements in different partitions
sequentially, using seqop
to update the result, and then applies
combop
to results from different partitions. The implementation of
this operation may operate on an arbitrary number of collection
partitions, so combop
may be invoked an arbitrary number of times.
For example, one might want to process some elements and then produce
a Set
. In this case, seqop
would process an element and append it
to the list, while combop
would concatenate two lists from different
partitions together. The initial value z
would be an empty set.
pc.aggregate(Set[Int]())(_ += process(_), _ ++ _)
Another example is calculating geometric mean from a collection of doubles (one would typically require big doubles for this).
the type of accumulated results
the initial value for the accumulated result of the partition - this
will typically be the neutral element for the seqop
operator (e.g.
Nil
for list concatenation or 0
for summation) and may be evaluated
more than once
an operator used to accumulate results within a partition
an associative operator used to combine results from different partitions
Aggregates the results of applying an operator to subsequent elements.
Aggregates the results of applying an operator to subsequent elements.
This is a more general form of fold
and reduce
. It has similar
semantics, but does not require the result to be a supertype of the
element type. It traverses the elements in different partitions
sequentially, using seqop
to update the result, and then applies
combop
to results from different partitions. The implementation of
this operation may operate on an arbitrary number of collection
partitions, so combop
may be invoked an arbitrary number of times.
For example, one might want to process some elements and then produce
a Set
. In this case, seqop
would process an element and append it
to the list, while combop
would concatenate two lists from different
partitions together. The initial value z
would be an empty set.
pc.aggregate(Set[Int]())(_ += process(_), _ ++ _)
Another example is calculating geometric mean from a collection of doubles (one would typically require big doubles for this).
the type of accumulated results
the initial value for the accumulated result of the partition - this
will typically be the neutral element for the seqop
operator (e.g.
Nil
for list concatenation or 0
for summation) and may be evaluated
more than once
an operator used to accumulate results within a partition
an associative operator used to combine results from different partitions
Aggregates the results of applying an operator to subsequent elements.
Aggregates the results of applying an operator to subsequent elements.
This is a more general form of fold
and reduce
. It has similar
semantics, but does not require the result to be a supertype of the
element type. It traverses the elements in different partitions
sequentially, using seqop
to update the result, and then applies
combop
to results from different partitions. The implementation of
this operation may operate on an arbitrary number of collection
partitions, so combop
may be invoked an arbitrary number of times.
For example, one might want to process some elements and then produce
a Set
. In this case, seqop
would process an element and append it
to the list, while combop
would concatenate two lists from different
partitions together. The initial value z
would be an empty set.
pc.aggregate(Set[Int]())(_ += process(_), _ ++ _)
Another example is calculating geometric mean from a collection of doubles (one would typically require big doubles for this).
the type of accumulated results
the initial value for the accumulated result of the partition - this
will typically be the neutral element for the seqop
operator (e.g.
Nil
for list concatenation or 0
for summation) and may be evaluated
more than once
an operator used to accumulate results within a partition
an associative operator used to combine results from different partitions
Aggregates the results of applying an operator to subsequent elements.
Aggregates the results of applying an operator to subsequent elements.
This is a more general form of fold
and reduce
. It has similar
semantics, but does not require the result to be a supertype of the
element type. It traverses the elements in different partitions
sequentially, using seqop
to update the result, and then applies
combop
to results from different partitions. The implementation of
this operation may operate on an arbitrary number of collection
partitions, so combop
may be invoked an arbitrary number of times.
For example, one might want to process some elements and then produce
a Set
. In this case, seqop
would process an element and append it
to the list, while combop
would concatenate two lists from different
partitions together. The initial value z
would be an empty set.
pc.aggregate(Set[Int]())(_ += process(_), _ ++ _)
Another example is calculating geometric mean from a collection of doubles (one would typically require big doubles for this).
the type of accumulated results
the initial value for the accumulated result of the partition - this
will typically be the neutral element for the seqop
operator (e.g.
Nil
for list concatenation or 0
for summation) and may be evaluated
more than once
an operator used to accumulate results within a partition
an associative operator used to combine results from different partitions
Aggregates the results of applying an operator to subsequent elements.
Aggregates the results of applying an operator to subsequent elements.
This is a more general form of fold
and reduce
. It has similar
semantics, but does not require the result to be a supertype of the
element type. It traverses the elements in different partitions
sequentially, using seqop
to update the result, and then applies
combop
to results from different partitions. The implementation of
this operation may operate on an arbitrary number of collection
partitions, so combop
may be invoked an arbitrary number of times.
For example, one might want to process some elements and then produce
a Set
. In this case, seqop
would process an element and append it
to the list, while combop
would concatenate two lists from different
partitions together. The initial value z
would be an empty set.
pc.aggregate(Set[Int]())(_ += process(_), _ ++ _)
Another example is calculating geometric mean from a collection of doubles (one would typically require big doubles for this).
the type of accumulated results
the initial value for the accumulated result of the partition - this
will typically be the neutral element for the seqop
operator (e.g.
Nil
for list concatenation or 0
for summation) and may be evaluated
more than once
an operator used to accumulate results within a partition
an associative operator used to combine results from different partitions
Aggregates the results of applying an operator to subsequent elements.
Aggregates the results of applying an operator to subsequent elements.
This is a more general form of fold
and reduce
. It has similar
semantics, but does not require the result to be a supertype of the
element type. It traverses the elements in different partitions
sequentially, using seqop
to update the result, and then applies
combop
to results from different partitions. The implementation of
this operation may operate on an arbitrary number of collection
partitions, so combop
may be invoked an arbitrary number of times.
For example, one might want to process some elements and then produce
a Set
. In this case, seqop
would process an element and append it
to the list, while combop
would concatenate two lists from different
partitions together. The initial value z
would be an empty set.
pc.aggregate(Set[Int]())(_ += process(_), _ ++ _)
Another example is calculating geometric mean from a collection of doubles (one would typically require big doubles for this).
the type of accumulated results
the initial value for the accumulated result of the partition - this
will typically be the neutral element for the seqop
operator (e.g.
Nil
for list concatenation or 0
for summation) and may be evaluated
more than once
an operator used to accumulate results within a partition
an associative operator used to combine results from different partitions
Aggregates the results of applying an operator to subsequent elements.
Aggregates the results of applying an operator to subsequent elements.
This is a more general form of fold
and reduce
. It has similar
semantics, but does not require the result to be a supertype of the
element type. It traverses the elements in different partitions
sequentially, using seqop
to update the result, and then applies
combop
to results from different partitions. The implementation of
this operation may operate on an arbitrary number of collection
partitions, so combop
may be invoked an arbitrary number of times.
For example, one might want to process some elements and then produce
a Set
. In this case, seqop
would process an element and append it
to the list, while combop
would concatenate two lists from different
partitions together. The initial value z
would be an empty set.
pc.aggregate(Set[Int]())(_ += process(_), _ ++ _)
Another example is calculating geometric mean from a collection of doubles (one would typically require big doubles for this).
the type of accumulated results
the initial value for the accumulated result of the partition - this
will typically be the neutral element for the seqop
operator (e.g.
Nil
for list concatenation or 0
for summation) and may be evaluated
more than once
an operator used to accumulate results within a partition
an associative operator used to combine results from different partitions
Aggregates the results of applying an operator to subsequent elements.
Aggregates the results of applying an operator to subsequent elements.
This is a more general form of fold
and reduce
. It has similar
semantics, but does not require the result to be a supertype of the
element type. It traverses the elements in different partitions
sequentially, using seqop
to update the result, and then applies
combop
to results from different partitions. The implementation of
this operation may operate on an arbitrary number of collection
partitions, so combop
may be invoked an arbitrary number of times.
For example, one might want to process some elements and then produce
a Set
. In this case, seqop
would process an element and append it
to the list, while combop
would concatenate two lists from different
partitions together. The initial value z
would be an empty set.
pc.aggregate(Set[Int]())(_ += process(_), _ ++ _)
Another example is calculating geometric mean from a collection of doubles (one would typically require big doubles for this).
the type of accumulated results
the initial value for the accumulated result of the partition - this
will typically be the neutral element for the seqop
operator (e.g.
Nil
for list concatenation or 0
for summation) and may be evaluated
more than once
an operator used to accumulate results within a partition
an associative operator used to combine results from different partitions
Aggregates the results of applying an operator to subsequent elements.
Aggregates the results of applying an operator to subsequent elements.
This is a more general form of fold
and reduce
. It has similar
semantics, but does not require the result to be a supertype of the
element type. It traverses the elements in different partitions
sequentially, using seqop
to update the result, and then applies
combop
to results from different partitions. The implementation of
this operation may operate on an arbitrary number of collection
partitions, so combop
may be invoked an arbitrary number of times.
For example, one might want to process some elements and then produce
a Set
. In this case, seqop
would process an element and append it
to the list, while combop
would concatenate two lists from different
partitions together. The initial value z
would be an empty set.
pc.aggregate(Set[Int]())(_ += process(_), _ ++ _)
Another example is calculating geometric mean from a collection of doubles (one would typically require big doubles for this).
the type of accumulated results
the initial value for the accumulated result of the partition - this
will typically be the neutral element for the seqop
operator (e.g.
Nil
for list concatenation or 0
for summation) and may be evaluated
more than once
an operator used to accumulate results within a partition
an associative operator used to combine results from different partitions
The element at given index.
The element at given index.
Indices start at 0
; xs.apply(0)
is the first element of array xs
.
Note the indexing syntax xs(i)
is a shorthand for xs.apply(i)
.
the index
the element at the given index
ArrayIndexOutOfBoundsException
if i < 0
or length <= i
Cast the receiver object to be of type T0
.
Cast the receiver object to be of type T0
.
Note that the success of a cast at runtime is modulo Scala's erasure semantics.
Therefore the expression 1.asInstanceOf[String]
will throw a ClassCastException
at
runtime, while the expression List(1).asInstanceOf[List[String]]
will not.
In the latter example, because the type argument is erased as part of compilation it is
not possible to check whether the contents of the list are of the requested type.
the receiver object.
ClassCastException
if the receiver object is not an instance of the erasure of type T0
.
Clone the Array.
[use case] Builds a new collection by applying a partial function to all elements of this array on which the function is defined.
Builds a new collection by applying a partial function to all elements of this array on which the function is defined.
the element type of the returned collection.
the partial function which filters and maps the array.
a new array resulting from applying the given partial function
pf
to each element on which it is defined and collecting the results.
The order of the elements is preserved.
[use case] Builds a new collection by applying a partial function to all elements of this array on which the function is defined.
Builds a new collection by applying a partial function to all elements of this array on which the function is defined.
the element type of the returned collection.
the partial function which filters and maps the array.
a new array resulting from applying the given partial function
pf
to each element on which it is defined and collecting the results.
The order of the elements is preserved.
[use case] Builds a new collection by applying a partial function to all elements of this array on which the function is defined.
Builds a new collection by applying a partial function to all elements of this array on which the function is defined.
the element type of the returned collection.
the partial function which filters and maps the array.
a new array resulting from applying the given partial function
pf
to each element on which it is defined and collecting the results.
The order of the elements is preserved.
[use case] Builds a new collection by applying a partial function to all elements of this array on which the function is defined.
Builds a new collection by applying a partial function to all elements of this array on which the function is defined.
the element type of the returned collection.
the partial function which filters and maps the array.
a new array resulting from applying the given partial function
pf
to each element on which it is defined and collecting the results.
The order of the elements is preserved.
[use case] Builds a new collection by applying a partial function to all elements of this array on which the function is defined.
Builds a new collection by applying a partial function to all elements of this array on which the function is defined.
the element type of the returned collection.
the partial function which filters and maps the array.
a new array resulting from applying the given partial function
pf
to each element on which it is defined and collecting the results.
The order of the elements is preserved.
[use case] Builds a new collection by applying a partial function to all elements of this array on which the function is defined.
Builds a new collection by applying a partial function to all elements of this array on which the function is defined.
the element type of the returned collection.
the partial function which filters and maps the array.
a new array resulting from applying the given partial function
pf
to each element on which it is defined and collecting the results.
The order of the elements is preserved.
[use case] Builds a new collection by applying a partial function to all elements of this array on which the function is defined.
Builds a new collection by applying a partial function to all elements of this array on which the function is defined.
the element type of the returned collection.
the partial function which filters and maps the array.
a new array resulting from applying the given partial function
pf
to each element on which it is defined and collecting the results.
The order of the elements is preserved.
[use case] Builds a new collection by applying a partial function to all elements of this array on which the function is defined.
Builds a new collection by applying a partial function to all elements of this array on which the function is defined.
the element type of the returned collection.
the partial function which filters and maps the array.
a new array resulting from applying the given partial function
pf
to each element on which it is defined and collecting the results.
The order of the elements is preserved.
[use case] Builds a new collection by applying a partial function to all elements of this array on which the function is defined.
Builds a new collection by applying a partial function to all elements of this array on which the function is defined.
the element type of the returned collection.
the partial function which filters and maps the array.
a new array resulting from applying the given partial function
pf
to each element on which it is defined and collecting the results.
The order of the elements is preserved.
[use case] Builds a new collection by applying a partial function to all elements of this array on which the function is defined.
Builds a new collection by applying a partial function to all elements of this array on which the function is defined.
the element type of the returned collection.
the partial function which filters and maps the array.
a new array resulting from applying the given partial function
pf
to each element on which it is defined and collecting the results.
The order of the elements is preserved.
[use case] Builds a new collection by applying a partial function to all elements of this array on which the function is defined.
Builds a new collection by applying a partial function to all elements of this array on which the function is defined.
the element type of the returned collection.
the partial function which filters and maps the array.
a new array resulting from applying the given partial function
pf
to each element on which it is defined and collecting the results.
The order of the elements is preserved.
Finds the first element of the mutable indexed sequence for which the given partial function is defined, and applies the partial function to it.
Finds the first element of the mutable indexed sequence for which the given partial function is defined, and applies the partial function to it.
the partial function
an option value containing pf applied to the first
value for which it is defined, or None
if none exists.
Seq("a", 1, 5L).collectFirst({ case x: Int => x*10 }) = Some(10)
Finds the first element of the mutable indexed sequence for which the given partial function is defined, and applies the partial function to it.
Finds the first element of the mutable indexed sequence for which the given partial function is defined, and applies the partial function to it.
the partial function
an option value containing pf applied to the first
value for which it is defined, or None
if none exists.
Seq("a", 1, 5L).collectFirst({ case x: Int => x*10 }) = Some(10)
Finds the first element of the mutable indexed sequence for which the given partial function is defined, and applies the partial function to it.
Finds the first element of the mutable indexed sequence for which the given partial function is defined, and applies the partial function to it.
the partial function
an option value containing pf applied to the first
value for which it is defined, or None
if none exists.
Seq("a", 1, 5L).collectFirst({ case x: Int => x*10 }) = Some(10)
Finds the first element of the mutable indexed sequence for which the given partial function is defined, and applies the partial function to it.
Finds the first element of the mutable indexed sequence for which the given partial function is defined, and applies the partial function to it.
the partial function
an option value containing pf applied to the first
value for which it is defined, or None
if none exists.
Seq("a", 1, 5L).collectFirst({ case x: Int => x*10 }) = Some(10)
Finds the first element of the mutable indexed sequence for which the given partial function is defined, and applies the partial function to it.
Finds the first element of the mutable indexed sequence for which the given partial function is defined, and applies the partial function to it.
the partial function
an option value containing pf applied to the first
value for which it is defined, or None
if none exists.
Seq("a", 1, 5L).collectFirst({ case x: Int => x*10 }) = Some(10)
Finds the first element of the mutable indexed sequence for which the given partial function is defined, and applies the partial function to it.
Finds the first element of the mutable indexed sequence for which the given partial function is defined, and applies the partial function to it.
the partial function
an option value containing pf applied to the first
value for which it is defined, or None
if none exists.
Seq("a", 1, 5L).collectFirst({ case x: Int => x*10 }) = Some(10)
Finds the first element of the mutable indexed sequence for which the given partial function is defined, and applies the partial function to it.
Finds the first element of the mutable indexed sequence for which the given partial function is defined, and applies the partial function to it.
the partial function
an option value containing pf applied to the first
value for which it is defined, or None
if none exists.
Seq("a", 1, 5L).collectFirst({ case x: Int => x*10 }) = Some(10)
Finds the first element of the mutable indexed sequence for which the given partial function is defined, and applies the partial function to it.
Finds the first element of the mutable indexed sequence for which the given partial function is defined, and applies the partial function to it.
the partial function
an option value containing pf applied to the first
value for which it is defined, or None
if none exists.
Seq("a", 1, 5L).collectFirst({ case x: Int => x*10 }) = Some(10)
Finds the first element of the mutable indexed sequence for which the given partial function is defined, and applies the partial function to it.
Finds the first element of the mutable indexed sequence for which the given partial function is defined, and applies the partial function to it.
the partial function
an option value containing pf applied to the first
value for which it is defined, or None
if none exists.
Seq("a", 1, 5L).collectFirst({ case x: Int => x*10 }) = Some(10)
Tests whether this mutable indexed sequence contains a given value as an element.
Tests whether this mutable indexed sequence contains a given value as an element.
the element to test.
true
if this mutable indexed sequence has an element that is equal (as
determined by ==
) to elem
, false
otherwise.
Tests whether this mutable indexed sequence contains a given value as an element.
Tests whether this mutable indexed sequence contains a given value as an element.
the element to test.
true
if this mutable indexed sequence has an element that is equal (as
determined by ==
) to elem
, false
otherwise.
Tests whether this mutable indexed sequence contains a given value as an element.
Tests whether this mutable indexed sequence contains a given value as an element.
the element to test.
true
if this mutable indexed sequence has an element that is equal (as
determined by ==
) to elem
, false
otherwise.
Tests whether this mutable indexed sequence contains a given value as an element.
Tests whether this mutable indexed sequence contains a given value as an element.
the element to test.
true
if this mutable indexed sequence has an element that is equal (as
determined by ==
) to elem
, false
otherwise.
Tests whether this mutable indexed sequence contains a given value as an element.
Tests whether this mutable indexed sequence contains a given value as an element.
the element to test.
true
if this mutable indexed sequence has an element that is equal (as
determined by ==
) to elem
, false
otherwise.
Tests whether this mutable indexed sequence contains a given value as an element.
Tests whether this mutable indexed sequence contains a given value as an element.
the element to test.
true
if this mutable indexed sequence has an element that is equal (as
determined by ==
) to elem
, false
otherwise.
Tests whether this mutable indexed sequence contains a given value as an element.
Tests whether this mutable indexed sequence contains a given value as an element.
the element to test.
true
if this mutable indexed sequence has an element that is equal (as
determined by ==
) to elem
, false
otherwise.
Tests whether this mutable indexed sequence contains a given value as an element.
Tests whether this mutable indexed sequence contains a given value as an element.
the element to test.
true
if this mutable indexed sequence has an element that is equal (as
determined by ==
) to elem
, false
otherwise.
Tests whether this mutable indexed sequence contains a given value as an element.
Tests whether this mutable indexed sequence contains a given value as an element.
the element to test.
true
if this mutable indexed sequence has an element that is equal (as
determined by ==
) to elem
, false
otherwise.
Tests whether this mutable indexed sequence contains a given value as an element.
Tests whether this mutable indexed sequence contains a given value as an element.
the element to test.
true
if this mutable indexed sequence has an element that is equal (as
determined by ==
) to elem
, false
otherwise.
Tests whether this mutable indexed sequence contains a given value as an element.
Tests whether this mutable indexed sequence contains a given value as an element.
the element to test.
true
if this mutable indexed sequence has an element that is equal (as
determined by ==
) to elem
, false
otherwise.
Copies all elements of this mutable indexed sequence to a buffer.
Copies all elements of this mutable indexed sequence to a buffer.
The buffer to which elements are copied.
Copies all elements of this mutable indexed sequence to a buffer.
Copies all elements of this mutable indexed sequence to a buffer.
The buffer to which elements are copied.
Copies all elements of this mutable indexed sequence to a buffer.
Copies all elements of this mutable indexed sequence to a buffer.
The buffer to which elements are copied.
Copies all elements of this mutable indexed sequence to a buffer.
Copies all elements of this mutable indexed sequence to a buffer.
The buffer to which elements are copied.
Copies all elements of this mutable indexed sequence to a buffer.
Copies all elements of this mutable indexed sequence to a buffer.
The buffer to which elements are copied.
Copies all elements of this mutable indexed sequence to a buffer.
Copies all elements of this mutable indexed sequence to a buffer.
The buffer to which elements are copied.
Copies all elements of this mutable indexed sequence to a buffer.
Copies all elements of this mutable indexed sequence to a buffer.
The buffer to which elements are copied.
Copies all elements of this mutable indexed sequence to a buffer.
Copies all elements of this mutable indexed sequence to a buffer.
The buffer to which elements are copied.
Copies all elements of this mutable indexed sequence to a buffer.
Copies all elements of this mutable indexed sequence to a buffer.
The buffer to which elements are copied.
Copies all elements of this mutable indexed sequence to a buffer.
Copies all elements of this mutable indexed sequence to a buffer.
The buffer to which elements are copied.
Copies all elements of this mutable indexed sequence to a buffer.
Copies all elements of this mutable indexed sequence to a buffer.
The buffer to which elements are copied.
Tests whether every element of this mutable indexed sequence relates to the corresponding element of another sequence by satisfying a test predicate.
Tests whether every element of this mutable indexed sequence relates to the corresponding element of another sequence by satisfying a test predicate.
the type of the elements of that
the other sequence
the test predicate, which relates elements from both sequences
true
if both sequences have the same length and
p(x, y)
is true
for all corresponding elements x
of this mutable indexed sequence
and y
of that
, otherwise false
.
Tests whether every element of this mutable indexed sequence relates to the corresponding element of another sequence by satisfying a test predicate.
Tests whether every element of this mutable indexed sequence relates to the corresponding element of another sequence by satisfying a test predicate.
the type of the elements of that
the other sequence
the test predicate, which relates elements from both sequences
true
if both sequences have the same length and
p(x, y)
is true
for all corresponding elements x
of this mutable indexed sequence
and y
of that
, otherwise false
.
Tests whether every element of this mutable indexed sequence relates to the corresponding element of another sequence by satisfying a test predicate.
Tests whether every element of this mutable indexed sequence relates to the corresponding element of another sequence by satisfying a test predicate.
the type of the elements of that
the other sequence
the test predicate, which relates elements from both sequences
true
if both sequences have the same length and
p(x, y)
is true
for all corresponding elements x
of this mutable indexed sequence
and y
of that
, otherwise false
.
Tests whether every element of this mutable indexed sequence relates to the corresponding element of another sequence by satisfying a test predicate.
Tests whether every element of this mutable indexed sequence relates to the corresponding element of another sequence by satisfying a test predicate.
the type of the elements of that
the other sequence
the test predicate, which relates elements from both sequences
true
if both sequences have the same length and
p(x, y)
is true
for all corresponding elements x
of this mutable indexed sequence
and y
of that
, otherwise false
.
Tests whether every element of this mutable indexed sequence relates to the corresponding element of another sequence by satisfying a test predicate.
Tests whether every element of this mutable indexed sequence relates to the corresponding element of another sequence by satisfying a test predicate.
the type of the elements of that
the other sequence
the test predicate, which relates elements from both sequences
true
if both sequences have the same length and
p(x, y)
is true
for all corresponding elements x
of this mutable indexed sequence
and y
of that
, otherwise false
.
Tests whether every element of this mutable indexed sequence relates to the corresponding element of another sequence by satisfying a test predicate.
Tests whether every element of this mutable indexed sequence relates to the corresponding element of another sequence by satisfying a test predicate.
the type of the elements of that
the other sequence
the test predicate, which relates elements from both sequences
true
if both sequences have the same length and
p(x, y)
is true
for all corresponding elements x
of this mutable indexed sequence
and y
of that
, otherwise false
.
Tests whether every element of this mutable indexed sequence relates to the corresponding element of another sequence by satisfying a test predicate.
Tests whether every element of this mutable indexed sequence relates to the corresponding element of another sequence by satisfying a test predicate.
the type of the elements of that
the other sequence
the test predicate, which relates elements from both sequences
true
if both sequences have the same length and
p(x, y)
is true
for all corresponding elements x
of this mutable indexed sequence
and y
of that
, otherwise false
.
Tests whether every element of this mutable indexed sequence relates to the corresponding element of another sequence by satisfying a test predicate.
Tests whether every element of this mutable indexed sequence relates to the corresponding element of another sequence by satisfying a test predicate.
the type of the elements of that
the other sequence
the test predicate, which relates elements from both sequences
true
if both sequences have the same length and
p(x, y)
is true
for all corresponding elements x
of this mutable indexed sequence
and y
of that
, otherwise false
.
Tests whether every element of this mutable indexed sequence relates to the corresponding element of another sequence by satisfying a test predicate.
Tests whether every element of this mutable indexed sequence relates to the corresponding element of another sequence by satisfying a test predicate.
the type of the elements of that
the other sequence
the test predicate, which relates elements from both sequences
true
if both sequences have the same length and
p(x, y)
is true
for all corresponding elements x
of this mutable indexed sequence
and y
of that
, otherwise false
.
Counts the number of elements in the mutable indexed sequence which satisfy a predicate.
Counts the number of elements in the mutable indexed sequence which satisfy a predicate.
the predicate used to test elements.
the number of elements satisfying the predicate p
.
Counts the number of elements in the mutable indexed sequence which satisfy a predicate.
Counts the number of elements in the mutable indexed sequence which satisfy a predicate.
the predicate used to test elements.
the number of elements satisfying the predicate p
.
Counts the number of elements in the mutable indexed sequence which satisfy a predicate.
Counts the number of elements in the mutable indexed sequence which satisfy a predicate.
the predicate used to test elements.
the number of elements satisfying the predicate p
.
Counts the number of elements in the mutable indexed sequence which satisfy a predicate.
Counts the number of elements in the mutable indexed sequence which satisfy a predicate.
the predicate used to test elements.
the number of elements satisfying the predicate p
.
Counts the number of elements in the mutable indexed sequence which satisfy a predicate.
Counts the number of elements in the mutable indexed sequence which satisfy a predicate.
the predicate used to test elements.
the number of elements satisfying the predicate p
.
Counts the number of elements in the mutable indexed sequence which satisfy a predicate.
Counts the number of elements in the mutable indexed sequence which satisfy a predicate.
the predicate used to test elements.
the number of elements satisfying the predicate p
.
Counts the number of elements in the mutable indexed sequence which satisfy a predicate.
Counts the number of elements in the mutable indexed sequence which satisfy a predicate.
the predicate used to test elements.
the number of elements satisfying the predicate p
.
Counts the number of elements in the mutable indexed sequence which satisfy a predicate.
Counts the number of elements in the mutable indexed sequence which satisfy a predicate.
the predicate used to test elements.
the number of elements satisfying the predicate p
.
Counts the number of elements in the mutable indexed sequence which satisfy a predicate.
Counts the number of elements in the mutable indexed sequence which satisfy a predicate.
the predicate used to test elements.
the number of elements satisfying the predicate p
.
[use case] Computes the multiset difference between this array and another sequence.
Computes the multiset difference between this array and another sequence.
the sequence of elements to remove
a new array which contains all elements of this array
except some of occurrences of elements that also appear in that
.
If an element value x
appears
n times in that
, then the first n occurrences of x
will not form
part of the result, but any following occurrences will.
[use case] Computes the multiset difference between this array and another sequence.
Computes the multiset difference between this array and another sequence.
the sequence of elements to remove
a new array which contains all elements of this array
except some of occurrences of elements that also appear in that
.
If an element value x
appears
n times in that
, then the first n occurrences of x
will not form
part of the result, but any following occurrences will.
[use case] Computes the multiset difference between this array and another sequence.
Computes the multiset difference between this array and another sequence.
the sequence of elements to remove
a new array which contains all elements of this array
except some of occurrences of elements that also appear in that
.
If an element value x
appears
n times in that
, then the first n occurrences of x
will not form
part of the result, but any following occurrences will.
[use case] Computes the multiset difference between this array and another sequence.
Computes the multiset difference between this array and another sequence.
the sequence of elements to remove
a new array which contains all elements of this array
except some of occurrences of elements that also appear in that
.
If an element value x
appears
n times in that
, then the first n occurrences of x
will not form
part of the result, but any following occurrences will.
[use case] Computes the multiset difference between this array and another sequence.
Computes the multiset difference between this array and another sequence.
the sequence of elements to remove
a new array which contains all elements of this array
except some of occurrences of elements that also appear in that
.
If an element value x
appears
n times in that
, then the first n occurrences of x
will not form
part of the result, but any following occurrences will.
[use case] Computes the multiset difference between this array and another sequence.
Computes the multiset difference between this array and another sequence.
the sequence of elements to remove
a new array which contains all elements of this array
except some of occurrences of elements that also appear in that
.
If an element value x
appears
n times in that
, then the first n occurrences of x
will not form
part of the result, but any following occurrences will.
[use case] Computes the multiset difference between this array and another sequence.
Computes the multiset difference between this array and another sequence.
the sequence of elements to remove
a new array which contains all elements of this array
except some of occurrences of elements that also appear in that
.
If an element value x
appears
n times in that
, then the first n occurrences of x
will not form
part of the result, but any following occurrences will.
[use case] Computes the multiset difference between this array and another sequence.
Computes the multiset difference between this array and another sequence.
the sequence of elements to remove
a new array which contains all elements of this array
except some of occurrences of elements that also appear in that
.
If an element value x
appears
n times in that
, then the first n occurrences of x
will not form
part of the result, but any following occurrences will.
[use case] Computes the multiset difference between this array and another sequence.
Computes the multiset difference between this array and another sequence.
the sequence of elements to remove
a new array which contains all elements of this array
except some of occurrences of elements that also appear in that
.
If an element value x
appears
n times in that
, then the first n occurrences of x
will not form
part of the result, but any following occurrences will.
Drops longest prefix of elements that satisfy a predicate.
Drops longest prefix of elements that satisfy a predicate.
the longest suffix of this mutable indexed sequence whose first element
does not satisfy the predicate p
.
Drops longest prefix of elements that satisfy a predicate.
Drops longest prefix of elements that satisfy a predicate.
the longest suffix of this mutable indexed sequence whose first element
does not satisfy the predicate p
.
Drops longest prefix of elements that satisfy a predicate.
Drops longest prefix of elements that satisfy a predicate.
the longest suffix of this mutable indexed sequence whose first element
does not satisfy the predicate p
.
Drops longest prefix of elements that satisfy a predicate.
Drops longest prefix of elements that satisfy a predicate.
the longest suffix of this mutable indexed sequence whose first element
does not satisfy the predicate p
.
Drops longest prefix of elements that satisfy a predicate.
Drops longest prefix of elements that satisfy a predicate.
the longest suffix of this mutable indexed sequence whose first element
does not satisfy the predicate p
.
Drops longest prefix of elements that satisfy a predicate.
Drops longest prefix of elements that satisfy a predicate.
the longest suffix of this mutable indexed sequence whose first element
does not satisfy the predicate p
.
Drops longest prefix of elements that satisfy a predicate.
Drops longest prefix of elements that satisfy a predicate.
the longest suffix of this mutable indexed sequence whose first element
does not satisfy the predicate p
.
Drops longest prefix of elements that satisfy a predicate.
Drops longest prefix of elements that satisfy a predicate.
the longest suffix of this mutable indexed sequence whose first element
does not satisfy the predicate p
.
Drops longest prefix of elements that satisfy a predicate.
Drops longest prefix of elements that satisfy a predicate.
the longest suffix of this mutable indexed sequence whose first element
does not satisfy the predicate p
.
Tests whether the argument (arg0
) is a reference to the receiver object (this
).
Tests whether the argument (arg0
) is a reference to the receiver object (this
).
The eq
method implements an equivalence relation on
non-null instances of AnyRef
, and has three additional properties:
x
and y
of type AnyRef
, multiple invocations of
x.eq(y)
consistently returns true
or consistently returns false
.x
of type AnyRef
, x.eq(null)
and null.eq(x)
returns false
.null.eq(null)
returns true
. When overriding the equals
or hashCode
methods, it is important to ensure that their behavior is
consistent with reference equality. Therefore, if two objects are references to each other (o1 eq o2
), they
should be equal to each other (o1 == o2
) and they should hash to the same value (o1.hashCode == o2.hashCode
).
true
if the argument is a reference to the receiver object; false
otherwise.
The equality method for reference types.
Tests whether a predicate holds for some of the elements of this mutable indexed sequence.
Tests whether a predicate holds for some of the elements of this mutable indexed sequence.
the predicate used to test elements.
false
if this mutable indexed sequence is empty, otherwise true
if the given predicate p
holds for some of the elements of this mutable indexed sequence, otherwise false
Tests whether a predicate holds for some of the elements of this mutable indexed sequence.
Tests whether a predicate holds for some of the elements of this mutable indexed sequence.
the predicate used to test elements.
false
if this mutable indexed sequence is empty, otherwise true
if the given predicate p
holds for some of the elements of this mutable indexed sequence, otherwise false
Tests whether a predicate holds for some of the elements of this mutable indexed sequence.
Tests whether a predicate holds for some of the elements of this mutable indexed sequence.
the predicate used to test elements.
false
if this mutable indexed sequence is empty, otherwise true
if the given predicate p
holds for some of the elements of this mutable indexed sequence, otherwise false
Tests whether a predicate holds for some of the elements of this mutable indexed sequence.
Tests whether a predicate holds for some of the elements of this mutable indexed sequence.
the predicate used to test elements.
false
if this mutable indexed sequence is empty, otherwise true
if the given predicate p
holds for some of the elements of this mutable indexed sequence, otherwise false
Tests whether a predicate holds for some of the elements of this mutable indexed sequence.
Tests whether a predicate holds for some of the elements of this mutable indexed sequence.
the predicate used to test elements.
false
if this mutable indexed sequence is empty, otherwise true
if the given predicate p
holds for some of the elements of this mutable indexed sequence, otherwise false
Tests whether a predicate holds for some of the elements of this mutable indexed sequence.
Tests whether a predicate holds for some of the elements of this mutable indexed sequence.
the predicate used to test elements.
false
if this mutable indexed sequence is empty, otherwise true
if the given predicate p
holds for some of the elements of this mutable indexed sequence, otherwise false
Tests whether a predicate holds for some of the elements of this mutable indexed sequence.
Tests whether a predicate holds for some of the elements of this mutable indexed sequence.
the predicate used to test elements.
false
if this mutable indexed sequence is empty, otherwise true
if the given predicate p
holds for some of the elements of this mutable indexed sequence, otherwise false
Tests whether a predicate holds for some of the elements of this mutable indexed sequence.
Tests whether a predicate holds for some of the elements of this mutable indexed sequence.
the predicate used to test elements.
false
if this mutable indexed sequence is empty, otherwise true
if the given predicate p
holds for some of the elements of this mutable indexed sequence, otherwise false
Tests whether a predicate holds for some of the elements of this mutable indexed sequence.
Tests whether a predicate holds for some of the elements of this mutable indexed sequence.
the predicate used to test elements.
false
if this mutable indexed sequence is empty, otherwise true
if the given predicate p
holds for some of the elements of this mutable indexed sequence, otherwise false
Selects all elements of this mutable indexed sequence which satisfy a predicate.
Selects all elements of this mutable indexed sequence which satisfy a predicate.
the predicate used to test elements.
a new mutable indexed sequence consisting of all elements of this mutable indexed sequence that satisfy the given
predicate p
. The order of the elements is preserved.
Selects all elements of this mutable indexed sequence which satisfy a predicate.
Selects all elements of this mutable indexed sequence which satisfy a predicate.
the predicate used to test elements.
a new mutable indexed sequence consisting of all elements of this mutable indexed sequence that satisfy the given
predicate p
. The order of the elements is preserved.
Selects all elements of this mutable indexed sequence which satisfy a predicate.
Selects all elements of this mutable indexed sequence which satisfy a predicate.
the predicate used to test elements.
a new mutable indexed sequence consisting of all elements of this mutable indexed sequence that satisfy the given
predicate p
. The order of the elements is preserved.
Selects all elements of this mutable indexed sequence which satisfy a predicate.
Selects all elements of this mutable indexed sequence which satisfy a predicate.
the predicate used to test elements.
a new mutable indexed sequence consisting of all elements of this mutable indexed sequence that satisfy the given
predicate p
. The order of the elements is preserved.
Selects all elements of this mutable indexed sequence which satisfy a predicate.
Selects all elements of this mutable indexed sequence which satisfy a predicate.
the predicate used to test elements.
a new mutable indexed sequence consisting of all elements of this mutable indexed sequence that satisfy the given
predicate p
. The order of the elements is preserved.
Selects all elements of this mutable indexed sequence which satisfy a predicate.
Selects all elements of this mutable indexed sequence which satisfy a predicate.
the predicate used to test elements.
a new mutable indexed sequence consisting of all elements of this mutable indexed sequence that satisfy the given
predicate p
. The order of the elements is preserved.
Selects all elements of this mutable indexed sequence which satisfy a predicate.
Selects all elements of this mutable indexed sequence which satisfy a predicate.
the predicate used to test elements.
a new mutable indexed sequence consisting of all elements of this mutable indexed sequence that satisfy the given
predicate p
. The order of the elements is preserved.
Selects all elements of this mutable indexed sequence which satisfy a predicate.
Selects all elements of this mutable indexed sequence which satisfy a predicate.
the predicate used to test elements.
a new mutable indexed sequence consisting of all elements of this mutable indexed sequence that satisfy the given
predicate p
. The order of the elements is preserved.
Selects all elements of this mutable indexed sequence which satisfy a predicate.
Selects all elements of this mutable indexed sequence which satisfy a predicate.
the predicate used to test elements.
a new mutable indexed sequence consisting of all elements of this mutable indexed sequence that satisfy the given
predicate p
. The order of the elements is preserved.
Selects all elements of this mutable indexed sequence which do not satisfy a predicate.
Selects all elements of this mutable indexed sequence which do not satisfy a predicate.
the predicate used to test elements.
a new mutable indexed sequence consisting of all elements of this mutable indexed sequence that do not satisfy the given
predicate p
. The order of the elements is preserved.
Selects all elements of this mutable indexed sequence which do not satisfy a predicate.
Selects all elements of this mutable indexed sequence which do not satisfy a predicate.
the predicate used to test elements.
a new mutable indexed sequence consisting of all elements of this mutable indexed sequence that do not satisfy the given
predicate p
. The order of the elements is preserved.
Selects all elements of this mutable indexed sequence which do not satisfy a predicate.
Selects all elements of this mutable indexed sequence which do not satisfy a predicate.
the predicate used to test elements.
a new mutable indexed sequence consisting of all elements of this mutable indexed sequence that do not satisfy the given
predicate p
. The order of the elements is preserved.
Selects all elements of this mutable indexed sequence which do not satisfy a predicate.
Selects all elements of this mutable indexed sequence which do not satisfy a predicate.
the predicate used to test elements.
a new mutable indexed sequence consisting of all elements of this mutable indexed sequence that do not satisfy the given
predicate p
. The order of the elements is preserved.
Selects all elements of this mutable indexed sequence which do not satisfy a predicate.
Selects all elements of this mutable indexed sequence which do not satisfy a predicate.
the predicate used to test elements.
a new mutable indexed sequence consisting of all elements of this mutable indexed sequence that do not satisfy the given
predicate p
. The order of the elements is preserved.
Selects all elements of this mutable indexed sequence which do not satisfy a predicate.
Selects all elements of this mutable indexed sequence which do not satisfy a predicate.
the predicate used to test elements.
a new mutable indexed sequence consisting of all elements of this mutable indexed sequence that do not satisfy the given
predicate p
. The order of the elements is preserved.
Selects all elements of this mutable indexed sequence which do not satisfy a predicate.
Selects all elements of this mutable indexed sequence which do not satisfy a predicate.
the predicate used to test elements.
a new mutable indexed sequence consisting of all elements of this mutable indexed sequence that do not satisfy the given
predicate p
. The order of the elements is preserved.
Selects all elements of this mutable indexed sequence which do not satisfy a predicate.
Selects all elements of this mutable indexed sequence which do not satisfy a predicate.
the predicate used to test elements.
a new mutable indexed sequence consisting of all elements of this mutable indexed sequence that do not satisfy the given
predicate p
. The order of the elements is preserved.
Selects all elements of this mutable indexed sequence which do not satisfy a predicate.
Selects all elements of this mutable indexed sequence which do not satisfy a predicate.
the predicate used to test elements.
a new mutable indexed sequence consisting of all elements of this mutable indexed sequence that do not satisfy the given
predicate p
. The order of the elements is preserved.
Called by the garbage collector on the receiver object when there are no more references to the object.
Called by the garbage collector on the receiver object when there are no more references to the object.
The details of when and if the finalize
method is invoked, as
well as the interaction between finalize
and non-local returns
and exceptions, are all platform dependent.
Finds the first element of the mutable indexed sequence satisfying a predicate, if any.
Finds the first element of the mutable indexed sequence satisfying a predicate, if any.
the predicate used to test elements.
an option value containing the first element in the mutable indexed sequence
that satisfies p
, or None
if none exists.
Finds the first element of the mutable indexed sequence satisfying a predicate, if any.
Finds the first element of the mutable indexed sequence satisfying a predicate, if any.
the predicate used to test elements.
an option value containing the first element in the mutable indexed sequence
that satisfies p
, or None
if none exists.
Finds the first element of the mutable indexed sequence satisfying a predicate, if any.
Finds the first element of the mutable indexed sequence satisfying a predicate, if any.
the predicate used to test elements.
an option value containing the first element in the mutable indexed sequence
that satisfies p
, or None
if none exists.
Finds the first element of the mutable indexed sequence satisfying a predicate, if any.
Finds the first element of the mutable indexed sequence satisfying a predicate, if any.
the predicate used to test elements.
an option value containing the first element in the mutable indexed sequence
that satisfies p
, or None
if none exists.
Finds the first element of the mutable indexed sequence satisfying a predicate, if any.
Finds the first element of the mutable indexed sequence satisfying a predicate, if any.
the predicate used to test elements.
an option value containing the first element in the mutable indexed sequence
that satisfies p
, or None
if none exists.
Finds the first element of the mutable indexed sequence satisfying a predicate, if any.
Finds the first element of the mutable indexed sequence satisfying a predicate, if any.
the predicate used to test elements.
an option value containing the first element in the mutable indexed sequence
that satisfies p
, or None
if none exists.
Finds the first element of the mutable indexed sequence satisfying a predicate, if any.
Finds the first element of the mutable indexed sequence satisfying a predicate, if any.
the predicate used to test elements.
an option value containing the first element in the mutable indexed sequence
that satisfies p
, or None
if none exists.
Finds the first element of the mutable indexed sequence satisfying a predicate, if any.
Finds the first element of the mutable indexed sequence satisfying a predicate, if any.
the predicate used to test elements.
an option value containing the first element in the mutable indexed sequence
that satisfies p
, or None
if none exists.
Finds the first element of the mutable indexed sequence satisfying a predicate, if any.
Finds the first element of the mutable indexed sequence satisfying a predicate, if any.
the predicate used to test elements.
an option value containing the first element in the mutable indexed sequence
that satisfies p
, or None
if none exists.
[use case] Builds a new collection by applying a function to all elements of this array and using the elements of the resulting collections.
Builds a new collection by applying a function to all elements of this array and using the elements of the resulting collections.
For example:
def getWords(lines: Seq[String]): Seq[String] = lines flatMap (line => line split "\\W+")
The type of the resulting collection is guided by the static type of array. This might cause unexpected results sometimes. For example:
// lettersOf will return a Seq[Char] of likely repeated letters, instead of a Set def lettersOf(words: Seq[String]) = words flatMap (word => word.toSet) // lettersOf will return a Set[Char], not a Seq def lettersOf(words: Seq[String]) = words.toSet flatMap (word => word.toSeq) // xs will be an Iterable[Int] val xs = Map("a" -> List(11,111), "b" -> List(22,222)).flatMap(_._2) // ys will be a Map[Int, Int] val ys = Map("a" -> List(1 -> 11,1 -> 111), "b" -> List(2 -> 22,2 -> 222)).flatMap(_._2)
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given collection-valued function
f
to each element of this array and concatenating the results.
[use case] Builds a new collection by applying a function to all elements of this array and using the elements of the resulting collections.
Builds a new collection by applying a function to all elements of this array and using the elements of the resulting collections.
For example:
def getWords(lines: Seq[String]): Seq[String] = lines flatMap (line => line split "\\W+")
The type of the resulting collection is guided by the static type of array. This might cause unexpected results sometimes. For example:
// lettersOf will return a Seq[Char] of likely repeated letters, instead of a Set def lettersOf(words: Seq[String]) = words flatMap (word => word.toSet) // lettersOf will return a Set[Char], not a Seq def lettersOf(words: Seq[String]) = words.toSet flatMap (word => word.toSeq) // xs will be an Iterable[Int] val xs = Map("a" -> List(11,111), "b" -> List(22,222)).flatMap(_._2) // ys will be a Map[Int, Int] val ys = Map("a" -> List(1 -> 11,1 -> 111), "b" -> List(2 -> 22,2 -> 222)).flatMap(_._2)
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given collection-valued function
f
to each element of this array and concatenating the results.
[use case] Builds a new collection by applying a function to all elements of this array and using the elements of the resulting collections.
Builds a new collection by applying a function to all elements of this array and using the elements of the resulting collections.
For example:
def getWords(lines: Seq[String]): Seq[String] = lines flatMap (line => line split "\\W+")
The type of the resulting collection is guided by the static type of array. This might cause unexpected results sometimes. For example:
// lettersOf will return a Seq[Char] of likely repeated letters, instead of a Set def lettersOf(words: Seq[String]) = words flatMap (word => word.toSet) // lettersOf will return a Set[Char], not a Seq def lettersOf(words: Seq[String]) = words.toSet flatMap (word => word.toSeq) // xs will be an Iterable[Int] val xs = Map("a" -> List(11,111), "b" -> List(22,222)).flatMap(_._2) // ys will be a Map[Int, Int] val ys = Map("a" -> List(1 -> 11,1 -> 111), "b" -> List(2 -> 22,2 -> 222)).flatMap(_._2)
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given collection-valued function
f
to each element of this array and concatenating the results.
[use case] Builds a new collection by applying a function to all elements of this array and using the elements of the resulting collections.
Builds a new collection by applying a function to all elements of this array and using the elements of the resulting collections.
For example:
def getWords(lines: Seq[String]): Seq[String] = lines flatMap (line => line split "\\W+")
The type of the resulting collection is guided by the static type of array. This might cause unexpected results sometimes. For example:
// lettersOf will return a Seq[Char] of likely repeated letters, instead of a Set def lettersOf(words: Seq[String]) = words flatMap (word => word.toSet) // lettersOf will return a Set[Char], not a Seq def lettersOf(words: Seq[String]) = words.toSet flatMap (word => word.toSeq) // xs will be an Iterable[Int] val xs = Map("a" -> List(11,111), "b" -> List(22,222)).flatMap(_._2) // ys will be a Map[Int, Int] val ys = Map("a" -> List(1 -> 11,1 -> 111), "b" -> List(2 -> 22,2 -> 222)).flatMap(_._2)
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given collection-valued function
f
to each element of this array and concatenating the results.
[use case] Builds a new collection by applying a function to all elements of this array and using the elements of the resulting collections.
Builds a new collection by applying a function to all elements of this array and using the elements of the resulting collections.
For example:
def getWords(lines: Seq[String]): Seq[String] = lines flatMap (line => line split "\\W+")
The type of the resulting collection is guided by the static type of array. This might cause unexpected results sometimes. For example:
// lettersOf will return a Seq[Char] of likely repeated letters, instead of a Set def lettersOf(words: Seq[String]) = words flatMap (word => word.toSet) // lettersOf will return a Set[Char], not a Seq def lettersOf(words: Seq[String]) = words.toSet flatMap (word => word.toSeq) // xs will be an Iterable[Int] val xs = Map("a" -> List(11,111), "b" -> List(22,222)).flatMap(_._2) // ys will be a Map[Int, Int] val ys = Map("a" -> List(1 -> 11,1 -> 111), "b" -> List(2 -> 22,2 -> 222)).flatMap(_._2)
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given collection-valued function
f
to each element of this array and concatenating the results.
[use case] Builds a new collection by applying a function to all elements of this array and using the elements of the resulting collections.
Builds a new collection by applying a function to all elements of this array and using the elements of the resulting collections.
For example:
def getWords(lines: Seq[String]): Seq[String] = lines flatMap (line => line split "\\W+")
The type of the resulting collection is guided by the static type of array. This might cause unexpected results sometimes. For example:
// lettersOf will return a Seq[Char] of likely repeated letters, instead of a Set def lettersOf(words: Seq[String]) = words flatMap (word => word.toSet) // lettersOf will return a Set[Char], not a Seq def lettersOf(words: Seq[String]) = words.toSet flatMap (word => word.toSeq) // xs will be an Iterable[Int] val xs = Map("a" -> List(11,111), "b" -> List(22,222)).flatMap(_._2) // ys will be a Map[Int, Int] val ys = Map("a" -> List(1 -> 11,1 -> 111), "b" -> List(2 -> 22,2 -> 222)).flatMap(_._2)
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given collection-valued function
f
to each element of this array and concatenating the results.
[use case] Builds a new collection by applying a function to all elements of this array and using the elements of the resulting collections.
Builds a new collection by applying a function to all elements of this array and using the elements of the resulting collections.
For example:
def getWords(lines: Seq[String]): Seq[String] = lines flatMap (line => line split "\\W+")
The type of the resulting collection is guided by the static type of array. This might cause unexpected results sometimes. For example:
// lettersOf will return a Seq[Char] of likely repeated letters, instead of a Set def lettersOf(words: Seq[String]) = words flatMap (word => word.toSet) // lettersOf will return a Set[Char], not a Seq def lettersOf(words: Seq[String]) = words.toSet flatMap (word => word.toSeq) // xs will be an Iterable[Int] val xs = Map("a" -> List(11,111), "b" -> List(22,222)).flatMap(_._2) // ys will be a Map[Int, Int] val ys = Map("a" -> List(1 -> 11,1 -> 111), "b" -> List(2 -> 22,2 -> 222)).flatMap(_._2)
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given collection-valued function
f
to each element of this array and concatenating the results.
[use case] Builds a new collection by applying a function to all elements of this array and using the elements of the resulting collections.
Builds a new collection by applying a function to all elements of this array and using the elements of the resulting collections.
For example:
def getWords(lines: Seq[String]): Seq[String] = lines flatMap (line => line split "\\W+")
The type of the resulting collection is guided by the static type of array. This might cause unexpected results sometimes. For example:
// lettersOf will return a Seq[Char] of likely repeated letters, instead of a Set def lettersOf(words: Seq[String]) = words flatMap (word => word.toSet) // lettersOf will return a Set[Char], not a Seq def lettersOf(words: Seq[String]) = words.toSet flatMap (word => word.toSeq) // xs will be an Iterable[Int] val xs = Map("a" -> List(11,111), "b" -> List(22,222)).flatMap(_._2) // ys will be a Map[Int, Int] val ys = Map("a" -> List(1 -> 11,1 -> 111), "b" -> List(2 -> 22,2 -> 222)).flatMap(_._2)
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given collection-valued function
f
to each element of this array and concatenating the results.
[use case] Builds a new collection by applying a function to all elements of this array and using the elements of the resulting collections.
Builds a new collection by applying a function to all elements of this array and using the elements of the resulting collections.
For example:
def getWords(lines: Seq[String]): Seq[String] = lines flatMap (line => line split "\\W+")
The type of the resulting collection is guided by the static type of array. This might cause unexpected results sometimes. For example:
// lettersOf will return a Seq[Char] of likely repeated letters, instead of a Set def lettersOf(words: Seq[String]) = words flatMap (word => word.toSet) // lettersOf will return a Set[Char], not a Seq def lettersOf(words: Seq[String]) = words.toSet flatMap (word => word.toSeq) // xs will be an Iterable[Int] val xs = Map("a" -> List(11,111), "b" -> List(22,222)).flatMap(_._2) // ys will be a Map[Int, Int] val ys = Map("a" -> List(1 -> 11,1 -> 111), "b" -> List(2 -> 22,2 -> 222)).flatMap(_._2)
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given collection-valued function
f
to each element of this array and concatenating the results.
[use case] Builds a new collection by applying a function to all elements of this array and using the elements of the resulting collections.
Builds a new collection by applying a function to all elements of this array and using the elements of the resulting collections.
For example:
def getWords(lines: Seq[String]): Seq[String] = lines flatMap (line => line split "\\W+")
The type of the resulting collection is guided by the static type of array. This might cause unexpected results sometimes. For example:
// lettersOf will return a Seq[Char] of likely repeated letters, instead of a Set def lettersOf(words: Seq[String]) = words flatMap (word => word.toSet) // lettersOf will return a Set[Char], not a Seq def lettersOf(words: Seq[String]) = words.toSet flatMap (word => word.toSeq) // xs will be an Iterable[Int] val xs = Map("a" -> List(11,111), "b" -> List(22,222)).flatMap(_._2) // ys will be a Map[Int, Int] val ys = Map("a" -> List(1 -> 11,1 -> 111), "b" -> List(2 -> 22,2 -> 222)).flatMap(_._2)
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given collection-valued function
f
to each element of this array and concatenating the results.
[use case] Builds a new collection by applying a function to all elements of this array and using the elements of the resulting collections.
Builds a new collection by applying a function to all elements of this array and using the elements of the resulting collections.
For example:
def getWords(lines: Seq[String]): Seq[String] = lines flatMap (line => line split "\\W+")
The type of the resulting collection is guided by the static type of array. This might cause unexpected results sometimes. For example:
// lettersOf will return a Seq[Char] of likely repeated letters, instead of a Set def lettersOf(words: Seq[String]) = words flatMap (word => word.toSet) // lettersOf will return a Set[Char], not a Seq def lettersOf(words: Seq[String]) = words.toSet flatMap (word => word.toSeq) // xs will be an Iterable[Int] val xs = Map("a" -> List(11,111), "b" -> List(22,222)).flatMap(_._2) // ys will be a Map[Int, Int] val ys = Map("a" -> List(1 -> 11,1 -> 111), "b" -> List(2 -> 22,2 -> 222)).flatMap(_._2)
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given collection-valued function
f
to each element of this array and concatenating the results.
Flattens a two-dimensional array by concatenating all its rows into a single array.
Flattens a two-dimensional array by concatenating all its rows into a single array.
Type of row elements.
A function that converts elements of this array to rows - arrays of type U
.
An array obtained by concatenating rows of this array.
Flattens a two-dimensional array by concatenating all its rows into a single array.
Flattens a two-dimensional array by concatenating all its rows into a single array.
Type of row elements.
A function that converts elements of this array to rows - arrays of type U
.
An array obtained by concatenating rows of this array.
Flattens a two-dimensional array by concatenating all its rows into a single array.
Flattens a two-dimensional array by concatenating all its rows into a single array.
Type of row elements.
A function that converts elements of this array to rows - arrays of type U
.
An array obtained by concatenating rows of this array.
Flattens a two-dimensional array by concatenating all its rows into a single array.
Flattens a two-dimensional array by concatenating all its rows into a single array.
Type of row elements.
A function that converts elements of this array to rows - arrays of type U
.
An array obtained by concatenating rows of this array.
Flattens a two-dimensional array by concatenating all its rows into a single array.
Flattens a two-dimensional array by concatenating all its rows into a single array.
Type of row elements.
A function that converts elements of this array to rows - arrays of type U
.
An array obtained by concatenating rows of this array.
Flattens a two-dimensional array by concatenating all its rows into a single array.
Flattens a two-dimensional array by concatenating all its rows into a single array.
Type of row elements.
A function that converts elements of this array to rows - arrays of type U
.
An array obtained by concatenating rows of this array.
Flattens a two-dimensional array by concatenating all its rows into a single array.
Flattens a two-dimensional array by concatenating all its rows into a single array.
Type of row elements.
A function that converts elements of this array to rows - arrays of type U
.
An array obtained by concatenating rows of this array.
Flattens a two-dimensional array by concatenating all its rows into a single array.
Flattens a two-dimensional array by concatenating all its rows into a single array.
Type of row elements.
A function that converts elements of this array to rows - arrays of type U
.
An array obtained by concatenating rows of this array.
Flattens a two-dimensional array by concatenating all its rows into a single array.
Flattens a two-dimensional array by concatenating all its rows into a single array.
Type of row elements.
A function that converts elements of this array to rows - arrays of type U
.
An array obtained by concatenating rows of this array.
Folds the elements of this mutable indexed sequence using the specified associative binary operator.
Folds the elements of this mutable indexed sequence using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
a type parameter for the binary operator, a supertype of A
.
a neutral element for the fold operation; may be added to the result
an arbitrary number of times, and must not change the result (e.g., Nil
for list concatenation,
0 for addition, or 1 for multiplication.)
a binary operator that must be associative
the result of applying fold operator op
between all the elements and z
Folds the elements of this mutable indexed sequence using the specified associative binary operator.
Folds the elements of this mutable indexed sequence using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
a type parameter for the binary operator, a supertype of A
.
a neutral element for the fold operation; may be added to the result
an arbitrary number of times, and must not change the result (e.g., Nil
for list concatenation,
0 for addition, or 1 for multiplication.)
a binary operator that must be associative
the result of applying fold operator op
between all the elements and z
Folds the elements of this mutable indexed sequence using the specified associative binary operator.
Folds the elements of this mutable indexed sequence using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
a type parameter for the binary operator, a supertype of A
.
a neutral element for the fold operation; may be added to the result
an arbitrary number of times, and must not change the result (e.g., Nil
for list concatenation,
0 for addition, or 1 for multiplication.)
a binary operator that must be associative
the result of applying fold operator op
between all the elements and z
Folds the elements of this mutable indexed sequence using the specified associative binary operator.
Folds the elements of this mutable indexed sequence using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
a type parameter for the binary operator, a supertype of A
.
a neutral element for the fold operation; may be added to the result
an arbitrary number of times, and must not change the result (e.g., Nil
for list concatenation,
0 for addition, or 1 for multiplication.)
a binary operator that must be associative
the result of applying fold operator op
between all the elements and z
Folds the elements of this mutable indexed sequence using the specified associative binary operator.
Folds the elements of this mutable indexed sequence using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
a type parameter for the binary operator, a supertype of A
.
a neutral element for the fold operation; may be added to the result
an arbitrary number of times, and must not change the result (e.g., Nil
for list concatenation,
0 for addition, or 1 for multiplication.)
a binary operator that must be associative
the result of applying fold operator op
between all the elements and z
Folds the elements of this mutable indexed sequence using the specified associative binary operator.
Folds the elements of this mutable indexed sequence using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
a type parameter for the binary operator, a supertype of A
.
a neutral element for the fold operation; may be added to the result
an arbitrary number of times, and must not change the result (e.g., Nil
for list concatenation,
0 for addition, or 1 for multiplication.)
a binary operator that must be associative
the result of applying fold operator op
between all the elements and z
Folds the elements of this mutable indexed sequence using the specified associative binary operator.
Folds the elements of this mutable indexed sequence using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
a type parameter for the binary operator, a supertype of A
.
a neutral element for the fold operation; may be added to the result
an arbitrary number of times, and must not change the result (e.g., Nil
for list concatenation,
0 for addition, or 1 for multiplication.)
a binary operator that must be associative
the result of applying fold operator op
between all the elements and z
Folds the elements of this mutable indexed sequence using the specified associative binary operator.
Folds the elements of this mutable indexed sequence using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
a type parameter for the binary operator, a supertype of A
.
a neutral element for the fold operation; may be added to the result
an arbitrary number of times, and must not change the result (e.g., Nil
for list concatenation,
0 for addition, or 1 for multiplication.)
a binary operator that must be associative
the result of applying fold operator op
between all the elements and z
Folds the elements of this mutable indexed sequence using the specified associative binary operator.
Folds the elements of this mutable indexed sequence using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
a type parameter for the binary operator, a supertype of A
.
a neutral element for the fold operation; may be added to the result
an arbitrary number of times, and must not change the result (e.g., Nil
for list concatenation,
0 for addition, or 1 for multiplication.)
a binary operator that must be associative
the result of applying fold operator op
between all the elements and z
Folds the elements of this mutable indexed sequence using the specified associative binary operator.
Folds the elements of this mutable indexed sequence using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
a type parameter for the binary operator, a supertype of A
.
a neutral element for the fold operation; may be added to the result
an arbitrary number of times, and must not change the result (e.g., Nil
for list concatenation,
0 for addition, or 1 for multiplication.)
a binary operator that must be associative
the result of applying fold operator op
between all the elements and z
Folds the elements of this mutable indexed sequence using the specified associative binary operator.
Folds the elements of this mutable indexed sequence using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
a type parameter for the binary operator, a supertype of A
.
a neutral element for the fold operation; may be added to the result
an arbitrary number of times, and must not change the result (e.g., Nil
for list concatenation,
0 for addition, or 1 for multiplication.)
a binary operator that must be associative
the result of applying fold operator op
between all the elements and z
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right with the start value z
on the left:
op(...op(z, x_1), x_2, ..., x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right with the start value z
on the left:
op(...op(z, x_1), x_2, ..., x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right with the start value z
on the left:
op(...op(z, x_1), x_2, ..., x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right with the start value z
on the left:
op(...op(z, x_1), x_2, ..., x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right with the start value z
on the left:
op(...op(z, x_1), x_2, ..., x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right with the start value z
on the left:
op(...op(z, x_1), x_2, ..., x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right with the start value z
on the left:
op(...op(z, x_1), x_2, ..., x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right with the start value z
on the left:
op(...op(z, x_1), x_2, ..., x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right with the start value z
on the left:
op(...op(z, x_1), x_2, ..., x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left with the start value z
on the right:
op(x_1, op(x_2, ... op(x_n, z)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left with the start value z
on the right:
op(x_1, op(x_2, ... op(x_n, z)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left with the start value z
on the right:
op(x_1, op(x_2, ... op(x_n, z)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left with the start value z
on the right:
op(x_1, op(x_2, ... op(x_n, z)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left with the start value z
on the right:
op(x_1, op(x_2, ... op(x_n, z)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left with the start value z
on the right:
op(x_1, op(x_2, ... op(x_n, z)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left with the start value z
on the right:
op(x_1, op(x_2, ... op(x_n, z)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left with the start value z
on the right:
op(x_1, op(x_2, ... op(x_n, z)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left with the start value z
on the right:
op(x_1, op(x_2, ... op(x_n, z)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
Tests whether a predicate holds for all elements of this mutable indexed sequence.
Tests whether a predicate holds for all elements of this mutable indexed sequence.
the predicate used to test elements.
true
if this mutable indexed sequence is empty, otherwise true
if the given predicate p
holds for all elements of this mutable indexed sequence, otherwise false
.
Tests whether a predicate holds for all elements of this mutable indexed sequence.
Tests whether a predicate holds for all elements of this mutable indexed sequence.
the predicate used to test elements.
true
if this mutable indexed sequence is empty, otherwise true
if the given predicate p
holds for all elements of this mutable indexed sequence, otherwise false
.
Tests whether a predicate holds for all elements of this mutable indexed sequence.
Tests whether a predicate holds for all elements of this mutable indexed sequence.
the predicate used to test elements.
true
if this mutable indexed sequence is empty, otherwise true
if the given predicate p
holds for all elements of this mutable indexed sequence, otherwise false
.
Tests whether a predicate holds for all elements of this mutable indexed sequence.
Tests whether a predicate holds for all elements of this mutable indexed sequence.
the predicate used to test elements.
true
if this mutable indexed sequence is empty, otherwise true
if the given predicate p
holds for all elements of this mutable indexed sequence, otherwise false
.
Tests whether a predicate holds for all elements of this mutable indexed sequence.
Tests whether a predicate holds for all elements of this mutable indexed sequence.
the predicate used to test elements.
true
if this mutable indexed sequence is empty, otherwise true
if the given predicate p
holds for all elements of this mutable indexed sequence, otherwise false
.
Tests whether a predicate holds for all elements of this mutable indexed sequence.
Tests whether a predicate holds for all elements of this mutable indexed sequence.
the predicate used to test elements.
true
if this mutable indexed sequence is empty, otherwise true
if the given predicate p
holds for all elements of this mutable indexed sequence, otherwise false
.
Tests whether a predicate holds for all elements of this mutable indexed sequence.
Tests whether a predicate holds for all elements of this mutable indexed sequence.
the predicate used to test elements.
true
if this mutable indexed sequence is empty, otherwise true
if the given predicate p
holds for all elements of this mutable indexed sequence, otherwise false
.
Tests whether a predicate holds for all elements of this mutable indexed sequence.
Tests whether a predicate holds for all elements of this mutable indexed sequence.
the predicate used to test elements.
true
if this mutable indexed sequence is empty, otherwise true
if the given predicate p
holds for all elements of this mutable indexed sequence, otherwise false
.
Tests whether a predicate holds for all elements of this mutable indexed sequence.
Tests whether a predicate holds for all elements of this mutable indexed sequence.
the predicate used to test elements.
true
if this mutable indexed sequence is empty, otherwise true
if the given predicate p
holds for all elements of this mutable indexed sequence, otherwise false
.
Returns string formatted according to given format
string.
Returns string formatted according to given format
string.
Format strings are as for String.format
(@see java.lang.String.format).
A representation that corresponds to the dynamic class of the receiver object.
A representation that corresponds to the dynamic class of the receiver object.
The nature of the representation is platform dependent.
a representation that corresponds to the dynamic class of the receiver object.
not specified by SLS as a member of AnyRef
Partitions this mutable indexed sequence into a map of mutable indexed sequences according to some discriminator function.
Partitions this mutable indexed sequence into a map of mutable indexed sequences according to some discriminator function.
Note: this method is not re-implemented by views. This means when applied to a view it will always force the view and return a new mutable indexed sequence.
the type of keys returned by the discriminator function.
the discriminator function.
A map from keys to mutable indexed sequences such that the following invariant holds:
(xs groupBy f)(k) = xs filter (x => f(x) == k)
That is, every key k
is bound to a mutable indexed sequence of those elements x
for which f(x)
equals k
.
Partitions this mutable indexed sequence into a map of mutable indexed sequences according to some discriminator function.
Partitions this mutable indexed sequence into a map of mutable indexed sequences according to some discriminator function.
Note: this method is not re-implemented by views. This means when applied to a view it will always force the view and return a new mutable indexed sequence.
the type of keys returned by the discriminator function.
the discriminator function.
A map from keys to mutable indexed sequences such that the following invariant holds:
(xs groupBy f)(k) = xs filter (x => f(x) == k)
That is, every key k
is bound to a mutable indexed sequence of those elements x
for which f(x)
equals k
.
Partitions this mutable indexed sequence into a map of mutable indexed sequences according to some discriminator function.
Partitions this mutable indexed sequence into a map of mutable indexed sequences according to some discriminator function.
Note: this method is not re-implemented by views. This means when applied to a view it will always force the view and return a new mutable indexed sequence.
the type of keys returned by the discriminator function.
the discriminator function.
A map from keys to mutable indexed sequences such that the following invariant holds:
(xs groupBy f)(k) = xs filter (x => f(x) == k)
That is, every key k
is bound to a mutable indexed sequence of those elements x
for which f(x)
equals k
.
Partitions this mutable indexed sequence into a map of mutable indexed sequences according to some discriminator function.
Partitions this mutable indexed sequence into a map of mutable indexed sequences according to some discriminator function.
Note: this method is not re-implemented by views. This means when applied to a view it will always force the view and return a new mutable indexed sequence.
the type of keys returned by the discriminator function.
the discriminator function.
A map from keys to mutable indexed sequences such that the following invariant holds:
(xs groupBy f)(k) = xs filter (x => f(x) == k)
That is, every key k
is bound to a mutable indexed sequence of those elements x
for which f(x)
equals k
.
Partitions this mutable indexed sequence into a map of mutable indexed sequences according to some discriminator function.
Partitions this mutable indexed sequence into a map of mutable indexed sequences according to some discriminator function.
Note: this method is not re-implemented by views. This means when applied to a view it will always force the view and return a new mutable indexed sequence.
the type of keys returned by the discriminator function.
the discriminator function.
A map from keys to mutable indexed sequences such that the following invariant holds:
(xs groupBy f)(k) = xs filter (x => f(x) == k)
That is, every key k
is bound to a mutable indexed sequence of those elements x
for which f(x)
equals k
.
Partitions this mutable indexed sequence into a map of mutable indexed sequences according to some discriminator function.
Partitions this mutable indexed sequence into a map of mutable indexed sequences according to some discriminator function.
Note: this method is not re-implemented by views. This means when applied to a view it will always force the view and return a new mutable indexed sequence.
the type of keys returned by the discriminator function.
the discriminator function.
A map from keys to mutable indexed sequences such that the following invariant holds:
(xs groupBy f)(k) = xs filter (x => f(x) == k)
That is, every key k
is bound to a mutable indexed sequence of those elements x
for which f(x)
equals k
.
Partitions this mutable indexed sequence into a map of mutable indexed sequences according to some discriminator function.
Partitions this mutable indexed sequence into a map of mutable indexed sequences according to some discriminator function.
Note: this method is not re-implemented by views. This means when applied to a view it will always force the view and return a new mutable indexed sequence.
the type of keys returned by the discriminator function.
the discriminator function.
A map from keys to mutable indexed sequences such that the following invariant holds:
(xs groupBy f)(k) = xs filter (x => f(x) == k)
That is, every key k
is bound to a mutable indexed sequence of those elements x
for which f(x)
equals k
.
Partitions this mutable indexed sequence into a map of mutable indexed sequences according to some discriminator function.
Partitions this mutable indexed sequence into a map of mutable indexed sequences according to some discriminator function.
Note: this method is not re-implemented by views. This means when applied to a view it will always force the view and return a new mutable indexed sequence.
the type of keys returned by the discriminator function.
the discriminator function.
A map from keys to mutable indexed sequences such that the following invariant holds:
(xs groupBy f)(k) = xs filter (x => f(x) == k)
That is, every key k
is bound to a mutable indexed sequence of those elements x
for which f(x)
equals k
.
Partitions this mutable indexed sequence into a map of mutable indexed sequences according to some discriminator function.
Partitions this mutable indexed sequence into a map of mutable indexed sequences according to some discriminator function.
Note: this method is not re-implemented by views. This means when applied to a view it will always force the view and return a new mutable indexed sequence.
the type of keys returned by the discriminator function.
the discriminator function.
A map from keys to mutable indexed sequences such that the following invariant holds:
(xs groupBy f)(k) = xs filter (x => f(x) == k)
That is, every key k
is bound to a mutable indexed sequence of those elements x
for which f(x)
equals k
.
The hashCode method for reference types.
[use case] Finds index of first occurrence of some value in this array after or at some start index.
Finds index of first occurrence of some value in this array after or at some start index.
the element value to search for.
the start index
the index >= from
of the first element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of first occurrence of some value in this array.
Finds index of first occurrence of some value in this array.
the element value to search for.
the index of the first element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of first occurrence of some value in this array after or at some start index.
Finds index of first occurrence of some value in this array after or at some start index.
the element value to search for.
the start index
the index >= from
of the first element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of first occurrence of some value in this array.
Finds index of first occurrence of some value in this array.
the element value to search for.
the index of the first element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of first occurrence of some value in this array after or at some start index.
Finds index of first occurrence of some value in this array after or at some start index.
the element value to search for.
the start index
the index >= from
of the first element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of first occurrence of some value in this array.
Finds index of first occurrence of some value in this array.
the element value to search for.
the index of the first element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of first occurrence of some value in this array after or at some start index.
Finds index of first occurrence of some value in this array after or at some start index.
the element value to search for.
the start index
the index >= from
of the first element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of first occurrence of some value in this array.
Finds index of first occurrence of some value in this array.
the element value to search for.
the index of the first element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of first occurrence of some value in this array after or at some start index.
Finds index of first occurrence of some value in this array after or at some start index.
the element value to search for.
the start index
the index >= from
of the first element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of first occurrence of some value in this array.
Finds index of first occurrence of some value in this array.
the element value to search for.
the index of the first element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of first occurrence of some value in this array after or at some start index.
Finds index of first occurrence of some value in this array after or at some start index.
the element value to search for.
the start index
the index >= from
of the first element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of first occurrence of some value in this array.
Finds index of first occurrence of some value in this array.
the element value to search for.
the index of the first element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of first occurrence of some value in this array after or at some start index.
Finds index of first occurrence of some value in this array after or at some start index.
the element value to search for.
the start index
the index >= from
of the first element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of first occurrence of some value in this array.
Finds index of first occurrence of some value in this array.
the element value to search for.
the index of the first element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of first occurrence of some value in this array after or at some start index.
Finds index of first occurrence of some value in this array after or at some start index.
the element value to search for.
the start index
the index >= from
of the first element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of first occurrence of some value in this array.
Finds index of first occurrence of some value in this array.
the element value to search for.
the index of the first element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of first occurrence of some value in this array after or at some start index.
Finds index of first occurrence of some value in this array after or at some start index.
the element value to search for.
the start index
the index >= from
of the first element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of first occurrence of some value in this array.
Finds index of first occurrence of some value in this array.
the element value to search for.
the index of the first element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
Finds first index after or at a start index where this mutable indexed sequence contains a given sequence as a slice.
Finds first index after or at a start index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the start index
the first index >= from
such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds first index where this mutable indexed sequence contains a given sequence as a slice.
Finds first index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the first index such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds first index after or at a start index where this mutable indexed sequence contains a given sequence as a slice.
Finds first index after or at a start index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the start index
the first index >= from
such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds first index where this mutable indexed sequence contains a given sequence as a slice.
Finds first index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the first index such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds first index after or at a start index where this mutable indexed sequence contains a given sequence as a slice.
Finds first index after or at a start index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the start index
the first index >= from
such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds first index where this mutable indexed sequence contains a given sequence as a slice.
Finds first index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the first index such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds first index after or at a start index where this mutable indexed sequence contains a given sequence as a slice.
Finds first index after or at a start index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the start index
the first index >= from
such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds first index where this mutable indexed sequence contains a given sequence as a slice.
Finds first index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the first index such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds first index after or at a start index where this mutable indexed sequence contains a given sequence as a slice.
Finds first index after or at a start index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the start index
the first index >= from
such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds first index where this mutable indexed sequence contains a given sequence as a slice.
Finds first index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the first index such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds first index after or at a start index where this mutable indexed sequence contains a given sequence as a slice.
Finds first index after or at a start index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the start index
the first index >= from
such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds first index where this mutable indexed sequence contains a given sequence as a slice.
Finds first index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the first index such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds first index after or at a start index where this mutable indexed sequence contains a given sequence as a slice.
Finds first index after or at a start index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the start index
the first index >= from
such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds first index where this mutable indexed sequence contains a given sequence as a slice.
Finds first index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the first index such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds first index after or at a start index where this mutable indexed sequence contains a given sequence as a slice.
Finds first index after or at a start index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the start index
the first index >= from
such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds first index where this mutable indexed sequence contains a given sequence as a slice.
Finds first index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the first index such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds first index after or at a start index where this mutable indexed sequence contains a given sequence as a slice.
Finds first index after or at a start index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the start index
the first index >= from
such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds first index where this mutable indexed sequence contains a given sequence as a slice.
Finds first index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the first index such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds first index after or at a start index where this mutable indexed sequence contains a given sequence as a slice.
Finds first index after or at a start index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the start index
the first index >= from
such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds first index where this mutable indexed sequence contains a given sequence as a slice.
Finds first index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the first index such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds first index after or at a start index where this mutable indexed sequence contains a given sequence as a slice.
Finds first index after or at a start index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the start index
the first index >= from
such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds first index where this mutable indexed sequence contains a given sequence as a slice.
Finds first index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the first index such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds index of the first element satisfying some predicate after or at some start index.
Finds index of the first element satisfying some predicate after or at some start index.
the predicate used to test elements.
the start index
the index >= from
of the first element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of first element satisfying some predicate.
Finds index of first element satisfying some predicate.
the predicate used to test elements.
the index of the first element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of the first element satisfying some predicate after or at some start index.
Finds index of the first element satisfying some predicate after or at some start index.
the predicate used to test elements.
the start index
the index >= from
of the first element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of first element satisfying some predicate.
Finds index of first element satisfying some predicate.
the predicate used to test elements.
the index of the first element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of the first element satisfying some predicate after or at some start index.
Finds index of the first element satisfying some predicate after or at some start index.
the predicate used to test elements.
the start index
the index >= from
of the first element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of first element satisfying some predicate.
Finds index of first element satisfying some predicate.
the predicate used to test elements.
the index of the first element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of the first element satisfying some predicate after or at some start index.
Finds index of the first element satisfying some predicate after or at some start index.
the predicate used to test elements.
the start index
the index >= from
of the first element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of first element satisfying some predicate.
Finds index of first element satisfying some predicate.
the predicate used to test elements.
the index of the first element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of the first element satisfying some predicate after or at some start index.
Finds index of the first element satisfying some predicate after or at some start index.
the predicate used to test elements.
the start index
the index >= from
of the first element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of first element satisfying some predicate.
Finds index of first element satisfying some predicate.
the predicate used to test elements.
the index of the first element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of the first element satisfying some predicate after or at some start index.
Finds index of the first element satisfying some predicate after or at some start index.
the predicate used to test elements.
the start index
the index >= from
of the first element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of first element satisfying some predicate.
Finds index of first element satisfying some predicate.
the predicate used to test elements.
the index of the first element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of the first element satisfying some predicate after or at some start index.
Finds index of the first element satisfying some predicate after or at some start index.
the predicate used to test elements.
the start index
the index >= from
of the first element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of first element satisfying some predicate.
Finds index of first element satisfying some predicate.
the predicate used to test elements.
the index of the first element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of the first element satisfying some predicate after or at some start index.
Finds index of the first element satisfying some predicate after or at some start index.
the predicate used to test elements.
the start index
the index >= from
of the first element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of first element satisfying some predicate.
Finds index of first element satisfying some predicate.
the predicate used to test elements.
the index of the first element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of the first element satisfying some predicate after or at some start index.
Finds index of the first element satisfying some predicate after or at some start index.
the predicate used to test elements.
the start index
the index >= from
of the first element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of first element satisfying some predicate.
Finds index of first element satisfying some predicate.
the predicate used to test elements.
the index of the first element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
[use case] Computes the multiset intersection between this array and another sequence.
Computes the multiset intersection between this array and another sequence.
the sequence of elements to intersect with.
a new array which contains all elements of this array
which also appear in that
.
If an element value x
appears
n times in that
, then the first n occurrences of x
will be retained
in the result, but any following occurrences will be omitted.
[use case] Computes the multiset intersection between this array and another sequence.
Computes the multiset intersection between this array and another sequence.
the sequence of elements to intersect with.
a new array which contains all elements of this array
which also appear in that
.
If an element value x
appears
n times in that
, then the first n occurrences of x
will be retained
in the result, but any following occurrences will be omitted.
[use case] Computes the multiset intersection between this array and another sequence.
Computes the multiset intersection between this array and another sequence.
the sequence of elements to intersect with.
a new array which contains all elements of this array
which also appear in that
.
If an element value x
appears
n times in that
, then the first n occurrences of x
will be retained
in the result, but any following occurrences will be omitted.
[use case] Computes the multiset intersection between this array and another sequence.
Computes the multiset intersection between this array and another sequence.
the sequence of elements to intersect with.
a new array which contains all elements of this array
which also appear in that
.
If an element value x
appears
n times in that
, then the first n occurrences of x
will be retained
in the result, but any following occurrences will be omitted.
[use case] Computes the multiset intersection between this array and another sequence.
Computes the multiset intersection between this array and another sequence.
the sequence of elements to intersect with.
a new array which contains all elements of this array
which also appear in that
.
If an element value x
appears
n times in that
, then the first n occurrences of x
will be retained
in the result, but any following occurrences will be omitted.
[use case] Computes the multiset intersection between this array and another sequence.
Computes the multiset intersection between this array and another sequence.
the sequence of elements to intersect with.
a new array which contains all elements of this array
which also appear in that
.
If an element value x
appears
n times in that
, then the first n occurrences of x
will be retained
in the result, but any following occurrences will be omitted.
[use case] Computes the multiset intersection between this array and another sequence.
Computes the multiset intersection between this array and another sequence.
the sequence of elements to intersect with.
a new array which contains all elements of this array
which also appear in that
.
If an element value x
appears
n times in that
, then the first n occurrences of x
will be retained
in the result, but any following occurrences will be omitted.
[use case] Computes the multiset intersection between this array and another sequence.
Computes the multiset intersection between this array and another sequence.
the sequence of elements to intersect with.
a new array which contains all elements of this array
which also appear in that
.
If an element value x
appears
n times in that
, then the first n occurrences of x
will be retained
in the result, but any following occurrences will be omitted.
[use case] Computes the multiset intersection between this array and another sequence.
Computes the multiset intersection between this array and another sequence.
the sequence of elements to intersect with.
a new array which contains all elements of this array
which also appear in that
.
If an element value x
appears
n times in that
, then the first n occurrences of x
will be retained
in the result, but any following occurrences will be omitted.
Test whether the dynamic type of the receiver object is T0
.
Test whether the dynamic type of the receiver object is T0
.
Note that the result of the test is modulo Scala's erasure semantics.
Therefore the expression 1.isInstanceOf[String]
will return false
, while the
expression List(1).isInstanceOf[List[String]]
will return true
.
In the latter example, because the type argument is erased as part of compilation it is
not possible to check whether the contents of the list are of the specified type.
true
if the receiver object is an instance of erasure of type T0
; false
otherwise.
[use case] Finds index of last occurrence of some value in this array before or at a given end index.
Finds index of last occurrence of some value in this array before or at a given end index.
the element value to search for.
the end index.
the index <= end
of the last element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of last occurrence of some value in this array.
Finds index of last occurrence of some value in this array.
the element value to search for.
the index of the last element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of last occurrence of some value in this array before or at a given end index.
Finds index of last occurrence of some value in this array before or at a given end index.
the element value to search for.
the end index.
the index <= end
of the last element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of last occurrence of some value in this array.
Finds index of last occurrence of some value in this array.
the element value to search for.
the index of the last element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of last occurrence of some value in this array before or at a given end index.
Finds index of last occurrence of some value in this array before or at a given end index.
the element value to search for.
the end index.
the index <= end
of the last element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of last occurrence of some value in this array.
Finds index of last occurrence of some value in this array.
the element value to search for.
the index of the last element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of last occurrence of some value in this array before or at a given end index.
Finds index of last occurrence of some value in this array before or at a given end index.
the element value to search for.
the end index.
the index <= end
of the last element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of last occurrence of some value in this array.
Finds index of last occurrence of some value in this array.
the element value to search for.
the index of the last element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of last occurrence of some value in this array before or at a given end index.
Finds index of last occurrence of some value in this array before or at a given end index.
the element value to search for.
the end index.
the index <= end
of the last element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of last occurrence of some value in this array.
Finds index of last occurrence of some value in this array.
the element value to search for.
the index of the last element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of last occurrence of some value in this array before or at a given end index.
Finds index of last occurrence of some value in this array before or at a given end index.
the element value to search for.
the end index.
the index <= end
of the last element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of last occurrence of some value in this array.
Finds index of last occurrence of some value in this array.
the element value to search for.
the index of the last element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of last occurrence of some value in this array before or at a given end index.
Finds index of last occurrence of some value in this array before or at a given end index.
the element value to search for.
the end index.
the index <= end
of the last element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of last occurrence of some value in this array.
Finds index of last occurrence of some value in this array.
the element value to search for.
the index of the last element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of last occurrence of some value in this array before or at a given end index.
Finds index of last occurrence of some value in this array before or at a given end index.
the element value to search for.
the end index.
the index <= end
of the last element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of last occurrence of some value in this array.
Finds index of last occurrence of some value in this array.
the element value to search for.
the index of the last element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of last occurrence of some value in this array before or at a given end index.
Finds index of last occurrence of some value in this array before or at a given end index.
the element value to search for.
the end index.
the index <= end
of the last element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
[use case] Finds index of last occurrence of some value in this array.
Finds index of last occurrence of some value in this array.
the element value to search for.
the index of the last element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
Finds last index before or at a given end index where this mutable indexed sequence contains a given sequence as a slice.
Finds last index before or at a given end index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the end index
the last index <= end
such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds last index where this mutable indexed sequence contains a given sequence as a slice.
Finds last index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the last index such that the elements of this mutable indexed sequence starting a this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds last index before or at a given end index where this mutable indexed sequence contains a given sequence as a slice.
Finds last index before or at a given end index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the end index
the last index <= end
such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds last index where this mutable indexed sequence contains a given sequence as a slice.
Finds last index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the last index such that the elements of this mutable indexed sequence starting a this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds last index before or at a given end index where this mutable indexed sequence contains a given sequence as a slice.
Finds last index before or at a given end index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the end index
the last index <= end
such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds last index where this mutable indexed sequence contains a given sequence as a slice.
Finds last index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the last index such that the elements of this mutable indexed sequence starting a this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds last index before or at a given end index where this mutable indexed sequence contains a given sequence as a slice.
Finds last index before or at a given end index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the end index
the last index <= end
such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds last index where this mutable indexed sequence contains a given sequence as a slice.
Finds last index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the last index such that the elements of this mutable indexed sequence starting a this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds last index before or at a given end index where this mutable indexed sequence contains a given sequence as a slice.
Finds last index before or at a given end index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the end index
the last index <= end
such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds last index where this mutable indexed sequence contains a given sequence as a slice.
Finds last index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the last index such that the elements of this mutable indexed sequence starting a this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds last index before or at a given end index where this mutable indexed sequence contains a given sequence as a slice.
Finds last index before or at a given end index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the end index
the last index <= end
such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds last index where this mutable indexed sequence contains a given sequence as a slice.
Finds last index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the last index such that the elements of this mutable indexed sequence starting a this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds last index before or at a given end index where this mutable indexed sequence contains a given sequence as a slice.
Finds last index before or at a given end index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the end index
the last index <= end
such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds last index where this mutable indexed sequence contains a given sequence as a slice.
Finds last index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the last index such that the elements of this mutable indexed sequence starting a this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds last index before or at a given end index where this mutable indexed sequence contains a given sequence as a slice.
Finds last index before or at a given end index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the end index
the last index <= end
such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds last index where this mutable indexed sequence contains a given sequence as a slice.
Finds last index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the last index such that the elements of this mutable indexed sequence starting a this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds last index before or at a given end index where this mutable indexed sequence contains a given sequence as a slice.
Finds last index before or at a given end index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the end index
the last index <= end
such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds last index where this mutable indexed sequence contains a given sequence as a slice.
Finds last index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the last index such that the elements of this mutable indexed sequence starting a this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds last index before or at a given end index where this mutable indexed sequence contains a given sequence as a slice.
Finds last index before or at a given end index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the end index
the last index <= end
such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds last index where this mutable indexed sequence contains a given sequence as a slice.
Finds last index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the last index such that the elements of this mutable indexed sequence starting a this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds last index before or at a given end index where this mutable indexed sequence contains a given sequence as a slice.
Finds last index before or at a given end index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the end index
the last index <= end
such that the elements of this mutable indexed sequence starting at this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds last index where this mutable indexed sequence contains a given sequence as a slice.
Finds last index where this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
the last index such that the elements of this mutable indexed sequence starting a this index
match the elements of sequence that
, or -1
of no such subsequence exists.
Finds index of last element satisfying some predicate before or at given end index.
Finds index of last element satisfying some predicate before or at given end index.
the predicate used to test elements.
the index <= end
of the last element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of last element satisfying some predicate.
Finds index of last element satisfying some predicate.
the predicate used to test elements.
the index of the last element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of last element satisfying some predicate before or at given end index.
Finds index of last element satisfying some predicate before or at given end index.
the predicate used to test elements.
the index <= end
of the last element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of last element satisfying some predicate.
Finds index of last element satisfying some predicate.
the predicate used to test elements.
the index of the last element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of last element satisfying some predicate before or at given end index.
Finds index of last element satisfying some predicate before or at given end index.
the predicate used to test elements.
the index <= end
of the last element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of last element satisfying some predicate.
Finds index of last element satisfying some predicate.
the predicate used to test elements.
the index of the last element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of last element satisfying some predicate before or at given end index.
Finds index of last element satisfying some predicate before or at given end index.
the predicate used to test elements.
the index <= end
of the last element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of last element satisfying some predicate.
Finds index of last element satisfying some predicate.
the predicate used to test elements.
the index of the last element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of last element satisfying some predicate before or at given end index.
Finds index of last element satisfying some predicate before or at given end index.
the predicate used to test elements.
the index <= end
of the last element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of last element satisfying some predicate.
Finds index of last element satisfying some predicate.
the predicate used to test elements.
the index of the last element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of last element satisfying some predicate before or at given end index.
Finds index of last element satisfying some predicate before or at given end index.
the predicate used to test elements.
the index <= end
of the last element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of last element satisfying some predicate.
Finds index of last element satisfying some predicate.
the predicate used to test elements.
the index of the last element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of last element satisfying some predicate before or at given end index.
Finds index of last element satisfying some predicate before or at given end index.
the predicate used to test elements.
the index <= end
of the last element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of last element satisfying some predicate.
Finds index of last element satisfying some predicate.
the predicate used to test elements.
the index of the last element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of last element satisfying some predicate before or at given end index.
Finds index of last element satisfying some predicate before or at given end index.
the predicate used to test elements.
the index <= end
of the last element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of last element satisfying some predicate.
Finds index of last element satisfying some predicate.
the predicate used to test elements.
the index of the last element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of last element satisfying some predicate before or at given end index.
Finds index of last element satisfying some predicate before or at given end index.
the predicate used to test elements.
the index <= end
of the last element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
Finds index of last element satisfying some predicate.
Finds index of last element satisfying some predicate.
the predicate used to test elements.
the index of the last element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
The length of the array
[use case] Builds a new collection by applying a function to all elements of this array.
Builds a new collection by applying a function to all elements of this array.
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given function
f
to each element of this array and collecting the results.
[use case] Builds a new collection by applying a function to all elements of this array.
Builds a new collection by applying a function to all elements of this array.
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given function
f
to each element of this array and collecting the results.
[use case] Builds a new collection by applying a function to all elements of this array.
Builds a new collection by applying a function to all elements of this array.
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given function
f
to each element of this array and collecting the results.
[use case] Builds a new collection by applying a function to all elements of this array.
Builds a new collection by applying a function to all elements of this array.
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given function
f
to each element of this array and collecting the results.
[use case] Builds a new collection by applying a function to all elements of this array.
Builds a new collection by applying a function to all elements of this array.
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given function
f
to each element of this array and collecting the results.
[use case] Builds a new collection by applying a function to all elements of this array.
Builds a new collection by applying a function to all elements of this array.
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given function
f
to each element of this array and collecting the results.
[use case] Builds a new collection by applying a function to all elements of this array.
Builds a new collection by applying a function to all elements of this array.
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given function
f
to each element of this array and collecting the results.
[use case] Builds a new collection by applying a function to all elements of this array.
Builds a new collection by applying a function to all elements of this array.
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given function
f
to each element of this array and collecting the results.
[use case] Builds a new collection by applying a function to all elements of this array.
Builds a new collection by applying a function to all elements of this array.
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given function
f
to each element of this array and collecting the results.
[use case] Builds a new collection by applying a function to all elements of this array.
Builds a new collection by applying a function to all elements of this array.
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given function
f
to each element of this array and collecting the results.
[use case] Builds a new collection by applying a function to all elements of this array.
Builds a new collection by applying a function to all elements of this array.
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given function
f
to each element of this array and collecting the results.
[use case] Finds the first element which yields the largest value measured by function f.
Finds the first element which yields the largest value measured by function f.
The result type of the function f.
The measuring function.
the first element of this array with the largest value measured by function f.
[use case] Finds the first element which yields the largest value measured by function f.
Finds the first element which yields the largest value measured by function f.
The result type of the function f.
The measuring function.
the first element of this array with the largest value measured by function f.
[use case] Finds the first element which yields the largest value measured by function f.
Finds the first element which yields the largest value measured by function f.
The result type of the function f.
The measuring function.
the first element of this array with the largest value measured by function f.
[use case] Finds the first element which yields the largest value measured by function f.
Finds the first element which yields the largest value measured by function f.
The result type of the function f.
The measuring function.
the first element of this array with the largest value measured by function f.
[use case] Finds the first element which yields the largest value measured by function f.
Finds the first element which yields the largest value measured by function f.
The result type of the function f.
The measuring function.
the first element of this array with the largest value measured by function f.
[use case] Finds the first element which yields the largest value measured by function f.
Finds the first element which yields the largest value measured by function f.
The result type of the function f.
The measuring function.
the first element of this array with the largest value measured by function f.
[use case] Finds the first element which yields the largest value measured by function f.
Finds the first element which yields the largest value measured by function f.
The result type of the function f.
The measuring function.
the first element of this array with the largest value measured by function f.
[use case] Finds the first element which yields the largest value measured by function f.
Finds the first element which yields the largest value measured by function f.
The result type of the function f.
The measuring function.
the first element of this array with the largest value measured by function f.
[use case] Finds the first element which yields the largest value measured by function f.
Finds the first element which yields the largest value measured by function f.
The result type of the function f.
The measuring function.
the first element of this array with the largest value measured by function f.
[use case] Finds the first element which yields the largest value measured by function f.
Finds the first element which yields the largest value measured by function f.
The result type of the function f.
The measuring function.
the first element of this array with the largest value measured by function f.
[use case] Finds the first element which yields the largest value measured by function f.
Finds the first element which yields the largest value measured by function f.
The result type of the function f.
The measuring function.
the first element of this array with the largest value measured by function f.
[use case] Finds the first element which yields the smallest value measured by function f.
Finds the first element which yields the smallest value measured by function f.
The result type of the function f.
The measuring function.
the first element of this array with the smallest value measured by function f.
[use case] Finds the first element which yields the smallest value measured by function f.
Finds the first element which yields the smallest value measured by function f.
The result type of the function f.
The measuring function.
the first element of this array with the smallest value measured by function f.
[use case] Finds the first element which yields the smallest value measured by function f.
Finds the first element which yields the smallest value measured by function f.
The result type of the function f.
The measuring function.
the first element of this array with the smallest value measured by function f.
[use case] Finds the first element which yields the smallest value measured by function f.
Finds the first element which yields the smallest value measured by function f.
The result type of the function f.
The measuring function.
the first element of this array with the smallest value measured by function f.
[use case] Finds the first element which yields the smallest value measured by function f.
Finds the first element which yields the smallest value measured by function f.
The result type of the function f.
The measuring function.
the first element of this array with the smallest value measured by function f.
[use case] Finds the first element which yields the smallest value measured by function f.
Finds the first element which yields the smallest value measured by function f.
The result type of the function f.
The measuring function.
the first element of this array with the smallest value measured by function f.
[use case] Finds the first element which yields the smallest value measured by function f.
Finds the first element which yields the smallest value measured by function f.
The result type of the function f.
The measuring function.
the first element of this array with the smallest value measured by function f.
[use case] Finds the first element which yields the smallest value measured by function f.
Finds the first element which yields the smallest value measured by function f.
The result type of the function f.
The measuring function.
the first element of this array with the smallest value measured by function f.
[use case] Finds the first element which yields the smallest value measured by function f.
Finds the first element which yields the smallest value measured by function f.
The result type of the function f.
The measuring function.
the first element of this array with the smallest value measured by function f.
[use case] Finds the first element which yields the smallest value measured by function f.
Finds the first element which yields the smallest value measured by function f.
The result type of the function f.
The measuring function.
the first element of this array with the smallest value measured by function f.
[use case] Finds the first element which yields the smallest value measured by function f.
Finds the first element which yields the smallest value measured by function f.
The result type of the function f.
The measuring function.
the first element of this array with the smallest value measured by function f.
Equivalent to !(this eq that)
.
Equivalent to !(this eq that)
.
true
if the argument is not a reference to the receiver object; false
otherwise.
Wakes up a single thread that is waiting on the receiver object's monitor.
Wakes up a single thread that is waiting on the receiver object's monitor.
not specified by SLS as a member of AnyRef
Wakes up all threads that are waiting on the receiver object's monitor.
Wakes up all threads that are waiting on the receiver object's monitor.
not specified by SLS as a member of AnyRef
Partitions this mutable indexed sequence in two mutable indexed sequences according to a predicate.
Partitions this mutable indexed sequence in two mutable indexed sequences according to a predicate.
the predicate on which to partition.
a pair of mutable indexed sequences: the first mutable indexed sequence consists of all elements that
satisfy the predicate p
and the second mutable indexed sequence consists of all elements
that don't. The relative order of the elements in the resulting mutable indexed sequences
is the same as in the original mutable indexed sequence.
Partitions this mutable indexed sequence in two mutable indexed sequences according to a predicate.
Partitions this mutable indexed sequence in two mutable indexed sequences according to a predicate.
the predicate on which to partition.
a pair of mutable indexed sequences: the first mutable indexed sequence consists of all elements that
satisfy the predicate p
and the second mutable indexed sequence consists of all elements
that don't. The relative order of the elements in the resulting mutable indexed sequences
is the same as in the original mutable indexed sequence.
Partitions this mutable indexed sequence in two mutable indexed sequences according to a predicate.
Partitions this mutable indexed sequence in two mutable indexed sequences according to a predicate.
the predicate on which to partition.
a pair of mutable indexed sequences: the first mutable indexed sequence consists of all elements that
satisfy the predicate p
and the second mutable indexed sequence consists of all elements
that don't. The relative order of the elements in the resulting mutable indexed sequences
is the same as in the original mutable indexed sequence.
Partitions this mutable indexed sequence in two mutable indexed sequences according to a predicate.
Partitions this mutable indexed sequence in two mutable indexed sequences according to a predicate.
the predicate on which to partition.
a pair of mutable indexed sequences: the first mutable indexed sequence consists of all elements that
satisfy the predicate p
and the second mutable indexed sequence consists of all elements
that don't. The relative order of the elements in the resulting mutable indexed sequences
is the same as in the original mutable indexed sequence.
Partitions this mutable indexed sequence in two mutable indexed sequences according to a predicate.
Partitions this mutable indexed sequence in two mutable indexed sequences according to a predicate.
the predicate on which to partition.
a pair of mutable indexed sequences: the first mutable indexed sequence consists of all elements that
satisfy the predicate p
and the second mutable indexed sequence consists of all elements
that don't. The relative order of the elements in the resulting mutable indexed sequences
is the same as in the original mutable indexed sequence.
Partitions this mutable indexed sequence in two mutable indexed sequences according to a predicate.
Partitions this mutable indexed sequence in two mutable indexed sequences according to a predicate.
the predicate on which to partition.
a pair of mutable indexed sequences: the first mutable indexed sequence consists of all elements that
satisfy the predicate p
and the second mutable indexed sequence consists of all elements
that don't. The relative order of the elements in the resulting mutable indexed sequences
is the same as in the original mutable indexed sequence.
Partitions this mutable indexed sequence in two mutable indexed sequences according to a predicate.
Partitions this mutable indexed sequence in two mutable indexed sequences according to a predicate.
the predicate on which to partition.
a pair of mutable indexed sequences: the first mutable indexed sequence consists of all elements that
satisfy the predicate p
and the second mutable indexed sequence consists of all elements
that don't. The relative order of the elements in the resulting mutable indexed sequences
is the same as in the original mutable indexed sequence.
Partitions this mutable indexed sequence in two mutable indexed sequences according to a predicate.
Partitions this mutable indexed sequence in two mutable indexed sequences according to a predicate.
the predicate on which to partition.
a pair of mutable indexed sequences: the first mutable indexed sequence consists of all elements that
satisfy the predicate p
and the second mutable indexed sequence consists of all elements
that don't. The relative order of the elements in the resulting mutable indexed sequences
is the same as in the original mutable indexed sequence.
Partitions this mutable indexed sequence in two mutable indexed sequences according to a predicate.
Partitions this mutable indexed sequence in two mutable indexed sequences according to a predicate.
the predicate on which to partition.
a pair of mutable indexed sequences: the first mutable indexed sequence consists of all elements that
satisfy the predicate p
and the second mutable indexed sequence consists of all elements
that don't. The relative order of the elements in the resulting mutable indexed sequences
is the same as in the original mutable indexed sequence.
Returns the length of the longest prefix whose elements all satisfy some predicate.
Returns the length of the longest prefix whose elements all satisfy some predicate.
the predicate used to test elements.
the length of the longest prefix of this mutable indexed sequence
such that every element of the segment satisfies the predicate p
.
Returns the length of the longest prefix whose elements all satisfy some predicate.
Returns the length of the longest prefix whose elements all satisfy some predicate.
the predicate used to test elements.
the length of the longest prefix of this mutable indexed sequence
such that every element of the segment satisfies the predicate p
.
Returns the length of the longest prefix whose elements all satisfy some predicate.
Returns the length of the longest prefix whose elements all satisfy some predicate.
the predicate used to test elements.
the length of the longest prefix of this mutable indexed sequence
such that every element of the segment satisfies the predicate p
.
Returns the length of the longest prefix whose elements all satisfy some predicate.
Returns the length of the longest prefix whose elements all satisfy some predicate.
the predicate used to test elements.
the length of the longest prefix of this mutable indexed sequence
such that every element of the segment satisfies the predicate p
.
Returns the length of the longest prefix whose elements all satisfy some predicate.
Returns the length of the longest prefix whose elements all satisfy some predicate.
the predicate used to test elements.
the length of the longest prefix of this mutable indexed sequence
such that every element of the segment satisfies the predicate p
.
Returns the length of the longest prefix whose elements all satisfy some predicate.
Returns the length of the longest prefix whose elements all satisfy some predicate.
the predicate used to test elements.
the length of the longest prefix of this mutable indexed sequence
such that every element of the segment satisfies the predicate p
.
Returns the length of the longest prefix whose elements all satisfy some predicate.
Returns the length of the longest prefix whose elements all satisfy some predicate.
the predicate used to test elements.
the length of the longest prefix of this mutable indexed sequence
such that every element of the segment satisfies the predicate p
.
Returns the length of the longest prefix whose elements all satisfy some predicate.
Returns the length of the longest prefix whose elements all satisfy some predicate.
the predicate used to test elements.
the length of the longest prefix of this mutable indexed sequence
such that every element of the segment satisfies the predicate p
.
Returns the length of the longest prefix whose elements all satisfy some predicate.
Returns the length of the longest prefix whose elements all satisfy some predicate.
the predicate used to test elements.
the length of the longest prefix of this mutable indexed sequence
such that every element of the segment satisfies the predicate p
.
Reduces the elements of this mutable indexed sequence using the specified associative binary operator.
Reduces the elements of this mutable indexed sequence using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
A type parameter for the binary operator, a supertype of A
.
A binary operator that must be associative.
The result of applying reduce operator op
between all the elements if the mutable indexed sequence is nonempty.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Reduces the elements of this mutable indexed sequence using the specified associative binary operator.
Reduces the elements of this mutable indexed sequence using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
A type parameter for the binary operator, a supertype of A
.
A binary operator that must be associative.
The result of applying reduce operator op
between all the elements if the mutable indexed sequence is nonempty.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Reduces the elements of this mutable indexed sequence using the specified associative binary operator.
Reduces the elements of this mutable indexed sequence using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
A type parameter for the binary operator, a supertype of A
.
A binary operator that must be associative.
The result of applying reduce operator op
between all the elements if the mutable indexed sequence is nonempty.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Reduces the elements of this mutable indexed sequence using the specified associative binary operator.
Reduces the elements of this mutable indexed sequence using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
A type parameter for the binary operator, a supertype of A
.
A binary operator that must be associative.
The result of applying reduce operator op
between all the elements if the mutable indexed sequence is nonempty.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Reduces the elements of this mutable indexed sequence using the specified associative binary operator.
Reduces the elements of this mutable indexed sequence using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
A type parameter for the binary operator, a supertype of A
.
A binary operator that must be associative.
The result of applying reduce operator op
between all the elements if the mutable indexed sequence is nonempty.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Reduces the elements of this mutable indexed sequence using the specified associative binary operator.
Reduces the elements of this mutable indexed sequence using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
A type parameter for the binary operator, a supertype of A
.
A binary operator that must be associative.
The result of applying reduce operator op
between all the elements if the mutable indexed sequence is nonempty.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Reduces the elements of this mutable indexed sequence using the specified associative binary operator.
Reduces the elements of this mutable indexed sequence using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
A type parameter for the binary operator, a supertype of A
.
A binary operator that must be associative.
The result of applying reduce operator op
between all the elements if the mutable indexed sequence is nonempty.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Reduces the elements of this mutable indexed sequence using the specified associative binary operator.
Reduces the elements of this mutable indexed sequence using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
A type parameter for the binary operator, a supertype of A
.
A binary operator that must be associative.
The result of applying reduce operator op
between all the elements if the mutable indexed sequence is nonempty.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Reduces the elements of this mutable indexed sequence using the specified associative binary operator.
Reduces the elements of this mutable indexed sequence using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
A type parameter for the binary operator, a supertype of A
.
A binary operator that must be associative.
The result of applying reduce operator op
between all the elements if the mutable indexed sequence is nonempty.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Reduces the elements of this mutable indexed sequence using the specified associative binary operator.
Reduces the elements of this mutable indexed sequence using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
A type parameter for the binary operator, a supertype of A
.
A binary operator that must be associative.
The result of applying reduce operator op
between all the elements if the mutable indexed sequence is nonempty.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Reduces the elements of this mutable indexed sequence using the specified associative binary operator.
Reduces the elements of this mutable indexed sequence using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
A type parameter for the binary operator, a supertype of A
.
A binary operator that must be associative.
The result of applying reduce operator op
between all the elements if the mutable indexed sequence is nonempty.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Applies a binary operator to all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right:
op( op( ... op(x_1, x_2) ..., x_{n-1}), x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Applies a binary operator to all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right:
op( op( ... op(x_1, x_2) ..., x_{n-1}), x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Applies a binary operator to all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right:
op( op( ... op(x_1, x_2) ..., x_{n-1}), x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Applies a binary operator to all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right:
op( op( ... op(x_1, x_2) ..., x_{n-1}), x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Applies a binary operator to all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right:
op( op( ... op(x_1, x_2) ..., x_{n-1}), x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Applies a binary operator to all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right:
op( op( ... op(x_1, x_2) ..., x_{n-1}), x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Applies a binary operator to all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right:
op( op( ... op(x_1, x_2) ..., x_{n-1}), x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Applies a binary operator to all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right:
op( op( ... op(x_1, x_2) ..., x_{n-1}), x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Applies a binary operator to all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right:
op( op( ... op(x_1, x_2) ..., x_{n-1}), x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Applies a binary operator to all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right:
op( op( ... op(x_1, x_2) ..., x_{n-1}), x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Applies a binary operator to all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right:
op( op( ... op(x_1, x_2) ..., x_{n-1}), x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going left to right.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the binary operator.
an option value containing the result of reduceLeft(op)
if this mutable indexed sequence is nonempty,
None
otherwise.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going left to right.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the binary operator.
an option value containing the result of reduceLeft(op)
if this mutable indexed sequence is nonempty,
None
otherwise.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going left to right.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the binary operator.
an option value containing the result of reduceLeft(op)
if this mutable indexed sequence is nonempty,
None
otherwise.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going left to right.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the binary operator.
an option value containing the result of reduceLeft(op)
if this mutable indexed sequence is nonempty,
None
otherwise.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going left to right.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the binary operator.
an option value containing the result of reduceLeft(op)
if this mutable indexed sequence is nonempty,
None
otherwise.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going left to right.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the binary operator.
an option value containing the result of reduceLeft(op)
if this mutable indexed sequence is nonempty,
None
otherwise.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going left to right.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the binary operator.
an option value containing the result of reduceLeft(op)
if this mutable indexed sequence is nonempty,
None
otherwise.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going left to right.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the binary operator.
an option value containing the result of reduceLeft(op)
if this mutable indexed sequence is nonempty,
None
otherwise.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going left to right.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the binary operator.
an option value containing the result of reduceLeft(op)
if this mutable indexed sequence is nonempty,
None
otherwise.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going left to right.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the binary operator.
an option value containing the result of reduceLeft(op)
if this mutable indexed sequence is nonempty,
None
otherwise.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going left to right.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the binary operator.
an option value containing the result of reduceLeft(op)
if this mutable indexed sequence is nonempty,
None
otherwise.
Reduces the elements of this mutable indexed sequence, if any, using the specified associative binary operator.
Reduces the elements of this mutable indexed sequence, if any, using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
A type parameter for the binary operator, a supertype of A
.
A binary operator that must be associative.
An option value containing result of applying reduce operator op
between all
the elements if the collection is nonempty, and None
otherwise.
Reduces the elements of this mutable indexed sequence, if any, using the specified associative binary operator.
Reduces the elements of this mutable indexed sequence, if any, using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
A type parameter for the binary operator, a supertype of A
.
A binary operator that must be associative.
An option value containing result of applying reduce operator op
between all
the elements if the collection is nonempty, and None
otherwise.
Reduces the elements of this mutable indexed sequence, if any, using the specified associative binary operator.
Reduces the elements of this mutable indexed sequence, if any, using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
A type parameter for the binary operator, a supertype of A
.
A binary operator that must be associative.
An option value containing result of applying reduce operator op
between all
the elements if the collection is nonempty, and None
otherwise.
Reduces the elements of this mutable indexed sequence, if any, using the specified associative binary operator.
Reduces the elements of this mutable indexed sequence, if any, using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
A type parameter for the binary operator, a supertype of A
.
A binary operator that must be associative.
An option value containing result of applying reduce operator op
between all
the elements if the collection is nonempty, and None
otherwise.
Reduces the elements of this mutable indexed sequence, if any, using the specified associative binary operator.
Reduces the elements of this mutable indexed sequence, if any, using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
A type parameter for the binary operator, a supertype of A
.
A binary operator that must be associative.
An option value containing result of applying reduce operator op
between all
the elements if the collection is nonempty, and None
otherwise.
Reduces the elements of this mutable indexed sequence, if any, using the specified associative binary operator.
Reduces the elements of this mutable indexed sequence, if any, using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
A type parameter for the binary operator, a supertype of A
.
A binary operator that must be associative.
An option value containing result of applying reduce operator op
between all
the elements if the collection is nonempty, and None
otherwise.
Reduces the elements of this mutable indexed sequence, if any, using the specified associative binary operator.
Reduces the elements of this mutable indexed sequence, if any, using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
A type parameter for the binary operator, a supertype of A
.
A binary operator that must be associative.
An option value containing result of applying reduce operator op
between all
the elements if the collection is nonempty, and None
otherwise.
Reduces the elements of this mutable indexed sequence, if any, using the specified associative binary operator.
Reduces the elements of this mutable indexed sequence, if any, using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
A type parameter for the binary operator, a supertype of A
.
A binary operator that must be associative.
An option value containing result of applying reduce operator op
between all
the elements if the collection is nonempty, and None
otherwise.
Reduces the elements of this mutable indexed sequence, if any, using the specified associative binary operator.
Reduces the elements of this mutable indexed sequence, if any, using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
A type parameter for the binary operator, a supertype of A
.
A binary operator that must be associative.
An option value containing result of applying reduce operator op
between all
the elements if the collection is nonempty, and None
otherwise.
Reduces the elements of this mutable indexed sequence, if any, using the specified associative binary operator.
Reduces the elements of this mutable indexed sequence, if any, using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
A type parameter for the binary operator, a supertype of A
.
A binary operator that must be associative.
An option value containing result of applying reduce operator op
between all
the elements if the collection is nonempty, and None
otherwise.
Reduces the elements of this mutable indexed sequence, if any, using the specified associative binary operator.
Reduces the elements of this mutable indexed sequence, if any, using the specified associative binary operator.
The order in which operations are performed on elements is unspecified and may be nondeterministic.
A type parameter for the binary operator, a supertype of A
.
A binary operator that must be associative.
An option value containing result of applying reduce operator op
between all
the elements if the collection is nonempty, and None
otherwise.
Applies a binary operator to all elements of this mutable indexed sequence, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence, going right to left.
the result type of the binary operator.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left:
op(x_1, op(x_2, ..., op(x_{n-1}, x_n)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Applies a binary operator to all elements of this mutable indexed sequence, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence, going right to left.
the result type of the binary operator.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left:
op(x_1, op(x_2, ..., op(x_{n-1}, x_n)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Applies a binary operator to all elements of this mutable indexed sequence, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence, going right to left.
the result type of the binary operator.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left:
op(x_1, op(x_2, ..., op(x_{n-1}, x_n)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Applies a binary operator to all elements of this mutable indexed sequence, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence, going right to left.
the result type of the binary operator.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left:
op(x_1, op(x_2, ..., op(x_{n-1}, x_n)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Applies a binary operator to all elements of this mutable indexed sequence, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence, going right to left.
the result type of the binary operator.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left:
op(x_1, op(x_2, ..., op(x_{n-1}, x_n)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Applies a binary operator to all elements of this mutable indexed sequence, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence, going right to left.
the result type of the binary operator.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left:
op(x_1, op(x_2, ..., op(x_{n-1}, x_n)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Applies a binary operator to all elements of this mutable indexed sequence, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence, going right to left.
the result type of the binary operator.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left:
op(x_1, op(x_2, ..., op(x_{n-1}, x_n)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Applies a binary operator to all elements of this mutable indexed sequence, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence, going right to left.
the result type of the binary operator.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left:
op(x_1, op(x_2, ..., op(x_{n-1}, x_n)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Applies a binary operator to all elements of this mutable indexed sequence, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence, going right to left.
the result type of the binary operator.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left:
op(x_1, op(x_2, ..., op(x_{n-1}, x_n)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Applies a binary operator to all elements of this mutable indexed sequence, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence, going right to left.
the result type of the binary operator.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left:
op(x_1, op(x_2, ..., op(x_{n-1}, x_n)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Applies a binary operator to all elements of this mutable indexed sequence, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence, going right to left.
the result type of the binary operator.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left:
op(x_1, op(x_2, ..., op(x_{n-1}, x_n)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
UnsupportedOperationException
if this mutable indexed sequence is empty.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going right to left.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going right to left.
the result type of the binary operator.
the binary operator.
an option value containing the result of reduceRight(op)
if this mutable indexed sequence is nonempty,
None
otherwise.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going right to left.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going right to left.
the result type of the binary operator.
the binary operator.
an option value containing the result of reduceRight(op)
if this mutable indexed sequence is nonempty,
None
otherwise.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going right to left.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going right to left.
the result type of the binary operator.
the binary operator.
an option value containing the result of reduceRight(op)
if this mutable indexed sequence is nonempty,
None
otherwise.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going right to left.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going right to left.
the result type of the binary operator.
the binary operator.
an option value containing the result of reduceRight(op)
if this mutable indexed sequence is nonempty,
None
otherwise.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going right to left.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going right to left.
the result type of the binary operator.
the binary operator.
an option value containing the result of reduceRight(op)
if this mutable indexed sequence is nonempty,
None
otherwise.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going right to left.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going right to left.
the result type of the binary operator.
the binary operator.
an option value containing the result of reduceRight(op)
if this mutable indexed sequence is nonempty,
None
otherwise.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going right to left.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going right to left.
the result type of the binary operator.
the binary operator.
an option value containing the result of reduceRight(op)
if this mutable indexed sequence is nonempty,
None
otherwise.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going right to left.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going right to left.
the result type of the binary operator.
the binary operator.
an option value containing the result of reduceRight(op)
if this mutable indexed sequence is nonempty,
None
otherwise.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going right to left.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going right to left.
the result type of the binary operator.
the binary operator.
an option value containing the result of reduceRight(op)
if this mutable indexed sequence is nonempty,
None
otherwise.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going right to left.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going right to left.
the result type of the binary operator.
the binary operator.
an option value containing the result of reduceRight(op)
if this mutable indexed sequence is nonempty,
None
otherwise.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going right to left.
Optionally applies a binary operator to all elements of this mutable indexed sequence, going right to left.
the result type of the binary operator.
the binary operator.
an option value containing the result of reduceRight(op)
if this mutable indexed sequence is nonempty,
None
otherwise.
[use case] Builds a new collection by applying a function to all elements of this array and collecting the results in reversed order.
Builds a new collection by applying a function to all elements of this array and collecting the results in reversed order.
Note: xs.reverseMap(f)
is the same as xs.reverse.map(f)
but might be more efficient.
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given function
f
to each element of this array and collecting the results in reversed order.
[use case] Builds a new collection by applying a function to all elements of this array and collecting the results in reversed order.
Builds a new collection by applying a function to all elements of this array and collecting the results in reversed order.
Note: xs.reverseMap(f)
is the same as xs.reverse.map(f)
but might be more efficient.
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given function
f
to each element of this array and collecting the results in reversed order.
[use case] Builds a new collection by applying a function to all elements of this array and collecting the results in reversed order.
Builds a new collection by applying a function to all elements of this array and collecting the results in reversed order.
Note: xs.reverseMap(f)
is the same as xs.reverse.map(f)
but might be more efficient.
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given function
f
to each element of this array and collecting the results in reversed order.
[use case] Builds a new collection by applying a function to all elements of this array and collecting the results in reversed order.
Builds a new collection by applying a function to all elements of this array and collecting the results in reversed order.
Note: xs.reverseMap(f)
is the same as xs.reverse.map(f)
but might be more efficient.
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given function
f
to each element of this array and collecting the results in reversed order.
[use case] Builds a new collection by applying a function to all elements of this array and collecting the results in reversed order.
Builds a new collection by applying a function to all elements of this array and collecting the results in reversed order.
Note: xs.reverseMap(f)
is the same as xs.reverse.map(f)
but might be more efficient.
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given function
f
to each element of this array and collecting the results in reversed order.
[use case] Builds a new collection by applying a function to all elements of this array and collecting the results in reversed order.
Builds a new collection by applying a function to all elements of this array and collecting the results in reversed order.
Note: xs.reverseMap(f)
is the same as xs.reverse.map(f)
but might be more efficient.
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given function
f
to each element of this array and collecting the results in reversed order.
[use case] Builds a new collection by applying a function to all elements of this array and collecting the results in reversed order.
Builds a new collection by applying a function to all elements of this array and collecting the results in reversed order.
Note: xs.reverseMap(f)
is the same as xs.reverse.map(f)
but might be more efficient.
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given function
f
to each element of this array and collecting the results in reversed order.
[use case] Builds a new collection by applying a function to all elements of this array and collecting the results in reversed order.
Builds a new collection by applying a function to all elements of this array and collecting the results in reversed order.
Note: xs.reverseMap(f)
is the same as xs.reverse.map(f)
but might be more efficient.
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given function
f
to each element of this array and collecting the results in reversed order.
[use case] Builds a new collection by applying a function to all elements of this array and collecting the results in reversed order.
Builds a new collection by applying a function to all elements of this array and collecting the results in reversed order.
Note: xs.reverseMap(f)
is the same as xs.reverse.map(f)
but might be more efficient.
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given function
f
to each element of this array and collecting the results in reversed order.
[use case] Builds a new collection by applying a function to all elements of this array and collecting the results in reversed order.
Builds a new collection by applying a function to all elements of this array and collecting the results in reversed order.
Note: xs.reverseMap(f)
is the same as xs.reverse.map(f)
but might be more efficient.
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given function
f
to each element of this array and collecting the results in reversed order.
[use case] Builds a new collection by applying a function to all elements of this array and collecting the results in reversed order.
Builds a new collection by applying a function to all elements of this array and collecting the results in reversed order.
Note: xs.reverseMap(f)
is the same as xs.reverse.map(f)
but might be more efficient.
the element type of the returned collection.
the function to apply to each element.
a new array resulting from applying the given function
f
to each element of this array and collecting the results in reversed order.
Computes a prefix scan of the elements of the collection.
Computes a prefix scan of the elements of the collection.
Note: The neutral element z
may be applied more than once.
element type of the resulting collection
type of the resulting collection
neutral element for the operator op
the associative operator for the scan
combiner factory which provides a combiner
a new mutable indexed sequence containing the prefix scan of the elements in this mutable indexed sequence
Computes a prefix scan of the elements of the collection.
Computes a prefix scan of the elements of the collection.
Note: The neutral element z
may be applied more than once.
element type of the resulting collection
type of the resulting collection
neutral element for the operator op
the associative operator for the scan
combiner factory which provides a combiner
a new mutable indexed sequence containing the prefix scan of the elements in this mutable indexed sequence
Computes a prefix scan of the elements of the collection.
Computes a prefix scan of the elements of the collection.
Note: The neutral element z
may be applied more than once.
element type of the resulting collection
type of the resulting collection
neutral element for the operator op
the associative operator for the scan
combiner factory which provides a combiner
a new mutable indexed sequence containing the prefix scan of the elements in this mutable indexed sequence
Computes a prefix scan of the elements of the collection.
Computes a prefix scan of the elements of the collection.
Note: The neutral element z
may be applied more than once.
element type of the resulting collection
type of the resulting collection
neutral element for the operator op
the associative operator for the scan
combiner factory which provides a combiner
a new mutable indexed sequence containing the prefix scan of the elements in this mutable indexed sequence
Computes a prefix scan of the elements of the collection.
Computes a prefix scan of the elements of the collection.
Note: The neutral element z
may be applied more than once.
element type of the resulting collection
type of the resulting collection
neutral element for the operator op
the associative operator for the scan
combiner factory which provides a combiner
a new mutable indexed sequence containing the prefix scan of the elements in this mutable indexed sequence
Computes a prefix scan of the elements of the collection.
Computes a prefix scan of the elements of the collection.
Note: The neutral element z
may be applied more than once.
element type of the resulting collection
type of the resulting collection
neutral element for the operator op
the associative operator for the scan
combiner factory which provides a combiner
a new mutable indexed sequence containing the prefix scan of the elements in this mutable indexed sequence
Computes a prefix scan of the elements of the collection.
Computes a prefix scan of the elements of the collection.
Note: The neutral element z
may be applied more than once.
element type of the resulting collection
type of the resulting collection
neutral element for the operator op
the associative operator for the scan
combiner factory which provides a combiner
a new mutable indexed sequence containing the prefix scan of the elements in this mutable indexed sequence
Computes a prefix scan of the elements of the collection.
Computes a prefix scan of the elements of the collection.
Note: The neutral element z
may be applied more than once.
element type of the resulting collection
type of the resulting collection
neutral element for the operator op
the associative operator for the scan
combiner factory which provides a combiner
a new mutable indexed sequence containing the prefix scan of the elements in this mutable indexed sequence
Computes a prefix scan of the elements of the collection.
Computes a prefix scan of the elements of the collection.
Note: The neutral element z
may be applied more than once.
element type of the resulting collection
type of the resulting collection
neutral element for the operator op
the associative operator for the scan
combiner factory which provides a combiner
a new mutable indexed sequence containing the prefix scan of the elements in this mutable indexed sequence
Computes a prefix scan of the elements of the collection.
Computes a prefix scan of the elements of the collection.
Note: The neutral element z
may be applied more than once.
element type of the resulting collection
type of the resulting collection
neutral element for the operator op
the associative operator for the scan
combiner factory which provides a combiner
a new mutable indexed sequence containing the prefix scan of the elements in this mutable indexed sequence
Computes a prefix scan of the elements of the collection.
Computes a prefix scan of the elements of the collection.
Note: The neutral element z
may be applied more than once.
element type of the resulting collection
type of the resulting collection
neutral element for the operator op
the associative operator for the scan
combiner factory which provides a combiner
a new mutable indexed sequence containing the prefix scan of the elements in this mutable indexed sequence
Produces a collection containing cumulative results of applying the operator going left to right.
Produces a collection containing cumulative results of applying the operator going left to right.
the type of the elements in the resulting collection
the actual type of the resulting collection
the initial value
the binary operator applied to the intermediate result and the element
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
collection with intermediate results
Produces a collection containing cumulative results of applying the operator going left to right.
Produces a collection containing cumulative results of applying the operator going left to right.
the type of the elements in the resulting collection
the actual type of the resulting collection
the initial value
the binary operator applied to the intermediate result and the element
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
collection with intermediate results
Produces a collection containing cumulative results of applying the operator going left to right.
Produces a collection containing cumulative results of applying the operator going left to right.
the type of the elements in the resulting collection
the actual type of the resulting collection
the initial value
the binary operator applied to the intermediate result and the element
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
collection with intermediate results
Produces a collection containing cumulative results of applying the operator going left to right.
Produces a collection containing cumulative results of applying the operator going left to right.
the type of the elements in the resulting collection
the actual type of the resulting collection
the initial value
the binary operator applied to the intermediate result and the element
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
collection with intermediate results
Produces a collection containing cumulative results of applying the operator going left to right.
Produces a collection containing cumulative results of applying the operator going left to right.
the type of the elements in the resulting collection
the actual type of the resulting collection
the initial value
the binary operator applied to the intermediate result and the element
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
collection with intermediate results
Produces a collection containing cumulative results of applying the operator going left to right.
Produces a collection containing cumulative results of applying the operator going left to right.
the type of the elements in the resulting collection
the actual type of the resulting collection
the initial value
the binary operator applied to the intermediate result and the element
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
collection with intermediate results
Produces a collection containing cumulative results of applying the operator going left to right.
Produces a collection containing cumulative results of applying the operator going left to right.
the type of the elements in the resulting collection
the actual type of the resulting collection
the initial value
the binary operator applied to the intermediate result and the element
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
collection with intermediate results
Produces a collection containing cumulative results of applying the operator going left to right.
Produces a collection containing cumulative results of applying the operator going left to right.
the type of the elements in the resulting collection
the actual type of the resulting collection
the initial value
the binary operator applied to the intermediate result and the element
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
collection with intermediate results
Produces a collection containing cumulative results of applying the operator going left to right.
Produces a collection containing cumulative results of applying the operator going left to right.
the type of the elements in the resulting collection
the actual type of the resulting collection
the initial value
the binary operator applied to the intermediate result and the element
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
collection with intermediate results
Produces a collection containing cumulative results of applying the operator going right to left.
Produces a collection containing cumulative results of applying the operator going right to left. The head of the collection is the last cumulative result.
Example:
List(1, 2, 3, 4).scanRight(0)(_ + _) == List(10, 9, 7, 4, 0)
the type of the elements in the resulting collection
the actual type of the resulting collection
the initial value
the binary operator applied to the intermediate result and the element
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
collection with intermediate results
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
Produces a collection containing cumulative results of applying the operator going right to left.
Produces a collection containing cumulative results of applying the operator going right to left. The head of the collection is the last cumulative result.
Example:
List(1, 2, 3, 4).scanRight(0)(_ + _) == List(10, 9, 7, 4, 0)
the type of the elements in the resulting collection
the actual type of the resulting collection
the initial value
the binary operator applied to the intermediate result and the element
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
collection with intermediate results
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
Produces a collection containing cumulative results of applying the operator going right to left.
Produces a collection containing cumulative results of applying the operator going right to left. The head of the collection is the last cumulative result.
Example:
List(1, 2, 3, 4).scanRight(0)(_ + _) == List(10, 9, 7, 4, 0)
the type of the elements in the resulting collection
the actual type of the resulting collection
the initial value
the binary operator applied to the intermediate result and the element
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
collection with intermediate results
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
Produces a collection containing cumulative results of applying the operator going right to left.
Produces a collection containing cumulative results of applying the operator going right to left. The head of the collection is the last cumulative result.
Example:
List(1, 2, 3, 4).scanRight(0)(_ + _) == List(10, 9, 7, 4, 0)
the type of the elements in the resulting collection
the actual type of the resulting collection
the initial value
the binary operator applied to the intermediate result and the element
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
collection with intermediate results
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
Produces a collection containing cumulative results of applying the operator going right to left.
Produces a collection containing cumulative results of applying the operator going right to left. The head of the collection is the last cumulative result.
Example:
List(1, 2, 3, 4).scanRight(0)(_ + _) == List(10, 9, 7, 4, 0)
the type of the elements in the resulting collection
the actual type of the resulting collection
the initial value
the binary operator applied to the intermediate result and the element
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
collection with intermediate results
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
Produces a collection containing cumulative results of applying the operator going right to left.
Produces a collection containing cumulative results of applying the operator going right to left. The head of the collection is the last cumulative result.
Example:
List(1, 2, 3, 4).scanRight(0)(_ + _) == List(10, 9, 7, 4, 0)
the type of the elements in the resulting collection
the actual type of the resulting collection
the initial value
the binary operator applied to the intermediate result and the element
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
collection with intermediate results
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
Produces a collection containing cumulative results of applying the operator going right to left.
Produces a collection containing cumulative results of applying the operator going right to left. The head of the collection is the last cumulative result.
Example:
List(1, 2, 3, 4).scanRight(0)(_ + _) == List(10, 9, 7, 4, 0)
the type of the elements in the resulting collection
the actual type of the resulting collection
the initial value
the binary operator applied to the intermediate result and the element
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
collection with intermediate results
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
Produces a collection containing cumulative results of applying the operator going right to left.
Produces a collection containing cumulative results of applying the operator going right to left. The head of the collection is the last cumulative result.
Example:
List(1, 2, 3, 4).scanRight(0)(_ + _) == List(10, 9, 7, 4, 0)
the type of the elements in the resulting collection
the actual type of the resulting collection
the initial value
the binary operator applied to the intermediate result and the element
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
collection with intermediate results
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
Produces a collection containing cumulative results of applying the operator going right to left.
Produces a collection containing cumulative results of applying the operator going right to left. The head of the collection is the last cumulative result.
Example:
List(1, 2, 3, 4).scanRight(0)(_ + _) == List(10, 9, 7, 4, 0)
the type of the elements in the resulting collection
the actual type of the resulting collection
the initial value
the binary operator applied to the intermediate result and the element
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
collection with intermediate results
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
Computes length of longest segment whose elements all satisfy some predicate.
Computes length of longest segment whose elements all satisfy some predicate.
the predicate used to test elements.
the index where the search starts.
the length of the longest segment of this mutable indexed sequence starting from index from
such that every element of the segment satisfies the predicate p
.
Computes length of longest segment whose elements all satisfy some predicate.
Computes length of longest segment whose elements all satisfy some predicate.
the predicate used to test elements.
the index where the search starts.
the length of the longest segment of this mutable indexed sequence starting from index from
such that every element of the segment satisfies the predicate p
.
Computes length of longest segment whose elements all satisfy some predicate.
Computes length of longest segment whose elements all satisfy some predicate.
the predicate used to test elements.
the index where the search starts.
the length of the longest segment of this mutable indexed sequence starting from index from
such that every element of the segment satisfies the predicate p
.
Computes length of longest segment whose elements all satisfy some predicate.
Computes length of longest segment whose elements all satisfy some predicate.
the predicate used to test elements.
the index where the search starts.
the length of the longest segment of this mutable indexed sequence starting from index from
such that every element of the segment satisfies the predicate p
.
Computes length of longest segment whose elements all satisfy some predicate.
Computes length of longest segment whose elements all satisfy some predicate.
the predicate used to test elements.
the index where the search starts.
the length of the longest segment of this mutable indexed sequence starting from index from
such that every element of the segment satisfies the predicate p
.
Computes length of longest segment whose elements all satisfy some predicate.
Computes length of longest segment whose elements all satisfy some predicate.
the predicate used to test elements.
the index where the search starts.
the length of the longest segment of this mutable indexed sequence starting from index from
such that every element of the segment satisfies the predicate p
.
Computes length of longest segment whose elements all satisfy some predicate.
Computes length of longest segment whose elements all satisfy some predicate.
the predicate used to test elements.
the index where the search starts.
the length of the longest segment of this mutable indexed sequence starting from index from
such that every element of the segment satisfies the predicate p
.
Computes length of longest segment whose elements all satisfy some predicate.
Computes length of longest segment whose elements all satisfy some predicate.
the predicate used to test elements.
the index where the search starts.
the length of the longest segment of this mutable indexed sequence starting from index from
such that every element of the segment satisfies the predicate p
.
Computes length of longest segment whose elements all satisfy some predicate.
Computes length of longest segment whose elements all satisfy some predicate.
the predicate used to test elements.
the index where the search starts.
the length of the longest segment of this mutable indexed sequence starting from index from
such that every element of the segment satisfies the predicate p
.
Sorts this Array
according to the Ordering which results from transforming
an implicitly given Ordering with a transformation function.
Sorts this Array
according to the Ordering which results from transforming
an implicitly given Ordering with a transformation function.
the target type of the transformation f
, and the type where
the ordering ord
is defined.
the transformation function mapping elements
to some other domain B
.
the ordering assumed on domain B
.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the ordering where x < y
if
ord.lt(f(x), f(y))
.
val words = "The quick brown fox jumped over the lazy dog".split(' ') // this works because scala.Ordering will implicitly provide an Ordering[Tuple2[Int, Char]] words.sortBy(x => (x.length, x.head)) res0: Array[String] = Array(The, dog, fox, the, lazy, over, brown, quick, jumped)
Sorts this Array
according to the Ordering which results from transforming
an implicitly given Ordering with a transformation function.
Sorts this Array
according to the Ordering which results from transforming
an implicitly given Ordering with a transformation function.
the target type of the transformation f
, and the type where
the ordering ord
is defined.
the transformation function mapping elements
to some other domain B
.
the ordering assumed on domain B
.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the ordering where x < y
if
ord.lt(f(x), f(y))
.
val words = "The quick brown fox jumped over the lazy dog".split(' ') // this works because scala.Ordering will implicitly provide an Ordering[Tuple2[Int, Char]] words.sortBy(x => (x.length, x.head)) res0: Array[String] = Array(The, dog, fox, the, lazy, over, brown, quick, jumped)
Sorts this Array
according to the Ordering which results from transforming
an implicitly given Ordering with a transformation function.
Sorts this Array
according to the Ordering which results from transforming
an implicitly given Ordering with a transformation function.
the target type of the transformation f
, and the type where
the ordering ord
is defined.
the transformation function mapping elements
to some other domain B
.
the ordering assumed on domain B
.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the ordering where x < y
if
ord.lt(f(x), f(y))
.
val words = "The quick brown fox jumped over the lazy dog".split(' ') // this works because scala.Ordering will implicitly provide an Ordering[Tuple2[Int, Char]] words.sortBy(x => (x.length, x.head)) res0: Array[String] = Array(The, dog, fox, the, lazy, over, brown, quick, jumped)
Sorts this Array
according to the Ordering which results from transforming
an implicitly given Ordering with a transformation function.
Sorts this Array
according to the Ordering which results from transforming
an implicitly given Ordering with a transformation function.
the target type of the transformation f
, and the type where
the ordering ord
is defined.
the transformation function mapping elements
to some other domain B
.
the ordering assumed on domain B
.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the ordering where x < y
if
ord.lt(f(x), f(y))
.
val words = "The quick brown fox jumped over the lazy dog".split(' ') // this works because scala.Ordering will implicitly provide an Ordering[Tuple2[Int, Char]] words.sortBy(x => (x.length, x.head)) res0: Array[String] = Array(The, dog, fox, the, lazy, over, brown, quick, jumped)
Sorts this Array
according to the Ordering which results from transforming
an implicitly given Ordering with a transformation function.
Sorts this Array
according to the Ordering which results from transforming
an implicitly given Ordering with a transformation function.
the target type of the transformation f
, and the type where
the ordering ord
is defined.
the transformation function mapping elements
to some other domain B
.
the ordering assumed on domain B
.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the ordering where x < y
if
ord.lt(f(x), f(y))
.
val words = "The quick brown fox jumped over the lazy dog".split(' ') // this works because scala.Ordering will implicitly provide an Ordering[Tuple2[Int, Char]] words.sortBy(x => (x.length, x.head)) res0: Array[String] = Array(The, dog, fox, the, lazy, over, brown, quick, jumped)
Sorts this Array
according to the Ordering which results from transforming
an implicitly given Ordering with a transformation function.
Sorts this Array
according to the Ordering which results from transforming
an implicitly given Ordering with a transformation function.
the target type of the transformation f
, and the type where
the ordering ord
is defined.
the transformation function mapping elements
to some other domain B
.
the ordering assumed on domain B
.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the ordering where x < y
if
ord.lt(f(x), f(y))
.
val words = "The quick brown fox jumped over the lazy dog".split(' ') // this works because scala.Ordering will implicitly provide an Ordering[Tuple2[Int, Char]] words.sortBy(x => (x.length, x.head)) res0: Array[String] = Array(The, dog, fox, the, lazy, over, brown, quick, jumped)
Sorts this Array
according to the Ordering which results from transforming
an implicitly given Ordering with a transformation function.
Sorts this Array
according to the Ordering which results from transforming
an implicitly given Ordering with a transformation function.
the target type of the transformation f
, and the type where
the ordering ord
is defined.
the transformation function mapping elements
to some other domain B
.
the ordering assumed on domain B
.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the ordering where x < y
if
ord.lt(f(x), f(y))
.
val words = "The quick brown fox jumped over the lazy dog".split(' ') // this works because scala.Ordering will implicitly provide an Ordering[Tuple2[Int, Char]] words.sortBy(x => (x.length, x.head)) res0: Array[String] = Array(The, dog, fox, the, lazy, over, brown, quick, jumped)
Sorts this Array
according to the Ordering which results from transforming
an implicitly given Ordering with a transformation function.
Sorts this Array
according to the Ordering which results from transforming
an implicitly given Ordering with a transformation function.
the target type of the transformation f
, and the type where
the ordering ord
is defined.
the transformation function mapping elements
to some other domain B
.
the ordering assumed on domain B
.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the ordering where x < y
if
ord.lt(f(x), f(y))
.
val words = "The quick brown fox jumped over the lazy dog".split(' ') // this works because scala.Ordering will implicitly provide an Ordering[Tuple2[Int, Char]] words.sortBy(x => (x.length, x.head)) res0: Array[String] = Array(The, dog, fox, the, lazy, over, brown, quick, jumped)
Sorts this Array
according to the Ordering which results from transforming
an implicitly given Ordering with a transformation function.
Sorts this Array
according to the Ordering which results from transforming
an implicitly given Ordering with a transformation function.
the target type of the transformation f
, and the type where
the ordering ord
is defined.
the transformation function mapping elements
to some other domain B
.
the ordering assumed on domain B
.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the ordering where x < y
if
ord.lt(f(x), f(y))
.
val words = "The quick brown fox jumped over the lazy dog".split(' ') // this works because scala.Ordering will implicitly provide an Ordering[Tuple2[Int, Char]] words.sortBy(x => (x.length, x.head)) res0: Array[String] = Array(The, dog, fox, the, lazy, over, brown, quick, jumped)
Sorts this mutable indexed sequence according to a comparison function.
Sorts this mutable indexed sequence according to a comparison function.
The sort is stable. That is, elements that are equal (as determined by
lt
) appear in the same order in the sorted sequence as in the original.
the comparison function which tests whether its first argument precedes its second argument in the desired ordering.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the comparison function lt
.
List("Steve", "Tom", "John", "Bob").sortWith(_.compareTo(_) < 0) = List("Bob", "John", "Steve", "Tom")
Sorts this mutable indexed sequence according to a comparison function.
Sorts this mutable indexed sequence according to a comparison function.
The sort is stable. That is, elements that are equal (as determined by
lt
) appear in the same order in the sorted sequence as in the original.
the comparison function which tests whether its first argument precedes its second argument in the desired ordering.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the comparison function lt
.
List("Steve", "Tom", "John", "Bob").sortWith(_.compareTo(_) < 0) = List("Bob", "John", "Steve", "Tom")
Sorts this mutable indexed sequence according to a comparison function.
Sorts this mutable indexed sequence according to a comparison function.
The sort is stable. That is, elements that are equal (as determined by
lt
) appear in the same order in the sorted sequence as in the original.
the comparison function which tests whether its first argument precedes its second argument in the desired ordering.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the comparison function lt
.
List("Steve", "Tom", "John", "Bob").sortWith(_.compareTo(_) < 0) = List("Bob", "John", "Steve", "Tom")
Sorts this mutable indexed sequence according to a comparison function.
Sorts this mutable indexed sequence according to a comparison function.
The sort is stable. That is, elements that are equal (as determined by
lt
) appear in the same order in the sorted sequence as in the original.
the comparison function which tests whether its first argument precedes its second argument in the desired ordering.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the comparison function lt
.
List("Steve", "Tom", "John", "Bob").sortWith(_.compareTo(_) < 0) = List("Bob", "John", "Steve", "Tom")
Sorts this mutable indexed sequence according to a comparison function.
Sorts this mutable indexed sequence according to a comparison function.
The sort is stable. That is, elements that are equal (as determined by
lt
) appear in the same order in the sorted sequence as in the original.
the comparison function which tests whether its first argument precedes its second argument in the desired ordering.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the comparison function lt
.
List("Steve", "Tom", "John", "Bob").sortWith(_.compareTo(_) < 0) = List("Bob", "John", "Steve", "Tom")
Sorts this mutable indexed sequence according to a comparison function.
Sorts this mutable indexed sequence according to a comparison function.
The sort is stable. That is, elements that are equal (as determined by
lt
) appear in the same order in the sorted sequence as in the original.
the comparison function which tests whether its first argument precedes its second argument in the desired ordering.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the comparison function lt
.
List("Steve", "Tom", "John", "Bob").sortWith(_.compareTo(_) < 0) = List("Bob", "John", "Steve", "Tom")
Sorts this mutable indexed sequence according to a comparison function.
Sorts this mutable indexed sequence according to a comparison function.
The sort is stable. That is, elements that are equal (as determined by
lt
) appear in the same order in the sorted sequence as in the original.
the comparison function which tests whether its first argument precedes its second argument in the desired ordering.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the comparison function lt
.
List("Steve", "Tom", "John", "Bob").sortWith(_.compareTo(_) < 0) = List("Bob", "John", "Steve", "Tom")
Sorts this mutable indexed sequence according to a comparison function.
Sorts this mutable indexed sequence according to a comparison function.
The sort is stable. That is, elements that are equal (as determined by
lt
) appear in the same order in the sorted sequence as in the original.
the comparison function which tests whether its first argument precedes its second argument in the desired ordering.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the comparison function lt
.
List("Steve", "Tom", "John", "Bob").sortWith(_.compareTo(_) < 0) = List("Bob", "John", "Steve", "Tom")
Sorts this mutable indexed sequence according to a comparison function.
Sorts this mutable indexed sequence according to a comparison function.
The sort is stable. That is, elements that are equal (as determined by
lt
) appear in the same order in the sorted sequence as in the original.
the comparison function which tests whether its first argument precedes its second argument in the desired ordering.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the comparison function lt
.
List("Steve", "Tom", "John", "Bob").sortWith(_.compareTo(_) < 0) = List("Bob", "John", "Steve", "Tom")
Sorts this mutable indexed sequence according to an Ordering.
Sorts this mutable indexed sequence according to an Ordering.
The sort is stable. That is, elements that are equal (as determined by
lt
) appear in the same order in the sorted sequence as in the original.
the ordering to be used to compare elements.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the ordering ord
.
Sorts this mutable indexed sequence according to an Ordering.
Sorts this mutable indexed sequence according to an Ordering.
The sort is stable. That is, elements that are equal (as determined by
lt
) appear in the same order in the sorted sequence as in the original.
the ordering to be used to compare elements.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the ordering ord
.
Sorts this mutable indexed sequence according to an Ordering.
Sorts this mutable indexed sequence according to an Ordering.
The sort is stable. That is, elements that are equal (as determined by
lt
) appear in the same order in the sorted sequence as in the original.
the ordering to be used to compare elements.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the ordering ord
.
Sorts this mutable indexed sequence according to an Ordering.
Sorts this mutable indexed sequence according to an Ordering.
The sort is stable. That is, elements that are equal (as determined by
lt
) appear in the same order in the sorted sequence as in the original.
the ordering to be used to compare elements.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the ordering ord
.
Sorts this mutable indexed sequence according to an Ordering.
Sorts this mutable indexed sequence according to an Ordering.
The sort is stable. That is, elements that are equal (as determined by
lt
) appear in the same order in the sorted sequence as in the original.
the ordering to be used to compare elements.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the ordering ord
.
Sorts this mutable indexed sequence according to an Ordering.
Sorts this mutable indexed sequence according to an Ordering.
The sort is stable. That is, elements that are equal (as determined by
lt
) appear in the same order in the sorted sequence as in the original.
the ordering to be used to compare elements.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the ordering ord
.
Sorts this mutable indexed sequence according to an Ordering.
Sorts this mutable indexed sequence according to an Ordering.
The sort is stable. That is, elements that are equal (as determined by
lt
) appear in the same order in the sorted sequence as in the original.
the ordering to be used to compare elements.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the ordering ord
.
Sorts this mutable indexed sequence according to an Ordering.
Sorts this mutable indexed sequence according to an Ordering.
The sort is stable. That is, elements that are equal (as determined by
lt
) appear in the same order in the sorted sequence as in the original.
the ordering to be used to compare elements.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the ordering ord
.
Sorts this mutable indexed sequence according to an Ordering.
Sorts this mutable indexed sequence according to an Ordering.
The sort is stable. That is, elements that are equal (as determined by
lt
) appear in the same order in the sorted sequence as in the original.
the ordering to be used to compare elements.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the ordering ord
.
Sorts this mutable indexed sequence according to an Ordering.
Sorts this mutable indexed sequence according to an Ordering.
The sort is stable. That is, elements that are equal (as determined by
lt
) appear in the same order in the sorted sequence as in the original.
the ordering to be used to compare elements.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the ordering ord
.
Sorts this mutable indexed sequence according to an Ordering.
Sorts this mutable indexed sequence according to an Ordering.
The sort is stable. That is, elements that are equal (as determined by
lt
) appear in the same order in the sorted sequence as in the original.
the ordering to be used to compare elements.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the ordering ord
.
Splits this mutable indexed sequence into a prefix/suffix pair according to a predicate.
Splits this mutable indexed sequence into a prefix/suffix pair according to a predicate.
Note: c span p
is equivalent to (but possibly more efficient than)
(c takeWhile p, c dropWhile p)
, provided the evaluation of the
predicate p
does not cause any side-effects.
a pair consisting of the longest prefix of this mutable indexed sequence whose
elements all satisfy p
, and the rest of this mutable indexed sequence.
Splits this mutable indexed sequence into a prefix/suffix pair according to a predicate.
Splits this mutable indexed sequence into a prefix/suffix pair according to a predicate.
Note: c span p
is equivalent to (but possibly more efficient than)
(c takeWhile p, c dropWhile p)
, provided the evaluation of the
predicate p
does not cause any side-effects.
a pair consisting of the longest prefix of this mutable indexed sequence whose
elements all satisfy p
, and the rest of this mutable indexed sequence.
Splits this mutable indexed sequence into a prefix/suffix pair according to a predicate.
Splits this mutable indexed sequence into a prefix/suffix pair according to a predicate.
Note: c span p
is equivalent to (but possibly more efficient than)
(c takeWhile p, c dropWhile p)
, provided the evaluation of the
predicate p
does not cause any side-effects.
a pair consisting of the longest prefix of this mutable indexed sequence whose
elements all satisfy p
, and the rest of this mutable indexed sequence.
Splits this mutable indexed sequence into a prefix/suffix pair according to a predicate.
Splits this mutable indexed sequence into a prefix/suffix pair according to a predicate.
Note: c span p
is equivalent to (but possibly more efficient than)
(c takeWhile p, c dropWhile p)
, provided the evaluation of the
predicate p
does not cause any side-effects.
a pair consisting of the longest prefix of this mutable indexed sequence whose
elements all satisfy p
, and the rest of this mutable indexed sequence.
Splits this mutable indexed sequence into a prefix/suffix pair according to a predicate.
Splits this mutable indexed sequence into a prefix/suffix pair according to a predicate.
Note: c span p
is equivalent to (but possibly more efficient than)
(c takeWhile p, c dropWhile p)
, provided the evaluation of the
predicate p
does not cause any side-effects.
a pair consisting of the longest prefix of this mutable indexed sequence whose
elements all satisfy p
, and the rest of this mutable indexed sequence.
Splits this mutable indexed sequence into a prefix/suffix pair according to a predicate.
Splits this mutable indexed sequence into a prefix/suffix pair according to a predicate.
Note: c span p
is equivalent to (but possibly more efficient than)
(c takeWhile p, c dropWhile p)
, provided the evaluation of the
predicate p
does not cause any side-effects.
a pair consisting of the longest prefix of this mutable indexed sequence whose
elements all satisfy p
, and the rest of this mutable indexed sequence.
Splits this mutable indexed sequence into a prefix/suffix pair according to a predicate.
Splits this mutable indexed sequence into a prefix/suffix pair according to a predicate.
Note: c span p
is equivalent to (but possibly more efficient than)
(c takeWhile p, c dropWhile p)
, provided the evaluation of the
predicate p
does not cause any side-effects.
a pair consisting of the longest prefix of this mutable indexed sequence whose
elements all satisfy p
, and the rest of this mutable indexed sequence.
Splits this mutable indexed sequence into a prefix/suffix pair according to a predicate.
Splits this mutable indexed sequence into a prefix/suffix pair according to a predicate.
Note: c span p
is equivalent to (but possibly more efficient than)
(c takeWhile p, c dropWhile p)
, provided the evaluation of the
predicate p
does not cause any side-effects.
a pair consisting of the longest prefix of this mutable indexed sequence whose
elements all satisfy p
, and the rest of this mutable indexed sequence.
Splits this mutable indexed sequence into a prefix/suffix pair according to a predicate.
Splits this mutable indexed sequence into a prefix/suffix pair according to a predicate.
Note: c span p
is equivalent to (but possibly more efficient than)
(c takeWhile p, c dropWhile p)
, provided the evaluation of the
predicate p
does not cause any side-effects.
a pair consisting of the longest prefix of this mutable indexed sequence whose
elements all satisfy p
, and the rest of this mutable indexed sequence.
Takes longest prefix of elements that satisfy a predicate.
Takes longest prefix of elements that satisfy a predicate.
the longest prefix of this mutable indexed sequence whose elements all satisfy
the predicate p
.
Takes longest prefix of elements that satisfy a predicate.
Takes longest prefix of elements that satisfy a predicate.
the longest prefix of this mutable indexed sequence whose elements all satisfy
the predicate p
.
Takes longest prefix of elements that satisfy a predicate.
Takes longest prefix of elements that satisfy a predicate.
the longest prefix of this mutable indexed sequence whose elements all satisfy
the predicate p
.
Takes longest prefix of elements that satisfy a predicate.
Takes longest prefix of elements that satisfy a predicate.
the longest prefix of this mutable indexed sequence whose elements all satisfy
the predicate p
.
Takes longest prefix of elements that satisfy a predicate.
Takes longest prefix of elements that satisfy a predicate.
the longest prefix of this mutable indexed sequence whose elements all satisfy
the predicate p
.
Takes longest prefix of elements that satisfy a predicate.
Takes longest prefix of elements that satisfy a predicate.
the longest prefix of this mutable indexed sequence whose elements all satisfy
the predicate p
.
Takes longest prefix of elements that satisfy a predicate.
Takes longest prefix of elements that satisfy a predicate.
the longest prefix of this mutable indexed sequence whose elements all satisfy
the predicate p
.
Takes longest prefix of elements that satisfy a predicate.
Takes longest prefix of elements that satisfy a predicate.
the longest prefix of this mutable indexed sequence whose elements all satisfy
the predicate p
.
Takes longest prefix of elements that satisfy a predicate.
Takes longest prefix of elements that satisfy a predicate.
the longest prefix of this mutable indexed sequence whose elements all satisfy
the predicate p
.
Creates a String representation of this object.
Creates a String representation of this object. The default representation is platform dependent. On the java platform it is the concatenation of the class name, "@", and the object's hashcode in hexadecimal.
a String representation of the object.
Transposes a two dimensional array.
Transposes a two dimensional array.
Type of row elements.
A function that converts elements of this array to rows - arrays of type U
.
An array obtained by replacing elements of this arrays with rows the represent.
Transposes a two dimensional array.
Transposes a two dimensional array.
Type of row elements.
A function that converts elements of this array to rows - arrays of type U
.
An array obtained by replacing elements of this arrays with rows the represent.
Transposes a two dimensional array.
Transposes a two dimensional array.
Type of row elements.
A function that converts elements of this array to rows - arrays of type U
.
An array obtained by replacing elements of this arrays with rows the represent.
Transposes a two dimensional array.
Transposes a two dimensional array.
Type of row elements.
A function that converts elements of this array to rows - arrays of type U
.
An array obtained by replacing elements of this arrays with rows the represent.
Transposes a two dimensional array.
Transposes a two dimensional array.
Type of row elements.
A function that converts elements of this array to rows - arrays of type U
.
An array obtained by replacing elements of this arrays with rows the represent.
Transposes a two dimensional array.
Transposes a two dimensional array.
Type of row elements.
A function that converts elements of this array to rows - arrays of type U
.
An array obtained by replacing elements of this arrays with rows the represent.
Transposes a two dimensional array.
Transposes a two dimensional array.
Type of row elements.
A function that converts elements of this array to rows - arrays of type U
.
An array obtained by replacing elements of this arrays with rows the represent.
Transposes a two dimensional array.
Transposes a two dimensional array.
Type of row elements.
A function that converts elements of this array to rows - arrays of type U
.
An array obtained by replacing elements of this arrays with rows the represent.
Transposes a two dimensional array.
Transposes a two dimensional array.
Type of row elements.
A function that converts elements of this array to rows - arrays of type U
.
An array obtained by replacing elements of this arrays with rows the represent.
[use case] Produces a new sequence which contains all elements of this array and also all elements of a given sequence.
Produces a new sequence which contains all elements of this array and also all elements of
a given sequence. xs union ys
is equivalent to xs ++ ys
.
Another way to express this
is that xs union ys
computes the order-preserving multi-set union of xs
and ys
.
union
is hence a counter-part of diff
and intersect
which also work on multi-sets.
the sequence to add.
a new array which contains all elements of this array
followed by all elements of that
.
[use case] Produces a new sequence which contains all elements of this array and also all elements of a given sequence.
Produces a new sequence which contains all elements of this array and also all elements of
a given sequence. xs union ys
is equivalent to xs ++ ys
.
Another way to express this
is that xs union ys
computes the order-preserving multi-set union of xs
and ys
.
union
is hence a counter-part of diff
and intersect
which also work on multi-sets.
the sequence to add.
a new array which contains all elements of this array
followed by all elements of that
.
[use case] Produces a new sequence which contains all elements of this array and also all elements of a given sequence.
Produces a new sequence which contains all elements of this array and also all elements of
a given sequence. xs union ys
is equivalent to xs ++ ys
.
Another way to express this
is that xs union ys
computes the order-preserving multi-set union of xs
and ys
.
union
is hence a counter-part of diff
and intersect
which also work on multi-sets.
the sequence to add.
a new array which contains all elements of this array
followed by all elements of that
.
[use case] Produces a new sequence which contains all elements of this array and also all elements of a given sequence.
Produces a new sequence which contains all elements of this array and also all elements of
a given sequence. xs union ys
is equivalent to xs ++ ys
.
Another way to express this
is that xs union ys
computes the order-preserving multi-set union of xs
and ys
.
union
is hence a counter-part of diff
and intersect
which also work on multi-sets.
the sequence to add.
a new array which contains all elements of this array
followed by all elements of that
.
[use case] Produces a new sequence which contains all elements of this array and also all elements of a given sequence.
Produces a new sequence which contains all elements of this array and also all elements of
a given sequence. xs union ys
is equivalent to xs ++ ys
.
Another way to express this
is that xs union ys
computes the order-preserving multi-set union of xs
and ys
.
union
is hence a counter-part of diff
and intersect
which also work on multi-sets.
the sequence to add.
a new array which contains all elements of this array
followed by all elements of that
.
[use case] Produces a new sequence which contains all elements of this array and also all elements of a given sequence.
Produces a new sequence which contains all elements of this array and also all elements of
a given sequence. xs union ys
is equivalent to xs ++ ys
.
Another way to express this
is that xs union ys
computes the order-preserving multi-set union of xs
and ys
.
union
is hence a counter-part of diff
and intersect
which also work on multi-sets.
the sequence to add.
a new array which contains all elements of this array
followed by all elements of that
.
[use case] Produces a new sequence which contains all elements of this array and also all elements of a given sequence.
Produces a new sequence which contains all elements of this array and also all elements of
a given sequence. xs union ys
is equivalent to xs ++ ys
.
Another way to express this
is that xs union ys
computes the order-preserving multi-set union of xs
and ys
.
union
is hence a counter-part of diff
and intersect
which also work on multi-sets.
the sequence to add.
a new array which contains all elements of this array
followed by all elements of that
.
[use case] Produces a new sequence which contains all elements of this array and also all elements of a given sequence.
Produces a new sequence which contains all elements of this array and also all elements of
a given sequence. xs union ys
is equivalent to xs ++ ys
.
Another way to express this
is that xs union ys
computes the order-preserving multi-set union of xs
and ys
.
union
is hence a counter-part of diff
and intersect
which also work on multi-sets.
the sequence to add.
a new array which contains all elements of this array
followed by all elements of that
.
[use case] Produces a new sequence which contains all elements of this array and also all elements of a given sequence.
Produces a new sequence which contains all elements of this array and also all elements of
a given sequence. xs union ys
is equivalent to xs ++ ys
.
Another way to express this
is that xs union ys
computes the order-preserving multi-set union of xs
and ys
.
union
is hence a counter-part of diff
and intersect
which also work on multi-sets.
the sequence to add.
a new array which contains all elements of this array
followed by all elements of that
.
Converts an array of pairs into an array of first elements and an array of second elements.
Converts an array of pairs into an array of first elements and an array of second elements.
the type of the first half of the element pairs
the type of the second half of the element pairs
an implicit conversion which asserts that the element type of this Array is a pair.
a class tag for T1 type parameter that is required to create an instance of Array[T1]
a class tag for T2 type parameter that is required to create an instance of Array[T2]
a pair of Arrays, containing, respectively, the first and second half of each element pair of this Array.
Converts an array of pairs into an array of first elements and an array of second elements.
Converts an array of pairs into an array of first elements and an array of second elements.
the type of the first half of the element pairs
the type of the second half of the element pairs
an implicit conversion which asserts that the element type of this Array is a pair.
a class tag for T1 type parameter that is required to create an instance of Array[T1]
a class tag for T2 type parameter that is required to create an instance of Array[T2]
a pair of Arrays, containing, respectively, the first and second half of each element pair of this Array.
Converts an array of pairs into an array of first elements and an array of second elements.
Converts an array of pairs into an array of first elements and an array of second elements.
the type of the first half of the element pairs
the type of the second half of the element pairs
an implicit conversion which asserts that the element type of this Array is a pair.
a class tag for T1 type parameter that is required to create an instance of Array[T1]
a class tag for T2 type parameter that is required to create an instance of Array[T2]
a pair of Arrays, containing, respectively, the first and second half of each element pair of this Array.
Converts an array of pairs into an array of first elements and an array of second elements.
Converts an array of pairs into an array of first elements and an array of second elements.
the type of the first half of the element pairs
the type of the second half of the element pairs
an implicit conversion which asserts that the element type of this Array is a pair.
a class tag for T1 type parameter that is required to create an instance of Array[T1]
a class tag for T2 type parameter that is required to create an instance of Array[T2]
a pair of Arrays, containing, respectively, the first and second half of each element pair of this Array.
Converts an array of pairs into an array of first elements and an array of second elements.
Converts an array of pairs into an array of first elements and an array of second elements.
the type of the first half of the element pairs
the type of the second half of the element pairs
an implicit conversion which asserts that the element type of this Array is a pair.
a class tag for T1 type parameter that is required to create an instance of Array[T1]
a class tag for T2 type parameter that is required to create an instance of Array[T2]
a pair of Arrays, containing, respectively, the first and second half of each element pair of this Array.
Converts an array of pairs into an array of first elements and an array of second elements.
Converts an array of pairs into an array of first elements and an array of second elements.
the type of the first half of the element pairs
the type of the second half of the element pairs
an implicit conversion which asserts that the element type of this Array is a pair.
a class tag for T1 type parameter that is required to create an instance of Array[T1]
a class tag for T2 type parameter that is required to create an instance of Array[T2]
a pair of Arrays, containing, respectively, the first and second half of each element pair of this Array.
Converts an array of pairs into an array of first elements and an array of second elements.
Converts an array of pairs into an array of first elements and an array of second elements.
the type of the first half of the element pairs
the type of the second half of the element pairs
an implicit conversion which asserts that the element type of this Array is a pair.
a class tag for T1 type parameter that is required to create an instance of Array[T1]
a class tag for T2 type parameter that is required to create an instance of Array[T2]
a pair of Arrays, containing, respectively, the first and second half of each element pair of this Array.
Converts an array of pairs into an array of first elements and an array of second elements.
Converts an array of pairs into an array of first elements and an array of second elements.
the type of the first half of the element pairs
the type of the second half of the element pairs
an implicit conversion which asserts that the element type of this Array is a pair.
a class tag for T1 type parameter that is required to create an instance of Array[T1]
a class tag for T2 type parameter that is required to create an instance of Array[T2]
a pair of Arrays, containing, respectively, the first and second half of each element pair of this Array.
Converts an array of pairs into an array of first elements and an array of second elements.
Converts an array of pairs into an array of first elements and an array of second elements.
the type of the first half of the element pairs
the type of the second half of the element pairs
an implicit conversion which asserts that the element type of this Array is a pair.
a class tag for T1 type parameter that is required to create an instance of Array[T1]
a class tag for T2 type parameter that is required to create an instance of Array[T2]
a pair of Arrays, containing, respectively, the first and second half of each element pair of this Array.
Converts an array of triples into three arrays, one containing the elements from each position of the triple.
Converts an array of triples into three arrays, one containing the elements from each position of the triple.
the type of the first of three elements in the triple
the type of the second of three elements in the triple
the type of the third of three elements in the triple
an implicit conversion which asserts that the element type of this Array is a triple.
a class tag for T1 type parameter that is required to create an instance of Array[T1]
a class tag for T2 type parameter that is required to create an instance of Array[T2]
a class tag for T3 type parameter that is required to create an instance of Array[T3]
a triple of Arrays, containing, respectively, the first, second, and third elements from each element triple of this Array.
Converts an array of triples into three arrays, one containing the elements from each position of the triple.
Converts an array of triples into three arrays, one containing the elements from each position of the triple.
the type of the first of three elements in the triple
the type of the second of three elements in the triple
the type of the third of three elements in the triple
an implicit conversion which asserts that the element type of this Array is a triple.
a class tag for T1 type parameter that is required to create an instance of Array[T1]
a class tag for T2 type parameter that is required to create an instance of Array[T2]
a class tag for T3 type parameter that is required to create an instance of Array[T3]
a triple of Arrays, containing, respectively, the first, second, and third elements from each element triple of this Array.
Converts an array of triples into three arrays, one containing the elements from each position of the triple.
Converts an array of triples into three arrays, one containing the elements from each position of the triple.
the type of the first of three elements in the triple
the type of the second of three elements in the triple
the type of the third of three elements in the triple
an implicit conversion which asserts that the element type of this Array is a triple.
a class tag for T1 type parameter that is required to create an instance of Array[T1]
a class tag for T2 type parameter that is required to create an instance of Array[T2]
a class tag for T3 type parameter that is required to create an instance of Array[T3]
a triple of Arrays, containing, respectively, the first, second, and third elements from each element triple of this Array.
Converts an array of triples into three arrays, one containing the elements from each position of the triple.
Converts an array of triples into three arrays, one containing the elements from each position of the triple.
the type of the first of three elements in the triple
the type of the second of three elements in the triple
the type of the third of three elements in the triple
an implicit conversion which asserts that the element type of this Array is a triple.
a class tag for T1 type parameter that is required to create an instance of Array[T1]
a class tag for T2 type parameter that is required to create an instance of Array[T2]
a class tag for T3 type parameter that is required to create an instance of Array[T3]
a triple of Arrays, containing, respectively, the first, second, and third elements from each element triple of this Array.
Converts an array of triples into three arrays, one containing the elements from each position of the triple.
Converts an array of triples into three arrays, one containing the elements from each position of the triple.
the type of the first of three elements in the triple
the type of the second of three elements in the triple
the type of the third of three elements in the triple
an implicit conversion which asserts that the element type of this Array is a triple.
a class tag for T1 type parameter that is required to create an instance of Array[T1]
a class tag for T2 type parameter that is required to create an instance of Array[T2]
a class tag for T3 type parameter that is required to create an instance of Array[T3]
a triple of Arrays, containing, respectively, the first, second, and third elements from each element triple of this Array.
Converts an array of triples into three arrays, one containing the elements from each position of the triple.
Converts an array of triples into three arrays, one containing the elements from each position of the triple.
the type of the first of three elements in the triple
the type of the second of three elements in the triple
the type of the third of three elements in the triple
an implicit conversion which asserts that the element type of this Array is a triple.
a class tag for T1 type parameter that is required to create an instance of Array[T1]
a class tag for T2 type parameter that is required to create an instance of Array[T2]
a class tag for T3 type parameter that is required to create an instance of Array[T3]
a triple of Arrays, containing, respectively, the first, second, and third elements from each element triple of this Array.
Converts an array of triples into three arrays, one containing the elements from each position of the triple.
Converts an array of triples into three arrays, one containing the elements from each position of the triple.
the type of the first of three elements in the triple
the type of the second of three elements in the triple
the type of the third of three elements in the triple
an implicit conversion which asserts that the element type of this Array is a triple.
a class tag for T1 type parameter that is required to create an instance of Array[T1]
a class tag for T2 type parameter that is required to create an instance of Array[T2]
a class tag for T3 type parameter that is required to create an instance of Array[T3]
a triple of Arrays, containing, respectively, the first, second, and third elements from each element triple of this Array.
Converts an array of triples into three arrays, one containing the elements from each position of the triple.
Converts an array of triples into three arrays, one containing the elements from each position of the triple.
the type of the first of three elements in the triple
the type of the second of three elements in the triple
the type of the third of three elements in the triple
an implicit conversion which asserts that the element type of this Array is a triple.
a class tag for T1 type parameter that is required to create an instance of Array[T1]
a class tag for T2 type parameter that is required to create an instance of Array[T2]
a class tag for T3 type parameter that is required to create an instance of Array[T3]
a triple of Arrays, containing, respectively, the first, second, and third elements from each element triple of this Array.
Converts an array of triples into three arrays, one containing the elements from each position of the triple.
Converts an array of triples into three arrays, one containing the elements from each position of the triple.
the type of the first of three elements in the triple
the type of the second of three elements in the triple
the type of the third of three elements in the triple
an implicit conversion which asserts that the element type of this Array is a triple.
a class tag for T1 type parameter that is required to create an instance of Array[T1]
a class tag for T2 type parameter that is required to create an instance of Array[T2]
a class tag for T3 type parameter that is required to create an instance of Array[T3]
a triple of Arrays, containing, respectively, the first, second, and third elements from each element triple of this Array.
Update the element at given index.
Update the element at given index.
Indices start at 0
; xs.update(i, x)
replaces the ith element in the array.
Note the syntax xs(i) = x
is a shorthand for xs.update(i, x)
.
the index
the value to be written at index i
ArrayIndexOutOfBoundsException
if i < 0
or length <= i
Creates a non-strict filter of this mutable indexed sequence.
Creates a non-strict filter of this mutable indexed sequence.
Note: the difference between c filter p
and c withFilter p
is that
the former creates a new collection, whereas the latter only
restricts the domain of subsequent map
, flatMap
, foreach
,
and withFilter
operations.
the predicate used to test elements.
an object of class WithFilter
, which supports
map
, flatMap
, foreach
, and withFilter
operations.
All these operations apply to those elements of this mutable indexed sequence
which satisfy the predicate p
.
Creates a non-strict filter of this mutable indexed sequence.
Creates a non-strict filter of this mutable indexed sequence.
Note: the difference between c filter p
and c withFilter p
is that
the former creates a new collection, whereas the latter only
restricts the domain of subsequent map
, flatMap
, foreach
,
and withFilter
operations.
the predicate used to test elements.
an object of class WithFilter
, which supports
map
, flatMap
, foreach
, and withFilter
operations.
All these operations apply to those elements of this mutable indexed sequence
which satisfy the predicate p
.
Creates a non-strict filter of this mutable indexed sequence.
Creates a non-strict filter of this mutable indexed sequence.
Note: the difference between c filter p
and c withFilter p
is that
the former creates a new collection, whereas the latter only
restricts the domain of subsequent map
, flatMap
, foreach
,
and withFilter
operations.
the predicate used to test elements.
an object of class WithFilter
, which supports
map
, flatMap
, foreach
, and withFilter
operations.
All these operations apply to those elements of this mutable indexed sequence
which satisfy the predicate p
.
Creates a non-strict filter of this mutable indexed sequence.
Creates a non-strict filter of this mutable indexed sequence.
Note: the difference between c filter p
and c withFilter p
is that
the former creates a new collection, whereas the latter only
restricts the domain of subsequent map
, flatMap
, foreach
,
and withFilter
operations.
the predicate used to test elements.
an object of class WithFilter
, which supports
map
, flatMap
, foreach
, and withFilter
operations.
All these operations apply to those elements of this mutable indexed sequence
which satisfy the predicate p
.
Creates a non-strict filter of this mutable indexed sequence.
Creates a non-strict filter of this mutable indexed sequence.
Note: the difference between c filter p
and c withFilter p
is that
the former creates a new collection, whereas the latter only
restricts the domain of subsequent map
, flatMap
, foreach
,
and withFilter
operations.
the predicate used to test elements.
an object of class WithFilter
, which supports
map
, flatMap
, foreach
, and withFilter
operations.
All these operations apply to those elements of this mutable indexed sequence
which satisfy the predicate p
.
Creates a non-strict filter of this mutable indexed sequence.
Creates a non-strict filter of this mutable indexed sequence.
Note: the difference between c filter p
and c withFilter p
is that
the former creates a new collection, whereas the latter only
restricts the domain of subsequent map
, flatMap
, foreach
,
and withFilter
operations.
the predicate used to test elements.
an object of class WithFilter
, which supports
map
, flatMap
, foreach
, and withFilter
operations.
All these operations apply to those elements of this mutable indexed sequence
which satisfy the predicate p
.
Creates a non-strict filter of this mutable indexed sequence.
Creates a non-strict filter of this mutable indexed sequence.
Note: the difference between c filter p
and c withFilter p
is that
the former creates a new collection, whereas the latter only
restricts the domain of subsequent map
, flatMap
, foreach
,
and withFilter
operations.
the predicate used to test elements.
an object of class WithFilter
, which supports
map
, flatMap
, foreach
, and withFilter
operations.
All these operations apply to those elements of this mutable indexed sequence
which satisfy the predicate p
.
Creates a non-strict filter of this mutable indexed sequence.
Creates a non-strict filter of this mutable indexed sequence.
Note: the difference between c filter p
and c withFilter p
is that
the former creates a new collection, whereas the latter only
restricts the domain of subsequent map
, flatMap
, foreach
,
and withFilter
operations.
the predicate used to test elements.
an object of class WithFilter
, which supports
map
, flatMap
, foreach
, and withFilter
operations.
All these operations apply to those elements of this mutable indexed sequence
which satisfy the predicate p
.
Creates a non-strict filter of this mutable indexed sequence.
Creates a non-strict filter of this mutable indexed sequence.
Note: the difference between c filter p
and c withFilter p
is that
the former creates a new collection, whereas the latter only
restricts the domain of subsequent map
, flatMap
, foreach
,
and withFilter
operations.
the predicate used to test elements.
an object of class WithFilter
, which supports
map
, flatMap
, foreach
, and withFilter
operations.
All these operations apply to those elements of this mutable indexed sequence
which satisfy the predicate p
.
[use case] Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs.
Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs. If one of the two collections is longer than the other, its remaining elements are ignored.
the type of the second half of the returned pairs
The iterable providing the second half of each result pair
a new array containing pairs consisting of
corresponding elements of this array and that
. The length
of the returned collection is the minimum of the lengths of this array and that
.
[use case] Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs.
Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs. If one of the two collections is longer than the other, its remaining elements are ignored.
the type of the second half of the returned pairs
The iterable providing the second half of each result pair
a new array containing pairs consisting of
corresponding elements of this array and that
. The length
of the returned collection is the minimum of the lengths of this array and that
.
[use case] Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs.
Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs. If one of the two collections is longer than the other, its remaining elements are ignored.
the type of the second half of the returned pairs
The iterable providing the second half of each result pair
a new array containing pairs consisting of
corresponding elements of this array and that
. The length
of the returned collection is the minimum of the lengths of this array and that
.
[use case] Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs.
Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs. If one of the two collections is longer than the other, its remaining elements are ignored.
the type of the second half of the returned pairs
The iterable providing the second half of each result pair
a new array containing pairs consisting of
corresponding elements of this array and that
. The length
of the returned collection is the minimum of the lengths of this array and that
.
[use case] Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs.
Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs. If one of the two collections is longer than the other, its remaining elements are ignored.
the type of the second half of the returned pairs
The iterable providing the second half of each result pair
a new array containing pairs consisting of
corresponding elements of this array and that
. The length
of the returned collection is the minimum of the lengths of this array and that
.
[use case] Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs.
Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs. If one of the two collections is longer than the other, its remaining elements are ignored.
the type of the second half of the returned pairs
The iterable providing the second half of each result pair
a new array containing pairs consisting of
corresponding elements of this array and that
. The length
of the returned collection is the minimum of the lengths of this array and that
.
[use case] Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs.
Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs. If one of the two collections is longer than the other, its remaining elements are ignored.
the type of the second half of the returned pairs
The iterable providing the second half of each result pair
a new array containing pairs consisting of
corresponding elements of this array and that
. The length
of the returned collection is the minimum of the lengths of this array and that
.
[use case] Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs.
Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs. If one of the two collections is longer than the other, its remaining elements are ignored.
the type of the second half of the returned pairs
The iterable providing the second half of each result pair
a new array containing pairs consisting of
corresponding elements of this array and that
. The length
of the returned collection is the minimum of the lengths of this array and that
.
[use case] Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs.
Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs. If one of the two collections is longer than the other, its remaining elements are ignored.
the type of the second half of the returned pairs
The iterable providing the second half of each result pair
a new array containing pairs consisting of
corresponding elements of this array and that
. The length
of the returned collection is the minimum of the lengths of this array and that
.
[use case] Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs.
Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs. If one of the two collections is longer than the other, its remaining elements are ignored.
the type of the second half of the returned pairs
The iterable providing the second half of each result pair
a new array containing pairs consisting of
corresponding elements of this array and that
. The length
of the returned collection is the minimum of the lengths of this array and that
.
[use case] Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs.
Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs. If one of the two collections is longer than the other, its remaining elements are ignored.
the type of the second half of the returned pairs
The iterable providing the second half of each result pair
a new array containing pairs consisting of
corresponding elements of this array and that
. The length
of the returned collection is the minimum of the lengths of this array and that
.
[use case] Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs.
Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs. If one of the two collections is shorter than the other, placeholder elements are used to extend the shorter collection to the length of the longer.
the type of the second half of the returned pairs
The iterable providing the second half of each result pair
the element to be used to fill up the result if this array is shorter than that
.
the element to be used to fill up the result if that
is shorter than this array.
a new array containing pairs consisting of
corresponding elements of this array and that
. The length
of the returned collection is the maximum of the lengths of this array and that
.
If this array is shorter than that
, thisElem
values are used to pad the result.
If that
is shorter than this array, thatElem
values are used to pad the result.
[use case] Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs.
Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs. If one of the two collections is shorter than the other, placeholder elements are used to extend the shorter collection to the length of the longer.
the type of the second half of the returned pairs
The iterable providing the second half of each result pair
the element to be used to fill up the result if this array is shorter than that
.
the element to be used to fill up the result if that
is shorter than this array.
a new array containing pairs consisting of
corresponding elements of this array and that
. The length
of the returned collection is the maximum of the lengths of this array and that
.
If this array is shorter than that
, thisElem
values are used to pad the result.
If that
is shorter than this array, thatElem
values are used to pad the result.
[use case] Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs.
Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs. If one of the two collections is shorter than the other, placeholder elements are used to extend the shorter collection to the length of the longer.
the type of the second half of the returned pairs
The iterable providing the second half of each result pair
the element to be used to fill up the result if this array is shorter than that
.
the element to be used to fill up the result if that
is shorter than this array.
a new array containing pairs consisting of
corresponding elements of this array and that
. The length
of the returned collection is the maximum of the lengths of this array and that
.
If this array is shorter than that
, thisElem
values are used to pad the result.
If that
is shorter than this array, thatElem
values are used to pad the result.
[use case] Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs.
Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs. If one of the two collections is shorter than the other, placeholder elements are used to extend the shorter collection to the length of the longer.
the type of the second half of the returned pairs
The iterable providing the second half of each result pair
the element to be used to fill up the result if this array is shorter than that
.
the element to be used to fill up the result if that
is shorter than this array.
a new array containing pairs consisting of
corresponding elements of this array and that
. The length
of the returned collection is the maximum of the lengths of this array and that
.
If this array is shorter than that
, thisElem
values are used to pad the result.
If that
is shorter than this array, thatElem
values are used to pad the result.
[use case] Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs.
Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs. If one of the two collections is shorter than the other, placeholder elements are used to extend the shorter collection to the length of the longer.
the type of the second half of the returned pairs
The iterable providing the second half of each result pair
the element to be used to fill up the result if this array is shorter than that
.
the element to be used to fill up the result if that
is shorter than this array.
a new array containing pairs consisting of
corresponding elements of this array and that
. The length
of the returned collection is the maximum of the lengths of this array and that
.
If this array is shorter than that
, thisElem
values are used to pad the result.
If that
is shorter than this array, thatElem
values are used to pad the result.
[use case] Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs.
Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs. If one of the two collections is shorter than the other, placeholder elements are used to extend the shorter collection to the length of the longer.
the type of the second half of the returned pairs
The iterable providing the second half of each result pair
the element to be used to fill up the result if this array is shorter than that
.
the element to be used to fill up the result if that
is shorter than this array.
a new array containing pairs consisting of
corresponding elements of this array and that
. The length
of the returned collection is the maximum of the lengths of this array and that
.
If this array is shorter than that
, thisElem
values are used to pad the result.
If that
is shorter than this array, thatElem
values are used to pad the result.
[use case] Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs.
Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs. If one of the two collections is shorter than the other, placeholder elements are used to extend the shorter collection to the length of the longer.
the type of the second half of the returned pairs
The iterable providing the second half of each result pair
the element to be used to fill up the result if this array is shorter than that
.
the element to be used to fill up the result if that
is shorter than this array.
a new array containing pairs consisting of
corresponding elements of this array and that
. The length
of the returned collection is the maximum of the lengths of this array and that
.
If this array is shorter than that
, thisElem
values are used to pad the result.
If that
is shorter than this array, thatElem
values are used to pad the result.
[use case] Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs.
Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs. If one of the two collections is shorter than the other, placeholder elements are used to extend the shorter collection to the length of the longer.
the type of the second half of the returned pairs
The iterable providing the second half of each result pair
the element to be used to fill up the result if this array is shorter than that
.
the element to be used to fill up the result if that
is shorter than this array.
a new array containing pairs consisting of
corresponding elements of this array and that
. The length
of the returned collection is the maximum of the lengths of this array and that
.
If this array is shorter than that
, thisElem
values are used to pad the result.
If that
is shorter than this array, thatElem
values are used to pad the result.
[use case] Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs.
Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs. If one of the two collections is shorter than the other, placeholder elements are used to extend the shorter collection to the length of the longer.
the type of the second half of the returned pairs
The iterable providing the second half of each result pair
the element to be used to fill up the result if this array is shorter than that
.
the element to be used to fill up the result if that
is shorter than this array.
a new array containing pairs consisting of
corresponding elements of this array and that
. The length
of the returned collection is the maximum of the lengths of this array and that
.
If this array is shorter than that
, thisElem
values are used to pad the result.
If that
is shorter than this array, thatElem
values are used to pad the result.
[use case] Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs.
Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs. If one of the two collections is shorter than the other, placeholder elements are used to extend the shorter collection to the length of the longer.
the type of the second half of the returned pairs
The iterable providing the second half of each result pair
the element to be used to fill up the result if this array is shorter than that
.
the element to be used to fill up the result if that
is shorter than this array.
a new array containing pairs consisting of
corresponding elements of this array and that
. The length
of the returned collection is the maximum of the lengths of this array and that
.
If this array is shorter than that
, thisElem
values are used to pad the result.
If that
is shorter than this array, thatElem
values are used to pad the result.
[use case] Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs.
Returns a array formed from this array and another iterable collection by combining corresponding elements in pairs. If one of the two collections is shorter than the other, placeholder elements are used to extend the shorter collection to the length of the longer.
the type of the second half of the returned pairs
The iterable providing the second half of each result pair
the element to be used to fill up the result if this array is shorter than that
.
the element to be used to fill up the result if that
is shorter than this array.
a new array containing pairs consisting of
corresponding elements of this array and that
. The length
of the returned collection is the maximum of the lengths of this array and that
.
If this array is shorter than that
, thisElem
values are used to pad the result.
If that
is shorter than this array, thatElem
values are used to pad the result.
[use case] A copy of the array with an element prepended.
A copy of the array with an element prepended.
Note that :-ending operators are right associative (see example).
A mnemonic for +:
vs. :+
is: the COLon goes on the COLlection side.
Also, the original array is not modified, so you will want to capture the result.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = 2 +: x y: List[Int] = List(2, 1) scala> println(x) List(1)
the prepended element
a new array consisting of elem
followed
by all elements of this array.
(array: ofUnit).+:(elem)
[use case] A copy of the array with an element prepended.
A copy of the array with an element prepended.
Note that :-ending operators are right associative (see example).
A mnemonic for +:
vs. :+
is: the COLon goes on the COLlection side.
Also, the original array is not modified, so you will want to capture the result.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = 2 +: x y: List[Int] = List(2, 1) scala> println(x) List(1)
the prepended element
a new array consisting of elem
followed
by all elements of this array.
(array: ofShort).+:(elem)
[use case] A copy of the array with an element prepended.
A copy of the array with an element prepended.
Note that :-ending operators are right associative (see example).
A mnemonic for +:
vs. :+
is: the COLon goes on the COLlection side.
Also, the original array is not modified, so you will want to capture the result.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = 2 +: x y: List[Int] = List(2, 1) scala> println(x) List(1)
the prepended element
a new array consisting of elem
followed
by all elements of this array.
(array: ofRef[T]).+:(elem)
[use case] A copy of the array with an element prepended.
A copy of the array with an element prepended.
Note that :-ending operators are right associative (see example).
A mnemonic for +:
vs. :+
is: the COLon goes on the COLlection side.
Also, the original array is not modified, so you will want to capture the result.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = 2 +: x y: List[Int] = List(2, 1) scala> println(x) List(1)
the prepended element
a new array consisting of elem
followed
by all elements of this array.
(array: ofLong).+:(elem)
[use case] A copy of the array with an element prepended.
A copy of the array with an element prepended.
Note that :-ending operators are right associative (see example).
A mnemonic for +:
vs. :+
is: the COLon goes on the COLlection side.
Also, the original array is not modified, so you will want to capture the result.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = 2 +: x y: List[Int] = List(2, 1) scala> println(x) List(1)
the prepended element
a new array consisting of elem
followed
by all elements of this array.
(array: ofInt).+:(elem)
[use case] A copy of the array with an element prepended.
A copy of the array with an element prepended.
Note that :-ending operators are right associative (see example).
A mnemonic for +:
vs. :+
is: the COLon goes on the COLlection side.
Also, the original array is not modified, so you will want to capture the result.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = 2 +: x y: List[Int] = List(2, 1) scala> println(x) List(1)
the prepended element
a new array consisting of elem
followed
by all elements of this array.
(array: ofFloat).+:(elem)
[use case] A copy of the array with an element prepended.
A copy of the array with an element prepended.
Note that :-ending operators are right associative (see example).
A mnemonic for +:
vs. :+
is: the COLon goes on the COLlection side.
Also, the original array is not modified, so you will want to capture the result.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = 2 +: x y: List[Int] = List(2, 1) scala> println(x) List(1)
the prepended element
a new array consisting of elem
followed
by all elements of this array.
(array: ofDouble).+:(elem)
[use case] A copy of the array with an element prepended.
A copy of the array with an element prepended.
Note that :-ending operators are right associative (see example).
A mnemonic for +:
vs. :+
is: the COLon goes on the COLlection side.
Also, the original array is not modified, so you will want to capture the result.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = 2 +: x y: List[Int] = List(2, 1) scala> println(x) List(1)
the prepended element
a new array consisting of elem
followed
by all elements of this array.
(array: ofChar).+:(elem)
[use case] A copy of the array with an element prepended.
A copy of the array with an element prepended.
Note that :-ending operators are right associative (see example).
A mnemonic for +:
vs. :+
is: the COLon goes on the COLlection side.
Also, the original array is not modified, so you will want to capture the result.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = 2 +: x y: List[Int] = List(2, 1) scala> println(x) List(1)
the prepended element
a new array consisting of elem
followed
by all elements of this array.
(array: ofByte).+:(elem)
[use case] A copy of the array with an element prepended.
A copy of the array with an element prepended.
Note that :-ending operators are right associative (see example).
A mnemonic for +:
vs. :+
is: the COLon goes on the COLlection side.
Also, the original array is not modified, so you will want to capture the result.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = 2 +: x y: List[Int] = List(2, 1) scala> println(x) List(1)
the prepended element
a new array consisting of elem
followed
by all elements of this array.
(array: ofBoolean).+:(elem)
[use case] A copy of the array with an element prepended.
A copy of the array with an element prepended.
Note that :-ending operators are right associative (see example).
A mnemonic for +:
vs. :+
is: the COLon goes on the COLlection side.
Also, the original array is not modified, so you will want to capture the result.
Example:
scala> val x = List(1) x: List[Int] = List(1) scala> val y = 2 +: x y: List[Int] = List(2, 1) scala> println(x) List(1)
the prepended element
a new array consisting of elem
followed
by all elements of this array.
(array: ArrayOps[T]).+:(elem)
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Note: /:
is alternate syntax for foldLeft
; z /: xs
is the same as
xs foldLeft z
.
Examples:
Note that the folding function used to compute b is equivalent to that used to compute c.
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = (5 /: a)(_+_) b: Int = 15 scala> val c = (5 /: a)((x,y) => x + y) c: Int = 15
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right with the start value z
on the left:
op(...op(op(z, x_1), x_2), ..., x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
(array: ofRef[T])./:(z)(op)
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Note: /:
is alternate syntax for foldLeft
; z /: xs
is the same as
xs foldLeft z
.
Examples:
Note that the folding function used to compute b is equivalent to that used to compute c.
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = (5 /: a)(_+_) b: Int = 15 scala> val c = (5 /: a)((x,y) => x + y) c: Int = 15
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right with the start value z
on the left:
op(...op(op(z, x_1), x_2), ..., x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
(array: ArrayOps[T])./:(z)(op)
[use case] A copy of this array with an element appended.
A copy of this array with an element appended.
A mnemonic for +:
vs. :+
is: the COLon goes on the COLlection side.
Example:
scala> val a = List(1) a: List[Int] = List(1) scala> val b = a :+ 2 b: List[Int] = List(1, 2) scala> println(a) List(1)
the appended element
a new array consisting of
all elements of this array followed by elem
.
(array: ofUnit).:+(elem)
[use case] A copy of this array with an element appended.
A copy of this array with an element appended.
A mnemonic for +:
vs. :+
is: the COLon goes on the COLlection side.
Example:
scala> val a = List(1) a: List[Int] = List(1) scala> val b = a :+ 2 b: List[Int] = List(1, 2) scala> println(a) List(1)
the appended element
a new array consisting of
all elements of this array followed by elem
.
(array: ofShort).:+(elem)
[use case] A copy of this array with an element appended.
A copy of this array with an element appended.
A mnemonic for +:
vs. :+
is: the COLon goes on the COLlection side.
Example:
scala> val a = List(1) a: List[Int] = List(1) scala> val b = a :+ 2 b: List[Int] = List(1, 2) scala> println(a) List(1)
the appended element
a new array consisting of
all elements of this array followed by elem
.
(array: ofRef[T]).:+(elem)
[use case] A copy of this array with an element appended.
A copy of this array with an element appended.
A mnemonic for +:
vs. :+
is: the COLon goes on the COLlection side.
Example:
scala> val a = List(1) a: List[Int] = List(1) scala> val b = a :+ 2 b: List[Int] = List(1, 2) scala> println(a) List(1)
the appended element
a new array consisting of
all elements of this array followed by elem
.
(array: ofLong).:+(elem)
[use case] A copy of this array with an element appended.
A copy of this array with an element appended.
A mnemonic for +:
vs. :+
is: the COLon goes on the COLlection side.
Example:
scala> val a = List(1) a: List[Int] = List(1) scala> val b = a :+ 2 b: List[Int] = List(1, 2) scala> println(a) List(1)
the appended element
a new array consisting of
all elements of this array followed by elem
.
(array: ofInt).:+(elem)
[use case] A copy of this array with an element appended.
A copy of this array with an element appended.
A mnemonic for +:
vs. :+
is: the COLon goes on the COLlection side.
Example:
scala> val a = List(1) a: List[Int] = List(1) scala> val b = a :+ 2 b: List[Int] = List(1, 2) scala> println(a) List(1)
the appended element
a new array consisting of
all elements of this array followed by elem
.
(array: ofFloat).:+(elem)
[use case] A copy of this array with an element appended.
A copy of this array with an element appended.
A mnemonic for +:
vs. :+
is: the COLon goes on the COLlection side.
Example:
scala> val a = List(1) a: List[Int] = List(1) scala> val b = a :+ 2 b: List[Int] = List(1, 2) scala> println(a) List(1)
the appended element
a new array consisting of
all elements of this array followed by elem
.
(array: ofDouble).:+(elem)
[use case] A copy of this array with an element appended.
A copy of this array with an element appended.
A mnemonic for +:
vs. :+
is: the COLon goes on the COLlection side.
Example:
scala> val a = List(1) a: List[Int] = List(1) scala> val b = a :+ 2 b: List[Int] = List(1, 2) scala> println(a) List(1)
the appended element
a new array consisting of
all elements of this array followed by elem
.
(array: ofChar).:+(elem)
[use case] A copy of this array with an element appended.
A copy of this array with an element appended.
A mnemonic for +:
vs. :+
is: the COLon goes on the COLlection side.
Example:
scala> val a = List(1) a: List[Int] = List(1) scala> val b = a :+ 2 b: List[Int] = List(1, 2) scala> println(a) List(1)
the appended element
a new array consisting of
all elements of this array followed by elem
.
(array: ofByte).:+(elem)
[use case] A copy of this array with an element appended.
A copy of this array with an element appended.
A mnemonic for +:
vs. :+
is: the COLon goes on the COLlection side.
Example:
scala> val a = List(1) a: List[Int] = List(1) scala> val b = a :+ 2 b: List[Int] = List(1, 2) scala> println(a) List(1)
the appended element
a new array consisting of
all elements of this array followed by elem
.
(array: ofBoolean).:+(elem)
[use case] A copy of this array with an element appended.
A copy of this array with an element appended.
A mnemonic for +:
vs. :+
is: the COLon goes on the COLlection side.
Example:
scala> val a = List(1) a: List[Int] = List(1) scala> val b = a :+ 2 b: List[Int] = List(1, 2) scala> println(a) List(1)
the appended element
a new array consisting of
all elements of this array followed by elem
.
(array: ArrayOps[T]).:+(elem)
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Note: :\
is alternate syntax for foldRight
; xs :\ z
is the same as
xs foldRight z
.
Examples:
Note that the folding function used to compute b is equivalent to that used to compute c.
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = (a :\ 5)(_+_) b: Int = 15 scala> val c = (a :\ 5)((x,y) => x + y) c: Int = 15
the result type of the binary operator.
the start value
the binary operator
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left with the start value z
on the right:
op(x_1, op(x_2, ... op(x_n, z)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
(array: ofRef[T]).:\(z)(op)
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Note: :\
is alternate syntax for foldRight
; xs :\ z
is the same as
xs foldRight z
.
Examples:
Note that the folding function used to compute b is equivalent to that used to compute c.
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = (a :\ 5)(_+_) b: Int = 15 scala> val c = (a :\ 5)((x,y) => x + y) c: Int = 15
the result type of the binary operator.
the start value
the binary operator
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left with the start value z
on the right:
op(x_1, op(x_2, ... op(x_n, z)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
(array: ArrayOps[T]).:\(z)(op)
Appends all elements of this mutable indexed sequence to a string builder.
Appends all elements of this mutable indexed sequence to a string builder.
The written text consists of the string representations (w.r.t. the method
toString
) of all elements of this mutable indexed sequence without any separator string.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> val h = a.addString(b) h: StringBuilder = 1234
the string builder to which elements are appended.
the string builder b
to which elements were appended.
(array: ofUnit).addString(b)
Appends all elements of this mutable indexed sequence to a string builder using a separator string.
Appends all elements of this mutable indexed sequence to a string builder using a separator string.
The written text consists of the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence, separated by the string sep
.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> a.addString(b, ", ") res0: StringBuilder = 1, 2, 3, 4
the string builder to which elements are appended.
the separator string.
the string builder b
to which elements were appended.
(array: ofUnit).addString(b, sep)
Appends all elements of this mutable indexed sequence to a string builder using start, end, and separator strings.
Appends all elements of this mutable indexed sequence to a string builder using start, end, and separator strings.
The written text begins with the string start
and ends with the string end
.
Inside, the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence are separated by the string sep
.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> a.addString(b , "List(" , ", " , ")") res5: StringBuilder = List(1, 2, 3, 4)
the string builder to which elements are appended.
the starting string.
the separator string.
the ending string.
the string builder b
to which elements were appended.
(array: ofUnit).addString(b, start, sep, end)
Appends all elements of this mutable indexed sequence to a string builder.
Appends all elements of this mutable indexed sequence to a string builder.
The written text consists of the string representations (w.r.t. the method
toString
) of all elements of this mutable indexed sequence without any separator string.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> val h = a.addString(b) h: StringBuilder = 1234
the string builder to which elements are appended.
the string builder b
to which elements were appended.
(array: ofShort).addString(b)
Appends all elements of this mutable indexed sequence to a string builder using a separator string.
Appends all elements of this mutable indexed sequence to a string builder using a separator string.
The written text consists of the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence, separated by the string sep
.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> a.addString(b, ", ") res0: StringBuilder = 1, 2, 3, 4
the string builder to which elements are appended.
the separator string.
the string builder b
to which elements were appended.
(array: ofShort).addString(b, sep)
Appends all elements of this mutable indexed sequence to a string builder using start, end, and separator strings.
Appends all elements of this mutable indexed sequence to a string builder using start, end, and separator strings.
The written text begins with the string start
and ends with the string end
.
Inside, the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence are separated by the string sep
.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> a.addString(b , "List(" , ", " , ")") res5: StringBuilder = List(1, 2, 3, 4)
the string builder to which elements are appended.
the starting string.
the separator string.
the ending string.
the string builder b
to which elements were appended.
(array: ofShort).addString(b, start, sep, end)
Appends all elements of this mutable indexed sequence to a string builder.
Appends all elements of this mutable indexed sequence to a string builder.
The written text consists of the string representations (w.r.t. the method
toString
) of all elements of this mutable indexed sequence without any separator string.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> val h = a.addString(b) h: StringBuilder = 1234
the string builder to which elements are appended.
the string builder b
to which elements were appended.
(array: ofRef[T]).addString(b)
Appends all elements of this mutable indexed sequence to a string builder using a separator string.
Appends all elements of this mutable indexed sequence to a string builder using a separator string.
The written text consists of the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence, separated by the string sep
.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> a.addString(b, ", ") res0: StringBuilder = 1, 2, 3, 4
the string builder to which elements are appended.
the separator string.
the string builder b
to which elements were appended.
(array: ofRef[T]).addString(b, sep)
Appends all elements of this mutable indexed sequence to a string builder using start, end, and separator strings.
Appends all elements of this mutable indexed sequence to a string builder using start, end, and separator strings.
The written text begins with the string start
and ends with the string end
.
Inside, the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence are separated by the string sep
.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> a.addString(b , "List(" , ", " , ")") res5: StringBuilder = List(1, 2, 3, 4)
the string builder to which elements are appended.
the starting string.
the separator string.
the ending string.
the string builder b
to which elements were appended.
(array: ofRef[T]).addString(b, start, sep, end)
Appends all elements of this mutable indexed sequence to a string builder.
Appends all elements of this mutable indexed sequence to a string builder.
The written text consists of the string representations (w.r.t. the method
toString
) of all elements of this mutable indexed sequence without any separator string.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> val h = a.addString(b) h: StringBuilder = 1234
the string builder to which elements are appended.
the string builder b
to which elements were appended.
(array: ofLong).addString(b)
Appends all elements of this mutable indexed sequence to a string builder using a separator string.
Appends all elements of this mutable indexed sequence to a string builder using a separator string.
The written text consists of the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence, separated by the string sep
.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> a.addString(b, ", ") res0: StringBuilder = 1, 2, 3, 4
the string builder to which elements are appended.
the separator string.
the string builder b
to which elements were appended.
(array: ofLong).addString(b, sep)
Appends all elements of this mutable indexed sequence to a string builder using start, end, and separator strings.
Appends all elements of this mutable indexed sequence to a string builder using start, end, and separator strings.
The written text begins with the string start
and ends with the string end
.
Inside, the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence are separated by the string sep
.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> a.addString(b , "List(" , ", " , ")") res5: StringBuilder = List(1, 2, 3, 4)
the string builder to which elements are appended.
the starting string.
the separator string.
the ending string.
the string builder b
to which elements were appended.
(array: ofLong).addString(b, start, sep, end)
Appends all elements of this mutable indexed sequence to a string builder.
Appends all elements of this mutable indexed sequence to a string builder.
The written text consists of the string representations (w.r.t. the method
toString
) of all elements of this mutable indexed sequence without any separator string.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> val h = a.addString(b) h: StringBuilder = 1234
the string builder to which elements are appended.
the string builder b
to which elements were appended.
(array: ofInt).addString(b)
Appends all elements of this mutable indexed sequence to a string builder using a separator string.
Appends all elements of this mutable indexed sequence to a string builder using a separator string.
The written text consists of the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence, separated by the string sep
.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> a.addString(b, ", ") res0: StringBuilder = 1, 2, 3, 4
the string builder to which elements are appended.
the separator string.
the string builder b
to which elements were appended.
(array: ofInt).addString(b, sep)
Appends all elements of this mutable indexed sequence to a string builder using start, end, and separator strings.
Appends all elements of this mutable indexed sequence to a string builder using start, end, and separator strings.
The written text begins with the string start
and ends with the string end
.
Inside, the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence are separated by the string sep
.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> a.addString(b , "List(" , ", " , ")") res5: StringBuilder = List(1, 2, 3, 4)
the string builder to which elements are appended.
the starting string.
the separator string.
the ending string.
the string builder b
to which elements were appended.
(array: ofInt).addString(b, start, sep, end)
Appends all elements of this mutable indexed sequence to a string builder.
Appends all elements of this mutable indexed sequence to a string builder.
The written text consists of the string representations (w.r.t. the method
toString
) of all elements of this mutable indexed sequence without any separator string.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> val h = a.addString(b) h: StringBuilder = 1234
the string builder to which elements are appended.
the string builder b
to which elements were appended.
(array: ofFloat).addString(b)
Appends all elements of this mutable indexed sequence to a string builder using a separator string.
Appends all elements of this mutable indexed sequence to a string builder using a separator string.
The written text consists of the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence, separated by the string sep
.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> a.addString(b, ", ") res0: StringBuilder = 1, 2, 3, 4
the string builder to which elements are appended.
the separator string.
the string builder b
to which elements were appended.
(array: ofFloat).addString(b, sep)
Appends all elements of this mutable indexed sequence to a string builder using start, end, and separator strings.
Appends all elements of this mutable indexed sequence to a string builder using start, end, and separator strings.
The written text begins with the string start
and ends with the string end
.
Inside, the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence are separated by the string sep
.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> a.addString(b , "List(" , ", " , ")") res5: StringBuilder = List(1, 2, 3, 4)
the string builder to which elements are appended.
the starting string.
the separator string.
the ending string.
the string builder b
to which elements were appended.
(array: ofFloat).addString(b, start, sep, end)
Appends all elements of this mutable indexed sequence to a string builder.
Appends all elements of this mutable indexed sequence to a string builder.
The written text consists of the string representations (w.r.t. the method
toString
) of all elements of this mutable indexed sequence without any separator string.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> val h = a.addString(b) h: StringBuilder = 1234
the string builder to which elements are appended.
the string builder b
to which elements were appended.
(array: ofDouble).addString(b)
Appends all elements of this mutable indexed sequence to a string builder using a separator string.
Appends all elements of this mutable indexed sequence to a string builder using a separator string.
The written text consists of the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence, separated by the string sep
.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> a.addString(b, ", ") res0: StringBuilder = 1, 2, 3, 4
the string builder to which elements are appended.
the separator string.
the string builder b
to which elements were appended.
(array: ofDouble).addString(b, sep)
Appends all elements of this mutable indexed sequence to a string builder using start, end, and separator strings.
Appends all elements of this mutable indexed sequence to a string builder using start, end, and separator strings.
The written text begins with the string start
and ends with the string end
.
Inside, the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence are separated by the string sep
.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> a.addString(b , "List(" , ", " , ")") res5: StringBuilder = List(1, 2, 3, 4)
the string builder to which elements are appended.
the starting string.
the separator string.
the ending string.
the string builder b
to which elements were appended.
(array: ofDouble).addString(b, start, sep, end)
Appends all elements of this mutable indexed sequence to a string builder.
Appends all elements of this mutable indexed sequence to a string builder.
The written text consists of the string representations (w.r.t. the method
toString
) of all elements of this mutable indexed sequence without any separator string.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> val h = a.addString(b) h: StringBuilder = 1234
the string builder to which elements are appended.
the string builder b
to which elements were appended.
(array: ofChar).addString(b)
Appends all elements of this mutable indexed sequence to a string builder using a separator string.
Appends all elements of this mutable indexed sequence to a string builder using a separator string.
The written text consists of the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence, separated by the string sep
.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> a.addString(b, ", ") res0: StringBuilder = 1, 2, 3, 4
the string builder to which elements are appended.
the separator string.
the string builder b
to which elements were appended.
(array: ofChar).addString(b, sep)
Appends all elements of this mutable indexed sequence to a string builder using start, end, and separator strings.
Appends all elements of this mutable indexed sequence to a string builder using start, end, and separator strings.
The written text begins with the string start
and ends with the string end
.
Inside, the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence are separated by the string sep
.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> a.addString(b , "List(" , ", " , ")") res5: StringBuilder = List(1, 2, 3, 4)
the string builder to which elements are appended.
the starting string.
the separator string.
the ending string.
the string builder b
to which elements were appended.
(array: ofChar).addString(b, start, sep, end)
Appends all elements of this mutable indexed sequence to a string builder.
Appends all elements of this mutable indexed sequence to a string builder.
The written text consists of the string representations (w.r.t. the method
toString
) of all elements of this mutable indexed sequence without any separator string.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> val h = a.addString(b) h: StringBuilder = 1234
the string builder to which elements are appended.
the string builder b
to which elements were appended.
(array: ofByte).addString(b)
Appends all elements of this mutable indexed sequence to a string builder using a separator string.
Appends all elements of this mutable indexed sequence to a string builder using a separator string.
The written text consists of the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence, separated by the string sep
.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> a.addString(b, ", ") res0: StringBuilder = 1, 2, 3, 4
the string builder to which elements are appended.
the separator string.
the string builder b
to which elements were appended.
(array: ofByte).addString(b, sep)
Appends all elements of this mutable indexed sequence to a string builder using start, end, and separator strings.
Appends all elements of this mutable indexed sequence to a string builder using start, end, and separator strings.
The written text begins with the string start
and ends with the string end
.
Inside, the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence are separated by the string sep
.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> a.addString(b , "List(" , ", " , ")") res5: StringBuilder = List(1, 2, 3, 4)
the string builder to which elements are appended.
the starting string.
the separator string.
the ending string.
the string builder b
to which elements were appended.
(array: ofByte).addString(b, start, sep, end)
Appends all elements of this mutable indexed sequence to a string builder.
Appends all elements of this mutable indexed sequence to a string builder.
The written text consists of the string representations (w.r.t. the method
toString
) of all elements of this mutable indexed sequence without any separator string.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> val h = a.addString(b) h: StringBuilder = 1234
the string builder to which elements are appended.
the string builder b
to which elements were appended.
(array: ofBoolean).addString(b)
Appends all elements of this mutable indexed sequence to a string builder using a separator string.
Appends all elements of this mutable indexed sequence to a string builder using a separator string.
The written text consists of the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence, separated by the string sep
.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> a.addString(b, ", ") res0: StringBuilder = 1, 2, 3, 4
the string builder to which elements are appended.
the separator string.
the string builder b
to which elements were appended.
(array: ofBoolean).addString(b, sep)
Appends all elements of this mutable indexed sequence to a string builder using start, end, and separator strings.
Appends all elements of this mutable indexed sequence to a string builder using start, end, and separator strings.
The written text begins with the string start
and ends with the string end
.
Inside, the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence are separated by the string sep
.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> a.addString(b , "List(" , ", " , ")") res5: StringBuilder = List(1, 2, 3, 4)
the string builder to which elements are appended.
the starting string.
the separator string.
the ending string.
the string builder b
to which elements were appended.
(array: ofBoolean).addString(b, start, sep, end)
Appends all elements of this mutable indexed sequence to a string builder.
Appends all elements of this mutable indexed sequence to a string builder.
The written text consists of the string representations (w.r.t. the method
toString
) of all elements of this mutable indexed sequence without any separator string.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> val h = a.addString(b) h: StringBuilder = 1234
the string builder to which elements are appended.
the string builder b
to which elements were appended.
(array: ArrayOps[T]).addString(b)
Appends all elements of this mutable indexed sequence to a string builder using a separator string.
Appends all elements of this mutable indexed sequence to a string builder using a separator string.
The written text consists of the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence, separated by the string sep
.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> a.addString(b, ", ") res0: StringBuilder = 1, 2, 3, 4
the string builder to which elements are appended.
the separator string.
the string builder b
to which elements were appended.
(array: ArrayOps[T]).addString(b, sep)
Appends all elements of this mutable indexed sequence to a string builder using start, end, and separator strings.
Appends all elements of this mutable indexed sequence to a string builder using start, end, and separator strings.
The written text begins with the string start
and ends with the string end
.
Inside, the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence are separated by the string sep
.
Example:
scala> val a = List(1,2,3,4) a: List[Int] = List(1, 2, 3, 4) scala> val b = new StringBuilder() b: StringBuilder = scala> a.addString(b , "List(" , ", " , ")") res5: StringBuilder = List(1, 2, 3, 4)
the string builder to which elements are appended.
the starting string.
the separator string.
the ending string.
the string builder b
to which elements were appended.
(array: ArrayOps[T]).addString(b, start, sep, end)
Aggregates the results of applying an operator to subsequent elements.
Aggregates the results of applying an operator to subsequent elements.
This is a more general form of fold
and reduce
. It has similar
semantics, but does not require the result to be a supertype of the
element type. It traverses the elements in different partitions
sequentially, using seqop
to update the result, and then applies
combop
to results from different partitions. The implementation of
this operation may operate on an arbitrary number of collection
partitions, so combop
may be invoked an arbitrary number of times.
For example, one might want to process some elements and then produce
a Set
. In this case, seqop
would process an element and append it
to the list, while combop
would concatenate two lists from different
partitions together. The initial value z
would be an empty set.
pc.aggregate(Set[Int]())(_ += process(_), _ ++ _)
Another example is calculating geometric mean from a collection of doubles (one would typically require big doubles for this).
the type of accumulated results
the initial value for the accumulated result of the partition - this
will typically be the neutral element for the seqop
operator (e.g.
Nil
for list concatenation or 0
for summation) and may be evaluated
more than once
an operator used to accumulate results within a partition
an associative operator used to combine results from different partitions
(array: ofRef[T]).aggregate(z)(seqop, combop)
Aggregates the results of applying an operator to subsequent elements.
Aggregates the results of applying an operator to subsequent elements.
This is a more general form of fold
and reduce
. It has similar
semantics, but does not require the result to be a supertype of the
element type. It traverses the elements in different partitions
sequentially, using seqop
to update the result, and then applies
combop
to results from different partitions. The implementation of
this operation may operate on an arbitrary number of collection
partitions, so combop
may be invoked an arbitrary number of times.
For example, one might want to process some elements and then produce
a Set
. In this case, seqop
would process an element and append it
to the list, while combop
would concatenate two lists from different
partitions together. The initial value z
would be an empty set.
pc.aggregate(Set[Int]())(_ += process(_), _ ++ _)
Another example is calculating geometric mean from a collection of doubles (one would typically require big doubles for this).
the type of accumulated results
the initial value for the accumulated result of the partition - this
will typically be the neutral element for the seqop
operator (e.g.
Nil
for list concatenation or 0
for summation) and may be evaluated
more than once
an operator used to accumulate results within a partition
an associative operator used to combine results from different partitions
(array: ArrayOps[T]).aggregate(z)(seqop, combop)
Selects an element by its index in the mutable indexed sequence.
Selects an element by its index in the mutable indexed sequence.
Example:
scala> val x = List(1, 2, 3, 4, 5) x: List[Int] = List(1, 2, 3, 4, 5) scala> x(3) res1: Int = 4
the element of this mutable indexed sequence at index idx
, where 0
indicates the first element.
(array: ofUnit).apply(index)
IndexOutOfBoundsException
if idx
does not satisfy 0 <= idx < length
.
Selects an element by its index in the mutable indexed sequence.
Selects an element by its index in the mutable indexed sequence.
Example:
scala> val x = List(1, 2, 3, 4, 5) x: List[Int] = List(1, 2, 3, 4, 5) scala> x(3) res1: Int = 4
the element of this mutable indexed sequence at index idx
, where 0
indicates the first element.
(array: ofShort).apply(index)
IndexOutOfBoundsException
if idx
does not satisfy 0 <= idx < length
.
Selects an element by its index in the mutable indexed sequence.
Selects an element by its index in the mutable indexed sequence.
Example:
scala> val x = List(1, 2, 3, 4, 5) x: List[Int] = List(1, 2, 3, 4, 5) scala> x(3) res1: Int = 4
the element of this mutable indexed sequence at index idx
, where 0
indicates the first element.
(array: ofRef[T]).apply(index)
IndexOutOfBoundsException
if idx
does not satisfy 0 <= idx < length
.
Selects an element by its index in the mutable indexed sequence.
Selects an element by its index in the mutable indexed sequence.
Example:
scala> val x = List(1, 2, 3, 4, 5) x: List[Int] = List(1, 2, 3, 4, 5) scala> x(3) res1: Int = 4
the element of this mutable indexed sequence at index idx
, where 0
indicates the first element.
(array: ofLong).apply(index)
IndexOutOfBoundsException
if idx
does not satisfy 0 <= idx < length
.
Selects an element by its index in the mutable indexed sequence.
Selects an element by its index in the mutable indexed sequence.
Example:
scala> val x = List(1, 2, 3, 4, 5) x: List[Int] = List(1, 2, 3, 4, 5) scala> x(3) res1: Int = 4
the element of this mutable indexed sequence at index idx
, where 0
indicates the first element.
(array: ofInt).apply(index)
IndexOutOfBoundsException
if idx
does not satisfy 0 <= idx < length
.
Selects an element by its index in the mutable indexed sequence.
Selects an element by its index in the mutable indexed sequence.
Example:
scala> val x = List(1, 2, 3, 4, 5) x: List[Int] = List(1, 2, 3, 4, 5) scala> x(3) res1: Int = 4
the element of this mutable indexed sequence at index idx
, where 0
indicates the first element.
(array: ofFloat).apply(index)
IndexOutOfBoundsException
if idx
does not satisfy 0 <= idx < length
.
Selects an element by its index in the mutable indexed sequence.
Selects an element by its index in the mutable indexed sequence.
Example:
scala> val x = List(1, 2, 3, 4, 5) x: List[Int] = List(1, 2, 3, 4, 5) scala> x(3) res1: Int = 4
the element of this mutable indexed sequence at index idx
, where 0
indicates the first element.
(array: ofDouble).apply(index)
IndexOutOfBoundsException
if idx
does not satisfy 0 <= idx < length
.
Selects an element by its index in the mutable indexed sequence.
Selects an element by its index in the mutable indexed sequence.
Example:
scala> val x = List(1, 2, 3, 4, 5) x: List[Int] = List(1, 2, 3, 4, 5) scala> x(3) res1: Int = 4
the element of this mutable indexed sequence at index idx
, where 0
indicates the first element.
(array: ofChar).apply(index)
IndexOutOfBoundsException
if idx
does not satisfy 0 <= idx < length
.
Selects an element by its index in the mutable indexed sequence.
Selects an element by its index in the mutable indexed sequence.
Example:
scala> val x = List(1, 2, 3, 4, 5) x: List[Int] = List(1, 2, 3, 4, 5) scala> x(3) res1: Int = 4
the element of this mutable indexed sequence at index idx
, where 0
indicates the first element.
(array: ofByte).apply(index)
IndexOutOfBoundsException
if idx
does not satisfy 0 <= idx < length
.
Selects an element by its index in the mutable indexed sequence.
Selects an element by its index in the mutable indexed sequence.
Example:
scala> val x = List(1, 2, 3, 4, 5) x: List[Int] = List(1, 2, 3, 4, 5) scala> x(3) res1: Int = 4
the element of this mutable indexed sequence at index idx
, where 0
indicates the first element.
(array: ofBoolean).apply(index)
IndexOutOfBoundsException
if idx
does not satisfy 0 <= idx < length
.
Selects an element by its index in the mutable indexed sequence.
Selects an element by its index in the mutable indexed sequence.
Example:
scala> val x = List(1, 2, 3, 4, 5) x: List[Int] = List(1, 2, 3, 4, 5) scala> x(3) res1: Int = 4
The index to select.
the element of this mutable indexed sequence at index idx
, where 0
indicates the first element.
(array: ArrayOps[T]).apply(idx)
IndexOutOfBoundsException
if idx
does not satisfy 0 <= idx < length
.
Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind.
Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind.
The object with which this mutable indexed sequence should be compared
true
, if this mutable indexed sequence can possibly equal that
, false
otherwise. The test
takes into consideration only the run-time types of objects but ignores their elements.
(array: ofUnit).canEqual(that)
Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind.
Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind.
The object with which this mutable indexed sequence should be compared
true
, if this mutable indexed sequence can possibly equal that
, false
otherwise. The test
takes into consideration only the run-time types of objects but ignores their elements.
(array: ofShort).canEqual(that)
Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind.
Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind.
The object with which this mutable indexed sequence should be compared
true
, if this mutable indexed sequence can possibly equal that
, false
otherwise. The test
takes into consideration only the run-time types of objects but ignores their elements.
(array: ofRef[T]).canEqual(that)
Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind.
Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind.
The object with which this mutable indexed sequence should be compared
true
, if this mutable indexed sequence can possibly equal that
, false
otherwise. The test
takes into consideration only the run-time types of objects but ignores their elements.
(array: ofLong).canEqual(that)
Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind.
Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind.
The object with which this mutable indexed sequence should be compared
true
, if this mutable indexed sequence can possibly equal that
, false
otherwise. The test
takes into consideration only the run-time types of objects but ignores their elements.
(array: ofInt).canEqual(that)
Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind.
Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind.
The object with which this mutable indexed sequence should be compared
true
, if this mutable indexed sequence can possibly equal that
, false
otherwise. The test
takes into consideration only the run-time types of objects but ignores their elements.
(array: ofFloat).canEqual(that)
Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind.
Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind.
The object with which this mutable indexed sequence should be compared
true
, if this mutable indexed sequence can possibly equal that
, false
otherwise. The test
takes into consideration only the run-time types of objects but ignores their elements.
(array: ofDouble).canEqual(that)
Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind.
Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind.
The object with which this mutable indexed sequence should be compared
true
, if this mutable indexed sequence can possibly equal that
, false
otherwise. The test
takes into consideration only the run-time types of objects but ignores their elements.
(array: ofChar).canEqual(that)
Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind.
Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind.
The object with which this mutable indexed sequence should be compared
true
, if this mutable indexed sequence can possibly equal that
, false
otherwise. The test
takes into consideration only the run-time types of objects but ignores their elements.
(array: ofByte).canEqual(that)
Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind.
Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind.
The object with which this mutable indexed sequence should be compared
true
, if this mutable indexed sequence can possibly equal that
, false
otherwise. The test
takes into consideration only the run-time types of objects but ignores their elements.
(array: ofBoolean).canEqual(that)
Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind.
Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind.
The object with which this mutable indexed sequence should be compared
true
, if this mutable indexed sequence can possibly equal that
, false
otherwise. The test
takes into consideration only the run-time types of objects but ignores their elements.
(array: ArrayOps[T]).canEqual(that)
Finds the first element of the mutable indexed sequence for which the given partial function is defined, and applies the partial function to it.
Finds the first element of the mutable indexed sequence for which the given partial function is defined, and applies the partial function to it.
the partial function
an option value containing pf applied to the first
value for which it is defined, or None
if none exists.
(array: ofRef[T]).collectFirst(pf)
Seq("a", 1, 5L).collectFirst({ case x: Int => x*10 }) = Some(10)
Finds the first element of the mutable indexed sequence for which the given partial function is defined, and applies the partial function to it.
Finds the first element of the mutable indexed sequence for which the given partial function is defined, and applies the partial function to it.
the partial function
an option value containing pf applied to the first
value for which it is defined, or None
if none exists.
(array: ArrayOps[T]).collectFirst(pf)
Seq("a", 1, 5L).collectFirst({ case x: Int => x*10 }) = Some(10)
Iterates over combinations.
Iterates over combinations. A _combination_ of length n
is a subsequence of
the original sequence, with the elements taken in order. Thus, "xy"
and "yy"
are both length-2 combinations of "xyy"
, but "yx"
is not. If there is
more than one way to generate the same subsequence, only one will be returned.
For example, "xyyy"
has three different ways to generate "xy"
depending on
whether the first, second, or third "y"
is selected. However, since all are
identical, only one will be chosen. Which of the three will be taken is an
implementation detail that is not defined.
An Iterator which traverses the possible n-element combinations of this mutable indexed sequence.
(array: ofUnit).combinations(n)
"abbbc".combinations(2) = Iterator(ab, ac, bb, bc)
Iterates over combinations.
Iterates over combinations. A _combination_ of length n
is a subsequence of
the original sequence, with the elements taken in order. Thus, "xy"
and "yy"
are both length-2 combinations of "xyy"
, but "yx"
is not. If there is
more than one way to generate the same subsequence, only one will be returned.
For example, "xyyy"
has three different ways to generate "xy"
depending on
whether the first, second, or third "y"
is selected. However, since all are
identical, only one will be chosen. Which of the three will be taken is an
implementation detail that is not defined.
An Iterator which traverses the possible n-element combinations of this mutable indexed sequence.
(array: ofShort).combinations(n)
"abbbc".combinations(2) = Iterator(ab, ac, bb, bc)
Iterates over combinations.
Iterates over combinations. A _combination_ of length n
is a subsequence of
the original sequence, with the elements taken in order. Thus, "xy"
and "yy"
are both length-2 combinations of "xyy"
, but "yx"
is not. If there is
more than one way to generate the same subsequence, only one will be returned.
For example, "xyyy"
has three different ways to generate "xy"
depending on
whether the first, second, or third "y"
is selected. However, since all are
identical, only one will be chosen. Which of the three will be taken is an
implementation detail that is not defined.
An Iterator which traverses the possible n-element combinations of this mutable indexed sequence.
(array: ofRef[T]).combinations(n)
"abbbc".combinations(2) = Iterator(ab, ac, bb, bc)
Iterates over combinations.
Iterates over combinations. A _combination_ of length n
is a subsequence of
the original sequence, with the elements taken in order. Thus, "xy"
and "yy"
are both length-2 combinations of "xyy"
, but "yx"
is not. If there is
more than one way to generate the same subsequence, only one will be returned.
For example, "xyyy"
has three different ways to generate "xy"
depending on
whether the first, second, or third "y"
is selected. However, since all are
identical, only one will be chosen. Which of the three will be taken is an
implementation detail that is not defined.
An Iterator which traverses the possible n-element combinations of this mutable indexed sequence.
(array: ofLong).combinations(n)
"abbbc".combinations(2) = Iterator(ab, ac, bb, bc)
Iterates over combinations.
Iterates over combinations. A _combination_ of length n
is a subsequence of
the original sequence, with the elements taken in order. Thus, "xy"
and "yy"
are both length-2 combinations of "xyy"
, but "yx"
is not. If there is
more than one way to generate the same subsequence, only one will be returned.
For example, "xyyy"
has three different ways to generate "xy"
depending on
whether the first, second, or third "y"
is selected. However, since all are
identical, only one will be chosen. Which of the three will be taken is an
implementation detail that is not defined.
An Iterator which traverses the possible n-element combinations of this mutable indexed sequence.
(array: ofInt).combinations(n)
"abbbc".combinations(2) = Iterator(ab, ac, bb, bc)
Iterates over combinations.
Iterates over combinations. A _combination_ of length n
is a subsequence of
the original sequence, with the elements taken in order. Thus, "xy"
and "yy"
are both length-2 combinations of "xyy"
, but "yx"
is not. If there is
more than one way to generate the same subsequence, only one will be returned.
For example, "xyyy"
has three different ways to generate "xy"
depending on
whether the first, second, or third "y"
is selected. However, since all are
identical, only one will be chosen. Which of the three will be taken is an
implementation detail that is not defined.
An Iterator which traverses the possible n-element combinations of this mutable indexed sequence.
(array: ofFloat).combinations(n)
"abbbc".combinations(2) = Iterator(ab, ac, bb, bc)
Iterates over combinations.
Iterates over combinations. A _combination_ of length n
is a subsequence of
the original sequence, with the elements taken in order. Thus, "xy"
and "yy"
are both length-2 combinations of "xyy"
, but "yx"
is not. If there is
more than one way to generate the same subsequence, only one will be returned.
For example, "xyyy"
has three different ways to generate "xy"
depending on
whether the first, second, or third "y"
is selected. However, since all are
identical, only one will be chosen. Which of the three will be taken is an
implementation detail that is not defined.
An Iterator which traverses the possible n-element combinations of this mutable indexed sequence.
(array: ofDouble).combinations(n)
"abbbc".combinations(2) = Iterator(ab, ac, bb, bc)
Iterates over combinations.
Iterates over combinations. A _combination_ of length n
is a subsequence of
the original sequence, with the elements taken in order. Thus, "xy"
and "yy"
are both length-2 combinations of "xyy"
, but "yx"
is not. If there is
more than one way to generate the same subsequence, only one will be returned.
For example, "xyyy"
has three different ways to generate "xy"
depending on
whether the first, second, or third "y"
is selected. However, since all are
identical, only one will be chosen. Which of the three will be taken is an
implementation detail that is not defined.
An Iterator which traverses the possible n-element combinations of this mutable indexed sequence.
(array: ofChar).combinations(n)
"abbbc".combinations(2) = Iterator(ab, ac, bb, bc)
Iterates over combinations.
Iterates over combinations. A _combination_ of length n
is a subsequence of
the original sequence, with the elements taken in order. Thus, "xy"
and "yy"
are both length-2 combinations of "xyy"
, but "yx"
is not. If there is
more than one way to generate the same subsequence, only one will be returned.
For example, "xyyy"
has three different ways to generate "xy"
depending on
whether the first, second, or third "y"
is selected. However, since all are
identical, only one will be chosen. Which of the three will be taken is an
implementation detail that is not defined.
An Iterator which traverses the possible n-element combinations of this mutable indexed sequence.
(array: ofByte).combinations(n)
"abbbc".combinations(2) = Iterator(ab, ac, bb, bc)
Iterates over combinations.
Iterates over combinations. A _combination_ of length n
is a subsequence of
the original sequence, with the elements taken in order. Thus, "xy"
and "yy"
are both length-2 combinations of "xyy"
, but "yx"
is not. If there is
more than one way to generate the same subsequence, only one will be returned.
For example, "xyyy"
has three different ways to generate "xy"
depending on
whether the first, second, or third "y"
is selected. However, since all are
identical, only one will be chosen. Which of the three will be taken is an
implementation detail that is not defined.
An Iterator which traverses the possible n-element combinations of this mutable indexed sequence.
(array: ofBoolean).combinations(n)
"abbbc".combinations(2) = Iterator(ab, ac, bb, bc)
Iterates over combinations.
Iterates over combinations. A _combination_ of length n
is a subsequence of
the original sequence, with the elements taken in order. Thus, "xy"
and "yy"
are both length-2 combinations of "xyy"
, but "yx"
is not. If there is
more than one way to generate the same subsequence, only one will be returned.
For example, "xyyy"
has three different ways to generate "xy"
depending on
whether the first, second, or third "y"
is selected. However, since all are
identical, only one will be chosen. Which of the three will be taken is an
implementation detail that is not defined.
An Iterator which traverses the possible n-element combinations of this mutable indexed sequence.
(array: ArrayOps[T]).combinations(n)
"abbbc".combinations(2) = Iterator(ab, ac, bb, bc)
Tests whether this mutable indexed sequence contains a given sequence as a slice.
Tests whether this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
true
if this mutable indexed sequence contains a slice with the same elements
as that
, otherwise false
.
(array: ofUnit).containsSlice(that)
Tests whether this mutable indexed sequence contains a given sequence as a slice.
Tests whether this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
true
if this mutable indexed sequence contains a slice with the same elements
as that
, otherwise false
.
(array: ofShort).containsSlice(that)
Tests whether this mutable indexed sequence contains a given sequence as a slice.
Tests whether this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
true
if this mutable indexed sequence contains a slice with the same elements
as that
, otherwise false
.
(array: ofRef[T]).containsSlice(that)
Tests whether this mutable indexed sequence contains a given sequence as a slice.
Tests whether this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
true
if this mutable indexed sequence contains a slice with the same elements
as that
, otherwise false
.
(array: ofLong).containsSlice(that)
Tests whether this mutable indexed sequence contains a given sequence as a slice.
Tests whether this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
true
if this mutable indexed sequence contains a slice with the same elements
as that
, otherwise false
.
(array: ofInt).containsSlice(that)
Tests whether this mutable indexed sequence contains a given sequence as a slice.
Tests whether this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
true
if this mutable indexed sequence contains a slice with the same elements
as that
, otherwise false
.
(array: ofFloat).containsSlice(that)
Tests whether this mutable indexed sequence contains a given sequence as a slice.
Tests whether this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
true
if this mutable indexed sequence contains a slice with the same elements
as that
, otherwise false
.
(array: ofDouble).containsSlice(that)
Tests whether this mutable indexed sequence contains a given sequence as a slice.
Tests whether this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
true
if this mutable indexed sequence contains a slice with the same elements
as that
, otherwise false
.
(array: ofChar).containsSlice(that)
Tests whether this mutable indexed sequence contains a given sequence as a slice.
Tests whether this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
true
if this mutable indexed sequence contains a slice with the same elements
as that
, otherwise false
.
(array: ofByte).containsSlice(that)
Tests whether this mutable indexed sequence contains a given sequence as a slice.
Tests whether this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
true
if this mutable indexed sequence contains a slice with the same elements
as that
, otherwise false
.
(array: ofBoolean).containsSlice(that)
Tests whether this mutable indexed sequence contains a given sequence as a slice.
Tests whether this mutable indexed sequence contains a given sequence as a slice.
the sequence to test
true
if this mutable indexed sequence contains a slice with the same elements
as that
, otherwise false
.
(array: ArrayOps[T]).containsSlice(that)
[use case] Copies elements of this array to an array.
Copies elements of this array to an array.
Fills the given array xs
with at most len
elements of
this array, starting at position start
.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached, or len
elements have been copied.
the array to fill.
the starting index.
the maximal number of elements to copy.
(array: ofUnit).copyToArray(xs, start, len)
[use case] Copies values of this array to an array.
Copies values of this array to an array.
Fills the given array xs
with values of this array.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached.
the array to fill.
(array: ofUnit).copyToArray(xs)
[use case] Copies values of this array to an array.
Copies values of this array to an array.
Fills the given array xs
with values of this array, beginning at index start
.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached.
the array to fill.
the starting index.
(array: ofUnit).copyToArray(xs, start)
[use case] Copies elements of this array to an array.
Copies elements of this array to an array.
Fills the given array xs
with at most len
elements of
this array, starting at position start
.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached, or len
elements have been copied.
the array to fill.
the starting index.
the maximal number of elements to copy.
(array: ofShort).copyToArray(xs, start, len)
[use case] Copies values of this array to an array.
Copies values of this array to an array.
Fills the given array xs
with values of this array.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached.
the array to fill.
(array: ofShort).copyToArray(xs)
[use case] Copies values of this array to an array.
Copies values of this array to an array.
Fills the given array xs
with values of this array, beginning at index start
.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached.
the array to fill.
the starting index.
(array: ofShort).copyToArray(xs, start)
[use case] Copies elements of this array to an array.
Copies elements of this array to an array.
Fills the given array xs
with at most len
elements of
this array, starting at position start
.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached, or len
elements have been copied.
the array to fill.
the starting index.
the maximal number of elements to copy.
(array: ofRef[T]).copyToArray(xs, start, len)
[use case] Copies values of this array to an array.
Copies values of this array to an array.
Fills the given array xs
with values of this array.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached.
the array to fill.
(array: ofRef[T]).copyToArray(xs)
[use case] Copies values of this array to an array.
Copies values of this array to an array.
Fills the given array xs
with values of this array, beginning at index start
.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached.
the array to fill.
the starting index.
(array: ofRef[T]).copyToArray(xs, start)
[use case] Copies elements of this array to an array.
Copies elements of this array to an array.
Fills the given array xs
with at most len
elements of
this array, starting at position start
.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached, or len
elements have been copied.
the array to fill.
the starting index.
the maximal number of elements to copy.
(array: ofLong).copyToArray(xs, start, len)
[use case] Copies values of this array to an array.
Copies values of this array to an array.
Fills the given array xs
with values of this array.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached.
the array to fill.
(array: ofLong).copyToArray(xs)
[use case] Copies values of this array to an array.
Copies values of this array to an array.
Fills the given array xs
with values of this array, beginning at index start
.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached.
the array to fill.
the starting index.
(array: ofLong).copyToArray(xs, start)
[use case] Copies elements of this array to an array.
Copies elements of this array to an array.
Fills the given array xs
with at most len
elements of
this array, starting at position start
.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached, or len
elements have been copied.
the array to fill.
the starting index.
the maximal number of elements to copy.
(array: ofInt).copyToArray(xs, start, len)
[use case] Copies values of this array to an array.
Copies values of this array to an array.
Fills the given array xs
with values of this array.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached.
the array to fill.
(array: ofInt).copyToArray(xs)
[use case] Copies values of this array to an array.
Copies values of this array to an array.
Fills the given array xs
with values of this array, beginning at index start
.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached.
the array to fill.
the starting index.
(array: ofInt).copyToArray(xs, start)
[use case] Copies elements of this array to an array.
Copies elements of this array to an array.
Fills the given array xs
with at most len
elements of
this array, starting at position start
.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached, or len
elements have been copied.
the array to fill.
the starting index.
the maximal number of elements to copy.
(array: ofFloat).copyToArray(xs, start, len)
[use case] Copies values of this array to an array.
Copies values of this array to an array.
Fills the given array xs
with values of this array.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached.
the array to fill.
(array: ofFloat).copyToArray(xs)
[use case] Copies values of this array to an array.
Copies values of this array to an array.
Fills the given array xs
with values of this array, beginning at index start
.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached.
the array to fill.
the starting index.
(array: ofFloat).copyToArray(xs, start)
[use case] Copies elements of this array to an array.
Copies elements of this array to an array.
Fills the given array xs
with at most len
elements of
this array, starting at position start
.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached, or len
elements have been copied.
the array to fill.
the starting index.
the maximal number of elements to copy.
(array: ofDouble).copyToArray(xs, start, len)
[use case] Copies values of this array to an array.
Copies values of this array to an array.
Fills the given array xs
with values of this array.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached.
the array to fill.
(array: ofDouble).copyToArray(xs)
[use case] Copies values of this array to an array.
Copies values of this array to an array.
Fills the given array xs
with values of this array, beginning at index start
.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached.
the array to fill.
the starting index.
(array: ofDouble).copyToArray(xs, start)
[use case] Copies elements of this array to an array.
Copies elements of this array to an array.
Fills the given array xs
with at most len
elements of
this array, starting at position start
.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached, or len
elements have been copied.
the array to fill.
the starting index.
the maximal number of elements to copy.
(array: ofChar).copyToArray(xs, start, len)
[use case] Copies values of this array to an array.
Copies values of this array to an array.
Fills the given array xs
with values of this array.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached.
the array to fill.
(array: ofChar).copyToArray(xs)
[use case] Copies values of this array to an array.
Copies values of this array to an array.
Fills the given array xs
with values of this array, beginning at index start
.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached.
the array to fill.
the starting index.
(array: ofChar).copyToArray(xs, start)
[use case] Copies elements of this array to an array.
Copies elements of this array to an array.
Fills the given array xs
with at most len
elements of
this array, starting at position start
.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached, or len
elements have been copied.
the array to fill.
the starting index.
the maximal number of elements to copy.
(array: ofByte).copyToArray(xs, start, len)
[use case] Copies values of this array to an array.
Copies values of this array to an array.
Fills the given array xs
with values of this array.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached.
the array to fill.
(array: ofByte).copyToArray(xs)
[use case] Copies values of this array to an array.
Copies values of this array to an array.
Fills the given array xs
with values of this array, beginning at index start
.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached.
the array to fill.
the starting index.
(array: ofByte).copyToArray(xs, start)
[use case] Copies elements of this array to an array.
Copies elements of this array to an array.
Fills the given array xs
with at most len
elements of
this array, starting at position start
.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached, or len
elements have been copied.
the array to fill.
the starting index.
the maximal number of elements to copy.
(array: ofBoolean).copyToArray(xs, start, len)
[use case] Copies values of this array to an array.
Copies values of this array to an array.
Fills the given array xs
with values of this array.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached.
the array to fill.
(array: ofBoolean).copyToArray(xs)
[use case] Copies values of this array to an array.
Copies values of this array to an array.
Fills the given array xs
with values of this array, beginning at index start
.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached.
the array to fill.
the starting index.
(array: ofBoolean).copyToArray(xs, start)
[use case] Copies elements of this array to an array.
Copies elements of this array to an array.
Fills the given array xs
with at most len
elements of
this array, starting at position start
.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached, or len
elements have been copied.
the array to fill.
the starting index.
the maximal number of elements to copy.
(array: ArrayOps[T]).copyToArray(xs, start, len)
[use case] Copies values of this array to an array.
Copies values of this array to an array.
Fills the given array xs
with values of this array.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached.
the array to fill.
(array: ArrayOps[T]).copyToArray(xs)
[use case] Copies values of this array to an array.
Copies values of this array to an array.
Fills the given array xs
with values of this array, beginning at index start
.
Copying will stop once either the end of the current array is reached,
or the end of the array is reached.
the array to fill.
the starting index.
(array: ArrayOps[T]).copyToArray(xs, start)
Tests whether every element of this mutable indexed sequence relates to the corresponding element of another sequence by satisfying a test predicate.
Tests whether every element of this mutable indexed sequence relates to the corresponding element of another sequence by satisfying a test predicate.
the type of the elements of that
the other sequence
the test predicate, which relates elements from both sequences
true
if both sequences have the same length and
p(x, y)
is true
for all corresponding elements x
of this mutable indexed sequence
and y
of that
, otherwise false
.
(array: ofRef[T]).corresponds(that)(p)
Tests whether every element of this mutable indexed sequence relates to the corresponding element of another sequence by satisfying a test predicate.
Tests whether every element of this mutable indexed sequence relates to the corresponding element of another sequence by satisfying a test predicate.
the type of the elements of that
the other sequence
the test predicate, which relates elements from both sequences
true
if both sequences have the same length and
p(x, y)
is true
for all corresponding elements x
of this mutable indexed sequence
and y
of that
, otherwise false
.
(array: ArrayOps[T]).corresponds(that)(p)
Counts the number of elements in the mutable indexed sequence which satisfy a predicate.
Counts the number of elements in the mutable indexed sequence which satisfy a predicate.
the predicate used to test elements.
the number of elements satisfying the predicate p
.
(array: ofRef[T]).count(p)
Counts the number of elements in the mutable indexed sequence which satisfy a predicate.
Counts the number of elements in the mutable indexed sequence which satisfy a predicate.
the predicate used to test elements.
the number of elements satisfying the predicate p
.
(array: ArrayOps[T]).count(p)
Creates a possible nested IndexedSeq
which consists of all the elements
of this array.
Creates a possible nested IndexedSeq
which consists of all the elements
of this array. If the elements are arrays themselves, the deep
transformation
is applied recursively to them. The stringPrefix
of the IndexedSeq
is
"Array", hence the IndexedSeq
prints like an array with all its
elements shown, and the same recursively for any subarrays.
Example:
Array(Array(1, 2), Array(3, 4)).deep.toString
prints: Array(Array(1, 2), Array(3, 4))
An possibly nested indexed sequence of consisting of all the elements of the array.
(array: ofUnit).deep
Creates a possible nested IndexedSeq
which consists of all the elements
of this array.
Creates a possible nested IndexedSeq
which consists of all the elements
of this array. If the elements are arrays themselves, the deep
transformation
is applied recursively to them. The stringPrefix
of the IndexedSeq
is
"Array", hence the IndexedSeq
prints like an array with all its
elements shown, and the same recursively for any subarrays.
Example:
Array(Array(1, 2), Array(3, 4)).deep.toString
prints: Array(Array(1, 2), Array(3, 4))
An possibly nested indexed sequence of consisting of all the elements of the array.
(array: ofShort).deep
Creates a possible nested IndexedSeq
which consists of all the elements
of this array.
Creates a possible nested IndexedSeq
which consists of all the elements
of this array. If the elements are arrays themselves, the deep
transformation
is applied recursively to them. The stringPrefix
of the IndexedSeq
is
"Array", hence the IndexedSeq
prints like an array with all its
elements shown, and the same recursively for any subarrays.
Example:
Array(Array(1, 2), Array(3, 4)).deep.toString
prints: Array(Array(1, 2), Array(3, 4))
An possibly nested indexed sequence of consisting of all the elements of the array.
(array: ofRef[T]).deep
Creates a possible nested IndexedSeq
which consists of all the elements
of this array.
Creates a possible nested IndexedSeq
which consists of all the elements
of this array. If the elements are arrays themselves, the deep
transformation
is applied recursively to them. The stringPrefix
of the IndexedSeq
is
"Array", hence the IndexedSeq
prints like an array with all its
elements shown, and the same recursively for any subarrays.
Example:
Array(Array(1, 2), Array(3, 4)).deep.toString
prints: Array(Array(1, 2), Array(3, 4))
An possibly nested indexed sequence of consisting of all the elements of the array.
(array: ofLong).deep
Creates a possible nested IndexedSeq
which consists of all the elements
of this array.
Creates a possible nested IndexedSeq
which consists of all the elements
of this array. If the elements are arrays themselves, the deep
transformation
is applied recursively to them. The stringPrefix
of the IndexedSeq
is
"Array", hence the IndexedSeq
prints like an array with all its
elements shown, and the same recursively for any subarrays.
Example:
Array(Array(1, 2), Array(3, 4)).deep.toString
prints: Array(Array(1, 2), Array(3, 4))
An possibly nested indexed sequence of consisting of all the elements of the array.
(array: ofInt).deep
Creates a possible nested IndexedSeq
which consists of all the elements
of this array.
Creates a possible nested IndexedSeq
which consists of all the elements
of this array. If the elements are arrays themselves, the deep
transformation
is applied recursively to them. The stringPrefix
of the IndexedSeq
is
"Array", hence the IndexedSeq
prints like an array with all its
elements shown, and the same recursively for any subarrays.
Example:
Array(Array(1, 2), Array(3, 4)).deep.toString
prints: Array(Array(1, 2), Array(3, 4))
An possibly nested indexed sequence of consisting of all the elements of the array.
(array: ofFloat).deep
Creates a possible nested IndexedSeq
which consists of all the elements
of this array.
Creates a possible nested IndexedSeq
which consists of all the elements
of this array. If the elements are arrays themselves, the deep
transformation
is applied recursively to them. The stringPrefix
of the IndexedSeq
is
"Array", hence the IndexedSeq
prints like an array with all its
elements shown, and the same recursively for any subarrays.
Example:
Array(Array(1, 2), Array(3, 4)).deep.toString
prints: Array(Array(1, 2), Array(3, 4))
An possibly nested indexed sequence of consisting of all the elements of the array.
(array: ofDouble).deep
Creates a possible nested IndexedSeq
which consists of all the elements
of this array.
Creates a possible nested IndexedSeq
which consists of all the elements
of this array. If the elements are arrays themselves, the deep
transformation
is applied recursively to them. The stringPrefix
of the IndexedSeq
is
"Array", hence the IndexedSeq
prints like an array with all its
elements shown, and the same recursively for any subarrays.
Example:
Array(Array(1, 2), Array(3, 4)).deep.toString
prints: Array(Array(1, 2), Array(3, 4))
An possibly nested indexed sequence of consisting of all the elements of the array.
(array: ofChar).deep
Creates a possible nested IndexedSeq
which consists of all the elements
of this array.
Creates a possible nested IndexedSeq
which consists of all the elements
of this array. If the elements are arrays themselves, the deep
transformation
is applied recursively to them. The stringPrefix
of the IndexedSeq
is
"Array", hence the IndexedSeq
prints like an array with all its
elements shown, and the same recursively for any subarrays.
Example:
Array(Array(1, 2), Array(3, 4)).deep.toString
prints: Array(Array(1, 2), Array(3, 4))
An possibly nested indexed sequence of consisting of all the elements of the array.
(array: ofByte).deep
Creates a possible nested IndexedSeq
which consists of all the elements
of this array.
Creates a possible nested IndexedSeq
which consists of all the elements
of this array. If the elements are arrays themselves, the deep
transformation
is applied recursively to them. The stringPrefix
of the IndexedSeq
is
"Array", hence the IndexedSeq
prints like an array with all its
elements shown, and the same recursively for any subarrays.
Example:
Array(Array(1, 2), Array(3, 4)).deep.toString
prints: Array(Array(1, 2), Array(3, 4))
An possibly nested indexed sequence of consisting of all the elements of the array.
(array: ofBoolean).deep
Creates a possible nested IndexedSeq
which consists of all the elements
of this array.
Creates a possible nested IndexedSeq
which consists of all the elements
of this array. If the elements are arrays themselves, the deep
transformation
is applied recursively to them. The stringPrefix
of the IndexedSeq
is
"Array", hence the IndexedSeq
prints like an array with all its
elements shown, and the same recursively for any subarrays.
Example:
Array(Array(1, 2), Array(3, 4)).deep.toString
prints: Array(Array(1, 2), Array(3, 4))
An possibly nested indexed sequence of consisting of all the elements of the array.
(array: ArrayOps[T]).deep
[use case] Computes the multiset difference between this array and another sequence.
Computes the multiset difference between this array and another sequence.
the sequence of elements to remove
a new array which contains all elements of this array
except some of occurrences of elements that also appear in that
.
If an element value x
appears
n times in that
, then the first n occurrences of x
will not form
part of the result, but any following occurrences will.
(array: ofRef[T]).diff(that)
[use case] Computes the multiset difference between this array and another sequence.
Computes the multiset difference between this array and another sequence.
the sequence of elements to remove
a new array which contains all elements of this array
except some of occurrences of elements that also appear in that
.
If an element value x
appears
n times in that
, then the first n occurrences of x
will not form
part of the result, but any following occurrences will.
(array: ArrayOps[T]).diff(that)
Builds a new mutable indexed sequence from this mutable indexed sequence without any duplicate elements.
Builds a new mutable indexed sequence from this mutable indexed sequence without any duplicate elements.
A new mutable indexed sequence which contains the first occurrence of every element of this mutable indexed sequence.
(array: ofUnit).distinct
Builds a new mutable indexed sequence from this mutable indexed sequence without any duplicate elements.
Builds a new mutable indexed sequence from this mutable indexed sequence without any duplicate elements.
A new mutable indexed sequence which contains the first occurrence of every element of this mutable indexed sequence.
(array: ofShort).distinct
Builds a new mutable indexed sequence from this mutable indexed sequence without any duplicate elements.
Builds a new mutable indexed sequence from this mutable indexed sequence without any duplicate elements.
A new mutable indexed sequence which contains the first occurrence of every element of this mutable indexed sequence.
(array: ofRef[T]).distinct
Builds a new mutable indexed sequence from this mutable indexed sequence without any duplicate elements.
Builds a new mutable indexed sequence from this mutable indexed sequence without any duplicate elements.
A new mutable indexed sequence which contains the first occurrence of every element of this mutable indexed sequence.
(array: ofLong).distinct
Builds a new mutable indexed sequence from this mutable indexed sequence without any duplicate elements.
Builds a new mutable indexed sequence from this mutable indexed sequence without any duplicate elements.
A new mutable indexed sequence which contains the first occurrence of every element of this mutable indexed sequence.
(array: ofInt).distinct
Builds a new mutable indexed sequence from this mutable indexed sequence without any duplicate elements.
Builds a new mutable indexed sequence from this mutable indexed sequence without any duplicate elements.
A new mutable indexed sequence which contains the first occurrence of every element of this mutable indexed sequence.
(array: ofFloat).distinct
Builds a new mutable indexed sequence from this mutable indexed sequence without any duplicate elements.
Builds a new mutable indexed sequence from this mutable indexed sequence without any duplicate elements.
A new mutable indexed sequence which contains the first occurrence of every element of this mutable indexed sequence.
(array: ofDouble).distinct
Builds a new mutable indexed sequence from this mutable indexed sequence without any duplicate elements.
Builds a new mutable indexed sequence from this mutable indexed sequence without any duplicate elements.
A new mutable indexed sequence which contains the first occurrence of every element of this mutable indexed sequence.
(array: ofChar).distinct
Builds a new mutable indexed sequence from this mutable indexed sequence without any duplicate elements.
Builds a new mutable indexed sequence from this mutable indexed sequence without any duplicate elements.
A new mutable indexed sequence which contains the first occurrence of every element of this mutable indexed sequence.
(array: ofByte).distinct
Builds a new mutable indexed sequence from this mutable indexed sequence without any duplicate elements.
Builds a new mutable indexed sequence from this mutable indexed sequence without any duplicate elements.
A new mutable indexed sequence which contains the first occurrence of every element of this mutable indexed sequence.
(array: ofBoolean).distinct
Builds a new mutable indexed sequence from this mutable indexed sequence without any duplicate elements.
Builds a new mutable indexed sequence from this mutable indexed sequence without any duplicate elements.
A new mutable indexed sequence which contains the first occurrence of every element of this mutable indexed sequence.
(array: ArrayOps[T]).distinct
Selects all elements except first n ones.
Selects all elements except first n ones.
the number of elements to drop from this mutable indexed sequence.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the first n
ones, or else the
empty mutable indexed sequence, if this mutable indexed sequence has less than n
elements.
(array: ofUnit).drop(n)
Selects all elements except first n ones.
Selects all elements except first n ones.
the number of elements to drop from this mutable indexed sequence.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the first n
ones, or else the
empty mutable indexed sequence, if this mutable indexed sequence has less than n
elements.
(array: ofShort).drop(n)
Selects all elements except first n ones.
Selects all elements except first n ones.
the number of elements to drop from this mutable indexed sequence.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the first n
ones, or else the
empty mutable indexed sequence, if this mutable indexed sequence has less than n
elements.
(array: ofRef[T]).drop(n)
Selects all elements except first n ones.
Selects all elements except first n ones.
the number of elements to drop from this mutable indexed sequence.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the first n
ones, or else the
empty mutable indexed sequence, if this mutable indexed sequence has less than n
elements.
(array: ofLong).drop(n)
Selects all elements except first n ones.
Selects all elements except first n ones.
the number of elements to drop from this mutable indexed sequence.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the first n
ones, or else the
empty mutable indexed sequence, if this mutable indexed sequence has less than n
elements.
(array: ofInt).drop(n)
Selects all elements except first n ones.
Selects all elements except first n ones.
the number of elements to drop from this mutable indexed sequence.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the first n
ones, or else the
empty mutable indexed sequence, if this mutable indexed sequence has less than n
elements.
(array: ofFloat).drop(n)
Selects all elements except first n ones.
Selects all elements except first n ones.
the number of elements to drop from this mutable indexed sequence.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the first n
ones, or else the
empty mutable indexed sequence, if this mutable indexed sequence has less than n
elements.
(array: ofDouble).drop(n)
Selects all elements except first n ones.
Selects all elements except first n ones.
the number of elements to drop from this mutable indexed sequence.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the first n
ones, or else the
empty mutable indexed sequence, if this mutable indexed sequence has less than n
elements.
(array: ofChar).drop(n)
Selects all elements except first n ones.
Selects all elements except first n ones.
the number of elements to drop from this mutable indexed sequence.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the first n
ones, or else the
empty mutable indexed sequence, if this mutable indexed sequence has less than n
elements.
(array: ofByte).drop(n)
Selects all elements except first n ones.
Selects all elements except first n ones.
the number of elements to drop from this mutable indexed sequence.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the first n
ones, or else the
empty mutable indexed sequence, if this mutable indexed sequence has less than n
elements.
(array: ofBoolean).drop(n)
Selects all elements except first n ones.
Selects all elements except first n ones.
the number of elements to drop from this mutable indexed sequence.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the first n
ones, or else the
empty mutable indexed sequence, if this mutable indexed sequence has less than n
elements.
(array: ArrayOps[T]).drop(n)
Selects all elements except last n ones.
Selects all elements except last n ones.
The number of elements to take
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the last n
ones, or else the
empty mutable indexed sequence, if this mutable indexed sequence has less than n
elements.
(array: ofUnit).dropRight(n)
Selects all elements except last n ones.
Selects all elements except last n ones.
The number of elements to take
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the last n
ones, or else the
empty mutable indexed sequence, if this mutable indexed sequence has less than n
elements.
(array: ofShort).dropRight(n)
Selects all elements except last n ones.
Selects all elements except last n ones.
The number of elements to take
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the last n
ones, or else the
empty mutable indexed sequence, if this mutable indexed sequence has less than n
elements.
(array: ofRef[T]).dropRight(n)
Selects all elements except last n ones.
Selects all elements except last n ones.
The number of elements to take
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the last n
ones, or else the
empty mutable indexed sequence, if this mutable indexed sequence has less than n
elements.
(array: ofLong).dropRight(n)
Selects all elements except last n ones.
Selects all elements except last n ones.
The number of elements to take
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the last n
ones, or else the
empty mutable indexed sequence, if this mutable indexed sequence has less than n
elements.
(array: ofInt).dropRight(n)
Selects all elements except last n ones.
Selects all elements except last n ones.
The number of elements to take
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the last n
ones, or else the
empty mutable indexed sequence, if this mutable indexed sequence has less than n
elements.
(array: ofFloat).dropRight(n)
Selects all elements except last n ones.
Selects all elements except last n ones.
The number of elements to take
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the last n
ones, or else the
empty mutable indexed sequence, if this mutable indexed sequence has less than n
elements.
(array: ofDouble).dropRight(n)
Selects all elements except last n ones.
Selects all elements except last n ones.
The number of elements to take
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the last n
ones, or else the
empty mutable indexed sequence, if this mutable indexed sequence has less than n
elements.
(array: ofChar).dropRight(n)
Selects all elements except last n ones.
Selects all elements except last n ones.
The number of elements to take
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the last n
ones, or else the
empty mutable indexed sequence, if this mutable indexed sequence has less than n
elements.
(array: ofByte).dropRight(n)
Selects all elements except last n ones.
Selects all elements except last n ones.
The number of elements to take
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the last n
ones, or else the
empty mutable indexed sequence, if this mutable indexed sequence has less than n
elements.
(array: ofBoolean).dropRight(n)
Selects all elements except last n ones.
Selects all elements except last n ones.
The number of elements to take
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the last n
ones, or else the
empty mutable indexed sequence, if this mutable indexed sequence has less than n
elements.
(array: ArrayOps[T]).dropRight(n)
Drops longest prefix of elements that satisfy a predicate.
Drops longest prefix of elements that satisfy a predicate.
the longest suffix of this mutable indexed sequence whose first element
does not satisfy the predicate p
.
(array: ofRef[T]).dropWhile(p)
Drops longest prefix of elements that satisfy a predicate.
Drops longest prefix of elements that satisfy a predicate.
the longest suffix of this mutable indexed sequence whose first element
does not satisfy the predicate p
.
(array: ArrayOps[T]).dropWhile(p)
Tests whether this mutable indexed sequence ends with the given sequence.
Tests whether this mutable indexed sequence ends with the given sequence.
the sequence to test
true
if this mutable indexed sequence has that
as a suffix, false
otherwise.
(array: ofUnit).endsWith(that)
Tests whether this mutable indexed sequence ends with the given sequence.
Tests whether this mutable indexed sequence ends with the given sequence.
the sequence to test
true
if this mutable indexed sequence has that
as a suffix, false
otherwise.
(array: ofShort).endsWith(that)
Tests whether this mutable indexed sequence ends with the given sequence.
Tests whether this mutable indexed sequence ends with the given sequence.
the sequence to test
true
if this mutable indexed sequence has that
as a suffix, false
otherwise.
(array: ofRef[T]).endsWith(that)
Tests whether this mutable indexed sequence ends with the given sequence.
Tests whether this mutable indexed sequence ends with the given sequence.
the sequence to test
true
if this mutable indexed sequence has that
as a suffix, false
otherwise.
(array: ofLong).endsWith(that)
Tests whether this mutable indexed sequence ends with the given sequence.
Tests whether this mutable indexed sequence ends with the given sequence.
the sequence to test
true
if this mutable indexed sequence has that
as a suffix, false
otherwise.
(array: ofInt).endsWith(that)
Tests whether this mutable indexed sequence ends with the given sequence.
Tests whether this mutable indexed sequence ends with the given sequence.
the sequence to test
true
if this mutable indexed sequence has that
as a suffix, false
otherwise.
(array: ofFloat).endsWith(that)
Tests whether this mutable indexed sequence ends with the given sequence.
Tests whether this mutable indexed sequence ends with the given sequence.
the sequence to test
true
if this mutable indexed sequence has that
as a suffix, false
otherwise.
(array: ofDouble).endsWith(that)
Tests whether this mutable indexed sequence ends with the given sequence.
Tests whether this mutable indexed sequence ends with the given sequence.
the sequence to test
true
if this mutable indexed sequence has that
as a suffix, false
otherwise.
(array: ofChar).endsWith(that)
Tests whether this mutable indexed sequence ends with the given sequence.
Tests whether this mutable indexed sequence ends with the given sequence.
the sequence to test
true
if this mutable indexed sequence has that
as a suffix, false
otherwise.
(array: ofByte).endsWith(that)
Tests whether this mutable indexed sequence ends with the given sequence.
Tests whether this mutable indexed sequence ends with the given sequence.
the sequence to test
true
if this mutable indexed sequence has that
as a suffix, false
otherwise.
(array: ofBoolean).endsWith(that)
Tests whether this mutable indexed sequence ends with the given sequence.
Tests whether this mutable indexed sequence ends with the given sequence.
the sequence to test
true
if this mutable indexed sequence has that
as a suffix, false
otherwise.
(array: ArrayOps[T]).endsWith(that)
The equals method for arbitrary sequences.
The equals method for arbitrary sequences. Compares this sequence to some other object.
The object to compare the sequence to
true
if that
is a sequence that has the same elements as
this sequence in the same order, false
otherwise
(array: ArrayOps[T]).equals(that)
Tests whether a predicate holds for some of the elements of this mutable indexed sequence.
Tests whether a predicate holds for some of the elements of this mutable indexed sequence.
the predicate used to test elements.
false
if this mutable indexed sequence is empty, otherwise true
if the given predicate p
holds for some of the elements of this mutable indexed sequence, otherwise false
(array: ofRef[T]).exists(p)
Tests whether a predicate holds for some of the elements of this mutable indexed sequence.
Tests whether a predicate holds for some of the elements of this mutable indexed sequence.
the predicate used to test elements.
false
if this mutable indexed sequence is empty, otherwise true
if the given predicate p
holds for some of the elements of this mutable indexed sequence, otherwise false
(array: ArrayOps[T]).exists(p)
Selects all elements of this mutable indexed sequence which satisfy a predicate.
Selects all elements of this mutable indexed sequence which satisfy a predicate.
the predicate used to test elements.
a new mutable indexed sequence consisting of all elements of this mutable indexed sequence that satisfy the given
predicate p
. The order of the elements is preserved.
(array: ofRef[T]).filter(p)
Selects all elements of this mutable indexed sequence which satisfy a predicate.
Selects all elements of this mutable indexed sequence which satisfy a predicate.
the predicate used to test elements.
a new mutable indexed sequence consisting of all elements of this mutable indexed sequence that satisfy the given
predicate p
. The order of the elements is preserved.
(array: ArrayOps[T]).filter(p)
Selects all elements of this mutable indexed sequence which do not satisfy a predicate.
Selects all elements of this mutable indexed sequence which do not satisfy a predicate.
the predicate used to test elements.
a new mutable indexed sequence consisting of all elements of this mutable indexed sequence that do not satisfy the given
predicate p
. The order of the elements is preserved.
(array: ofRef[T]).filterNot(p)
Selects all elements of this mutable indexed sequence which do not satisfy a predicate.
Selects all elements of this mutable indexed sequence which do not satisfy a predicate.
the predicate used to test elements.
a new mutable indexed sequence consisting of all elements of this mutable indexed sequence that do not satisfy the given
predicate p
. The order of the elements is preserved.
(array: ArrayOps[T]).filterNot(p)
Finds the first element of the mutable indexed sequence satisfying a predicate, if any.
Finds the first element of the mutable indexed sequence satisfying a predicate, if any.
the predicate used to test elements.
an option value containing the first element in the mutable indexed sequence
that satisfies p
, or None
if none exists.
(array: ofRef[T]).find(p)
Finds the first element of the mutable indexed sequence satisfying a predicate, if any.
Finds the first element of the mutable indexed sequence satisfying a predicate, if any.
the predicate used to test elements.
an option value containing the first element in the mutable indexed sequence
that satisfies p
, or None
if none exists.
(array: ArrayOps[T]).find(p)
Flattens a two-dimensional array by concatenating all its rows into a single array.
Flattens a two-dimensional array by concatenating all its rows into a single array.
Type of row elements.
A function that converts elements of this array to rows - arrays of type U
.
An array obtained by concatenating rows of this array.
(array: ofRef[T]).flatten(asTrav, m)
Flattens a two-dimensional array by concatenating all its rows into a single array.
Flattens a two-dimensional array by concatenating all its rows into a single array.
Type of row elements.
A function that converts elements of this array to rows - arrays of type U
.
An array obtained by concatenating rows of this array.
(array: ArrayOps[T]).flatten(asTrav, m)
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right with the start value z
on the left:
op(...op(z, x_1), x_2, ..., x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
(array: ofRef[T]).foldLeft(z)(op)
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
Applies a binary operator to a start value and all elements of this mutable indexed sequence, going left to right.
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going left to right with the start value z
on the left:
op(...op(z, x_1), x_2, ..., x_n)
where x1, ..., xn
are the elements of this mutable indexed sequence.
(array: ArrayOps[T]).foldLeft(z)(op)
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left with the start value z
on the right:
op(x_1, op(x_2, ... op(x_n, z)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
(array: ofRef[T]).foldRight(z)(op)
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
Applies a binary operator to all elements of this mutable indexed sequence and a start value, going right to left.
the result type of the binary operator.
the start value.
the binary operator.
the result of inserting op
between consecutive elements of this mutable indexed sequence,
going right to left with the start value z
on the right:
op(x_1, op(x_2, ... op(x_n, z)...))
where x1, ..., xn
are the elements of this mutable indexed sequence.
(array: ArrayOps[T]).foldRight(z)(op)
Tests whether a predicate holds for all elements of this mutable indexed sequence.
Tests whether a predicate holds for all elements of this mutable indexed sequence.
the predicate used to test elements.
true
if this mutable indexed sequence is empty, otherwise true
if the given predicate p
holds for all elements of this mutable indexed sequence, otherwise false
.
(array: ofRef[T]).forall(p)
Tests whether a predicate holds for all elements of this mutable indexed sequence.
Tests whether a predicate holds for all elements of this mutable indexed sequence.
the predicate used to test elements.
true
if this mutable indexed sequence is empty, otherwise true
if the given predicate p
holds for all elements of this mutable indexed sequence, otherwise false
.
(array: ArrayOps[T]).forall(p)
[use case] Applies a function f
to all elements of this array.
Applies a function f
to all elements of this array.
Note: this method underlies the implementation of most other bulk operations. Subclasses should re-implement this method if a more efficient implementation exists.
the function that is applied for its side-effect to every element.
The result of function f
is discarded.
(array: ofUnit).foreach(f)
[use case] Applies a function f
to all elements of this array.
Applies a function f
to all elements of this array.
Note: this method underlies the implementation of most other bulk operations. Subclasses should re-implement this method if a more efficient implementation exists.
the function that is applied for its side-effect to every element.
The result of function f
is discarded.
(array: ofShort).foreach(f)
[use case] Applies a function f
to all elements of this array.
Applies a function f
to all elements of this array.
Note: this method underlies the implementation of most other bulk operations. Subclasses should re-implement this method if a more efficient implementation exists.
the function that is applied for its side-effect to every element.
The result of function f
is discarded.
(array: ofRef[T]).foreach(f)
[use case] Applies a function f
to all elements of this array.
Applies a function f
to all elements of this array.
Note: this method underlies the implementation of most other bulk operations. Subclasses should re-implement this method if a more efficient implementation exists.
the function that is applied for its side-effect to every element.
The result of function f
is discarded.
(array: ofLong).foreach(f)
[use case] Applies a function f
to all elements of this array.
Applies a function f
to all elements of this array.
Note: this method underlies the implementation of most other bulk operations. Subclasses should re-implement this method if a more efficient implementation exists.
the function that is applied for its side-effect to every element.
The result of function f
is discarded.
(array: ofInt).foreach(f)
[use case] Applies a function f
to all elements of this array.
Applies a function f
to all elements of this array.
Note: this method underlies the implementation of most other bulk operations. Subclasses should re-implement this method if a more efficient implementation exists.
the function that is applied for its side-effect to every element.
The result of function f
is discarded.
(array: ofFloat).foreach(f)
[use case] Applies a function f
to all elements of this array.
Applies a function f
to all elements of this array.
Note: this method underlies the implementation of most other bulk operations. Subclasses should re-implement this method if a more efficient implementation exists.
the function that is applied for its side-effect to every element.
The result of function f
is discarded.
(array: ofDouble).foreach(f)
[use case] Applies a function f
to all elements of this array.
Applies a function f
to all elements of this array.
Note: this method underlies the implementation of most other bulk operations. Subclasses should re-implement this method if a more efficient implementation exists.
the function that is applied for its side-effect to every element.
The result of function f
is discarded.
(array: ofChar).foreach(f)
[use case] Applies a function f
to all elements of this array.
Applies a function f
to all elements of this array.
Note: this method underlies the implementation of most other bulk operations. Subclasses should re-implement this method if a more efficient implementation exists.
the function that is applied for its side-effect to every element.
The result of function f
is discarded.
(array: ofByte).foreach(f)
[use case] Applies a function f
to all elements of this array.
Applies a function f
to all elements of this array.
Note: this method underlies the implementation of most other bulk operations. Subclasses should re-implement this method if a more efficient implementation exists.
the function that is applied for its side-effect to every element.
The result of function f
is discarded.
(array: ofBoolean).foreach(f)
[use case] Applies a function f
to all elements of this array.
Applies a function f
to all elements of this array.
Note: this method underlies the implementation of most other bulk operations. Subclasses should re-implement this method if a more efficient implementation exists.
the function that is applied for its side-effect to every element.
The result of function f
is discarded.
(array: ArrayOps[T]).foreach(f)
Partitions this mutable indexed sequence into a map of mutable indexed sequences according to some discriminator function.
Partitions this mutable indexed sequence into a map of mutable indexed sequences according to some discriminator function.
Note: this method is not re-implemented by views. This means when applied to a view it will always force the view and return a new mutable indexed sequence.
the type of keys returned by the discriminator function.
the discriminator function.
A map from keys to mutable indexed sequences such that the following invariant holds:
(xs groupBy f)(k) = xs filter (x => f(x) == k)
That is, every key k
is bound to a mutable indexed sequence of those elements x
for which f(x)
equals k
.
(array: ofRef[T]).groupBy(f)
Partitions this mutable indexed sequence into a map of mutable indexed sequences according to some discriminator function.
Partitions this mutable indexed sequence into a map of mutable indexed sequences according to some discriminator function.
Note: this method is not re-implemented by views. This means when applied to a view it will always force the view and return a new mutable indexed sequence.
the type of keys returned by the discriminator function.
the discriminator function.
A map from keys to mutable indexed sequences such that the following invariant holds:
(xs groupBy f)(k) = xs filter (x => f(x) == k)
That is, every key k
is bound to a mutable indexed sequence of those elements x
for which f(x)
equals k
.
(array: ArrayOps[T]).groupBy(f)
Partitions elements in fixed size mutable indexed sequences.
Partitions elements in fixed size mutable indexed sequences.
the number of elements per group
An iterator producing mutable indexed sequences of size size
, except the
last will be less than size size
if the elements don't divide evenly.
(array: ofUnit).grouped(size)
scala.collection.Iterator, method grouped
Partitions elements in fixed size mutable indexed sequences.
Partitions elements in fixed size mutable indexed sequences.
the number of elements per group
An iterator producing mutable indexed sequences of size size
, except the
last will be less than size size
if the elements don't divide evenly.
(array: ofShort).grouped(size)
scala.collection.Iterator, method grouped
Partitions elements in fixed size mutable indexed sequences.
Partitions elements in fixed size mutable indexed sequences.
the number of elements per group
An iterator producing mutable indexed sequences of size size
, except the
last will be less than size size
if the elements don't divide evenly.
(array: ofRef[T]).grouped(size)
scala.collection.Iterator, method grouped
Partitions elements in fixed size mutable indexed sequences.
Partitions elements in fixed size mutable indexed sequences.
the number of elements per group
An iterator producing mutable indexed sequences of size size
, except the
last will be less than size size
if the elements don't divide evenly.
(array: ofLong).grouped(size)
scala.collection.Iterator, method grouped
Partitions elements in fixed size mutable indexed sequences.
Partitions elements in fixed size mutable indexed sequences.
the number of elements per group
An iterator producing mutable indexed sequences of size size
, except the
last will be less than size size
if the elements don't divide evenly.
(array: ofInt).grouped(size)
scala.collection.Iterator, method grouped
Partitions elements in fixed size mutable indexed sequences.
Partitions elements in fixed size mutable indexed sequences.
the number of elements per group
An iterator producing mutable indexed sequences of size size
, except the
last will be less than size size
if the elements don't divide evenly.
(array: ofFloat).grouped(size)
scala.collection.Iterator, method grouped
Partitions elements in fixed size mutable indexed sequences.
Partitions elements in fixed size mutable indexed sequences.
the number of elements per group
An iterator producing mutable indexed sequences of size size
, except the
last will be less than size size
if the elements don't divide evenly.
(array: ofDouble).grouped(size)
scala.collection.Iterator, method grouped
Partitions elements in fixed size mutable indexed sequences.
Partitions elements in fixed size mutable indexed sequences.
the number of elements per group
An iterator producing mutable indexed sequences of size size
, except the
last will be less than size size
if the elements don't divide evenly.
(array: ofChar).grouped(size)
scala.collection.Iterator, method grouped
Partitions elements in fixed size mutable indexed sequences.
Partitions elements in fixed size mutable indexed sequences.
the number of elements per group
An iterator producing mutable indexed sequences of size size
, except the
last will be less than size size
if the elements don't divide evenly.
(array: ofByte).grouped(size)
scala.collection.Iterator, method grouped
Partitions elements in fixed size mutable indexed sequences.
Partitions elements in fixed size mutable indexed sequences.
the number of elements per group
An iterator producing mutable indexed sequences of size size
, except the
last will be less than size size
if the elements don't divide evenly.
(array: ofBoolean).grouped(size)
scala.collection.Iterator, method grouped
Partitions elements in fixed size mutable indexed sequences.
Partitions elements in fixed size mutable indexed sequences.
the number of elements per group
An iterator producing mutable indexed sequences of size size
, except the
last will be less than size size
if the elements don't divide evenly.
(array: ArrayOps[T]).grouped(size)
scala.collection.Iterator, method grouped
Tests whether this mutable indexed sequence is known to have a finite size.
Tests whether this mutable indexed sequence is known to have a finite size.
All strict collections are known to have finite size. For a non-strict
collection such as Stream
, the predicate returns true
if all
elements have been computed. It returns false
if the stream is
not yet evaluated to the end.
Note: many collection methods will not work on collections of infinite sizes.
true
if this collection is known to have finite size,
false
otherwise.
(array: ofUnit).hasDefiniteSize
Tests whether this mutable indexed sequence is known to have a finite size.
Tests whether this mutable indexed sequence is known to have a finite size.
All strict collections are known to have finite size. For a non-strict
collection such as Stream
, the predicate returns true
if all
elements have been computed. It returns false
if the stream is
not yet evaluated to the end.
Note: many collection methods will not work on collections of infinite sizes.
true
if this collection is known to have finite size,
false
otherwise.
(array: ofShort).hasDefiniteSize
Tests whether this mutable indexed sequence is known to have a finite size.
Tests whether this mutable indexed sequence is known to have a finite size.
All strict collections are known to have finite size. For a non-strict
collection such as Stream
, the predicate returns true
if all
elements have been computed. It returns false
if the stream is
not yet evaluated to the end.
Note: many collection methods will not work on collections of infinite sizes.
true
if this collection is known to have finite size,
false
otherwise.
(array: ofRef[T]).hasDefiniteSize
Tests whether this mutable indexed sequence is known to have a finite size.
Tests whether this mutable indexed sequence is known to have a finite size.
All strict collections are known to have finite size. For a non-strict
collection such as Stream
, the predicate returns true
if all
elements have been computed. It returns false
if the stream is
not yet evaluated to the end.
Note: many collection methods will not work on collections of infinite sizes.
true
if this collection is known to have finite size,
false
otherwise.
(array: ofLong).hasDefiniteSize
Tests whether this mutable indexed sequence is known to have a finite size.
Tests whether this mutable indexed sequence is known to have a finite size.
All strict collections are known to have finite size. For a non-strict
collection such as Stream
, the predicate returns true
if all
elements have been computed. It returns false
if the stream is
not yet evaluated to the end.
Note: many collection methods will not work on collections of infinite sizes.
true
if this collection is known to have finite size,
false
otherwise.
(array: ofInt).hasDefiniteSize
Tests whether this mutable indexed sequence is known to have a finite size.
Tests whether this mutable indexed sequence is known to have a finite size.
All strict collections are known to have finite size. For a non-strict
collection such as Stream
, the predicate returns true
if all
elements have been computed. It returns false
if the stream is
not yet evaluated to the end.
Note: many collection methods will not work on collections of infinite sizes.
true
if this collection is known to have finite size,
false
otherwise.
(array: ofFloat).hasDefiniteSize
Tests whether this mutable indexed sequence is known to have a finite size.
Tests whether this mutable indexed sequence is known to have a finite size.
All strict collections are known to have finite size. For a non-strict
collection such as Stream
, the predicate returns true
if all
elements have been computed. It returns false
if the stream is
not yet evaluated to the end.
Note: many collection methods will not work on collections of infinite sizes.
true
if this collection is known to have finite size,
false
otherwise.
(array: ofDouble).hasDefiniteSize
Tests whether this mutable indexed sequence is known to have a finite size.
Tests whether this mutable indexed sequence is known to have a finite size.
All strict collections are known to have finite size. For a non-strict
collection such as Stream
, the predicate returns true
if all
elements have been computed. It returns false
if the stream is
not yet evaluated to the end.
Note: many collection methods will not work on collections of infinite sizes.
true
if this collection is known to have finite size,
false
otherwise.
(array: ofChar).hasDefiniteSize
Tests whether this mutable indexed sequence is known to have a finite size.
Tests whether this mutable indexed sequence is known to have a finite size.
All strict collections are known to have finite size. For a non-strict
collection such as Stream
, the predicate returns true
if all
elements have been computed. It returns false
if the stream is
not yet evaluated to the end.
Note: many collection methods will not work on collections of infinite sizes.
true
if this collection is known to have finite size,
false
otherwise.
(array: ofByte).hasDefiniteSize
Tests whether this mutable indexed sequence is known to have a finite size.
Tests whether this mutable indexed sequence is known to have a finite size.
All strict collections are known to have finite size. For a non-strict
collection such as Stream
, the predicate returns true
if all
elements have been computed. It returns false
if the stream is
not yet evaluated to the end.
Note: many collection methods will not work on collections of infinite sizes.
true
if this collection is known to have finite size,
false
otherwise.
(array: ofBoolean).hasDefiniteSize
Tests whether this mutable indexed sequence is known to have a finite size.
Tests whether this mutable indexed sequence is known to have a finite size.
All strict collections are known to have finite size. For a non-strict
collection such as Stream
, the predicate returns true
if all
elements have been computed. It returns false
if the stream is
not yet evaluated to the end.
Note: many collection methods will not work on collections of infinite sizes.
true
if this collection is known to have finite size,
false
otherwise.
(array: ArrayOps[T]).hasDefiniteSize
Hashcodes for Array
produce a value from the hashcodes of all the
elements of the mutable indexed sequence.
Hashcodes for Array
produce a value from the hashcodes of all the
elements of the mutable indexed sequence.
the hash code value for this object.
(array: ArrayOps[T]).hashCode()
Selects the first element of this mutable indexed sequence.
Selects the first element of this mutable indexed sequence.
the first element of this mutable indexed sequence.
(array: ofUnit).head
NoSuchElementException
if the mutable indexed sequence is empty.
Selects the first element of this mutable indexed sequence.
Selects the first element of this mutable indexed sequence.
the first element of this mutable indexed sequence.
(array: ofShort).head
NoSuchElementException
if the mutable indexed sequence is empty.
Selects the first element of this mutable indexed sequence.
Selects the first element of this mutable indexed sequence.
the first element of this mutable indexed sequence.
(array: ofRef[T]).head
NoSuchElementException
if the mutable indexed sequence is empty.
Selects the first element of this mutable indexed sequence.
Selects the first element of this mutable indexed sequence.
the first element of this mutable indexed sequence.
(array: ofLong).head
NoSuchElementException
if the mutable indexed sequence is empty.
Selects the first element of this mutable indexed sequence.
Selects the first element of this mutable indexed sequence.
the first element of this mutable indexed sequence.
(array: ofInt).head
NoSuchElementException
if the mutable indexed sequence is empty.
Selects the first element of this mutable indexed sequence.
Selects the first element of this mutable indexed sequence.
the first element of this mutable indexed sequence.
(array: ofFloat).head
NoSuchElementException
if the mutable indexed sequence is empty.
Selects the first element of this mutable indexed sequence.
Selects the first element of this mutable indexed sequence.
the first element of this mutable indexed sequence.
(array: ofDouble).head
NoSuchElementException
if the mutable indexed sequence is empty.
Selects the first element of this mutable indexed sequence.
Selects the first element of this mutable indexed sequence.
the first element of this mutable indexed sequence.
(array: ofChar).head
NoSuchElementException
if the mutable indexed sequence is empty.
Selects the first element of this mutable indexed sequence.
Selects the first element of this mutable indexed sequence.
the first element of this mutable indexed sequence.
(array: ofByte).head
NoSuchElementException
if the mutable indexed sequence is empty.
Selects the first element of this mutable indexed sequence.
Selects the first element of this mutable indexed sequence.
the first element of this mutable indexed sequence.
(array: ofBoolean).head
NoSuchElementException
if the mutable indexed sequence is empty.
Selects the first element of this mutable indexed sequence.
Selects the first element of this mutable indexed sequence.
the first element of this mutable indexed sequence.
(array: ArrayOps[T]).head
NoSuchElementException
if the mutable indexed sequence is empty.
Optionally selects the first element.
Optionally selects the first element.
the first element of this mutable indexed sequence if it is nonempty,
None
if it is empty.
(array: ofUnit).headOption
Optionally selects the first element.
Optionally selects the first element.
the first element of this mutable indexed sequence if it is nonempty,
None
if it is empty.
(array: ofShort).headOption
Optionally selects the first element.
Optionally selects the first element.
the first element of this mutable indexed sequence if it is nonempty,
None
if it is empty.
(array: ofRef[T]).headOption
Optionally selects the first element.
Optionally selects the first element.
the first element of this mutable indexed sequence if it is nonempty,
None
if it is empty.
(array: ofLong).headOption
Optionally selects the first element.
Optionally selects the first element.
the first element of this mutable indexed sequence if it is nonempty,
None
if it is empty.
(array: ofInt).headOption
Optionally selects the first element.
Optionally selects the first element.
the first element of this mutable indexed sequence if it is nonempty,
None
if it is empty.
(array: ofFloat).headOption
Optionally selects the first element.
Optionally selects the first element.
the first element of this mutable indexed sequence if it is nonempty,
None
if it is empty.
(array: ofDouble).headOption
Optionally selects the first element.
Optionally selects the first element.
the first element of this mutable indexed sequence if it is nonempty,
None
if it is empty.
(array: ofChar).headOption
Optionally selects the first element.
Optionally selects the first element.
the first element of this mutable indexed sequence if it is nonempty,
None
if it is empty.
(array: ofByte).headOption
Optionally selects the first element.
Optionally selects the first element.
the first element of this mutable indexed sequence if it is nonempty,
None
if it is empty.
(array: ofBoolean).headOption
Optionally selects the first element.
Optionally selects the first element.
the first element of this mutable indexed sequence if it is nonempty,
None
if it is empty.
(array: ArrayOps[T]).headOption
[use case] Finds index of first occurrence of some value in this array after or at some start index.
Finds index of first occurrence of some value in this array after or at some start index.
the element value to search for.
the start index
the index >= from
of the first element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
(array: ofRef[T]).indexOf(elem, from)
[use case] Finds index of first occurrence of some value in this array.
Finds index of first occurrence of some value in this array.
the element value to search for.
the index of the first element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
(array: ofRef[T]).indexOf(elem)
[use case] Finds index of first occurrence of some value in this array after or at some start index.
Finds index of first occurrence of some value in this array after or at some start index.
the element value to search for.
the start index
the index >= from
of the first element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
(array: ArrayOps[T]).indexOf(elem, from)
[use case] Finds index of first occurrence of some value in this array.
Finds index of first occurrence of some value in this array.
the element value to search for.
the index of the first element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
(array: ArrayOps[T]).indexOf(elem)
Finds index of the first element satisfying some predicate after or at some start index.
Finds index of the first element satisfying some predicate after or at some start index.
the predicate used to test elements.
the start index
the index >= from
of the first element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
(array: ofRef[T]).indexWhere(p, from)
Finds index of first element satisfying some predicate.
Finds index of first element satisfying some predicate.
the predicate used to test elements.
the index of the first element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
(array: ofRef[T]).indexWhere(p)
Finds index of the first element satisfying some predicate after or at some start index.
Finds index of the first element satisfying some predicate after or at some start index.
the predicate used to test elements.
the start index
the index >= from
of the first element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
(array: ArrayOps[T]).indexWhere(p, from)
Finds index of first element satisfying some predicate.
Finds index of first element satisfying some predicate.
the predicate used to test elements.
the index of the first element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
(array: ArrayOps[T]).indexWhere(p)
Produces the range of all indices of this sequence.
Produces the range of all indices of this sequence.
a Range
value from 0
to one less than the length of this mutable indexed sequence.
(array: ofUnit).indices
Produces the range of all indices of this sequence.
Produces the range of all indices of this sequence.
a Range
value from 0
to one less than the length of this mutable indexed sequence.
(array: ofShort).indices
Produces the range of all indices of this sequence.
Produces the range of all indices of this sequence.
a Range
value from 0
to one less than the length of this mutable indexed sequence.
(array: ofRef[T]).indices
Produces the range of all indices of this sequence.
Produces the range of all indices of this sequence.
a Range
value from 0
to one less than the length of this mutable indexed sequence.
(array: ofLong).indices
Produces the range of all indices of this sequence.
Produces the range of all indices of this sequence.
a Range
value from 0
to one less than the length of this mutable indexed sequence.
(array: ofInt).indices
Produces the range of all indices of this sequence.
Produces the range of all indices of this sequence.
a Range
value from 0
to one less than the length of this mutable indexed sequence.
(array: ofFloat).indices
Produces the range of all indices of this sequence.
Produces the range of all indices of this sequence.
a Range
value from 0
to one less than the length of this mutable indexed sequence.
(array: ofDouble).indices
Produces the range of all indices of this sequence.
Produces the range of all indices of this sequence.
a Range
value from 0
to one less than the length of this mutable indexed sequence.
(array: ofChar).indices
Produces the range of all indices of this sequence.
Produces the range of all indices of this sequence.
a Range
value from 0
to one less than the length of this mutable indexed sequence.
(array: ofByte).indices
Produces the range of all indices of this sequence.
Produces the range of all indices of this sequence.
a Range
value from 0
to one less than the length of this mutable indexed sequence.
(array: ofBoolean).indices
Produces the range of all indices of this sequence.
Produces the range of all indices of this sequence.
a Range
value from 0
to one less than the length of this mutable indexed sequence.
(array: ArrayOps[T]).indices
Selects all elements except the last.
Selects all elements except the last.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the last one.
(array: ofUnit).init
UnsupportedOperationException
if the mutable indexed sequence is empty.
Selects all elements except the last.
Selects all elements except the last.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the last one.
(array: ofShort).init
UnsupportedOperationException
if the mutable indexed sequence is empty.
Selects all elements except the last.
Selects all elements except the last.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the last one.
(array: ofRef[T]).init
UnsupportedOperationException
if the mutable indexed sequence is empty.
Selects all elements except the last.
Selects all elements except the last.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the last one.
(array: ofLong).init
UnsupportedOperationException
if the mutable indexed sequence is empty.
Selects all elements except the last.
Selects all elements except the last.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the last one.
(array: ofInt).init
UnsupportedOperationException
if the mutable indexed sequence is empty.
Selects all elements except the last.
Selects all elements except the last.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the last one.
(array: ofFloat).init
UnsupportedOperationException
if the mutable indexed sequence is empty.
Selects all elements except the last.
Selects all elements except the last.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the last one.
(array: ofDouble).init
UnsupportedOperationException
if the mutable indexed sequence is empty.
Selects all elements except the last.
Selects all elements except the last.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the last one.
(array: ofChar).init
UnsupportedOperationException
if the mutable indexed sequence is empty.
Selects all elements except the last.
Selects all elements except the last.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the last one.
(array: ofByte).init
UnsupportedOperationException
if the mutable indexed sequence is empty.
Selects all elements except the last.
Selects all elements except the last.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the last one.
(array: ofBoolean).init
UnsupportedOperationException
if the mutable indexed sequence is empty.
Selects all elements except the last.
Selects all elements except the last.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the last one.
(array: ArrayOps[T]).init
UnsupportedOperationException
if the mutable indexed sequence is empty.
Iterates over the inits of this mutable indexed sequence.
Iterates over the inits of this mutable indexed sequence. The first value will be this
mutable indexed sequence and the final one will be an empty mutable indexed sequence, with the intervening
values the results of successive applications of init
.
an iterator over all the inits of this mutable indexed sequence
(array: ofUnit).inits
List(1,2,3).inits = Iterator(List(1,2,3), List(1,2), List(1), Nil)
Iterates over the inits of this mutable indexed sequence.
Iterates over the inits of this mutable indexed sequence. The first value will be this
mutable indexed sequence and the final one will be an empty mutable indexed sequence, with the intervening
values the results of successive applications of init
.
an iterator over all the inits of this mutable indexed sequence
(array: ofShort).inits
List(1,2,3).inits = Iterator(List(1,2,3), List(1,2), List(1), Nil)
Iterates over the inits of this mutable indexed sequence.
Iterates over the inits of this mutable indexed sequence. The first value will be this
mutable indexed sequence and the final one will be an empty mutable indexed sequence, with the intervening
values the results of successive applications of init
.
an iterator over all the inits of this mutable indexed sequence
(array: ofRef[T]).inits
List(1,2,3).inits = Iterator(List(1,2,3), List(1,2), List(1), Nil)
Iterates over the inits of this mutable indexed sequence.
Iterates over the inits of this mutable indexed sequence. The first value will be this
mutable indexed sequence and the final one will be an empty mutable indexed sequence, with the intervening
values the results of successive applications of init
.
an iterator over all the inits of this mutable indexed sequence
(array: ofLong).inits
List(1,2,3).inits = Iterator(List(1,2,3), List(1,2), List(1), Nil)
Iterates over the inits of this mutable indexed sequence.
Iterates over the inits of this mutable indexed sequence. The first value will be this
mutable indexed sequence and the final one will be an empty mutable indexed sequence, with the intervening
values the results of successive applications of init
.
an iterator over all the inits of this mutable indexed sequence
(array: ofInt).inits
List(1,2,3).inits = Iterator(List(1,2,3), List(1,2), List(1), Nil)
Iterates over the inits of this mutable indexed sequence.
Iterates over the inits of this mutable indexed sequence. The first value will be this
mutable indexed sequence and the final one will be an empty mutable indexed sequence, with the intervening
values the results of successive applications of init
.
an iterator over all the inits of this mutable indexed sequence
(array: ofFloat).inits
List(1,2,3).inits = Iterator(List(1,2,3), List(1,2), List(1), Nil)
Iterates over the inits of this mutable indexed sequence.
Iterates over the inits of this mutable indexed sequence. The first value will be this
mutable indexed sequence and the final one will be an empty mutable indexed sequence, with the intervening
values the results of successive applications of init
.
an iterator over all the inits of this mutable indexed sequence
(array: ofDouble).inits
List(1,2,3).inits = Iterator(List(1,2,3), List(1,2), List(1), Nil)
Iterates over the inits of this mutable indexed sequence.
Iterates over the inits of this mutable indexed sequence. The first value will be this
mutable indexed sequence and the final one will be an empty mutable indexed sequence, with the intervening
values the results of successive applications of init
.
an iterator over all the inits of this mutable indexed sequence
(array: ofChar).inits
List(1,2,3).inits = Iterator(List(1,2,3), List(1,2), List(1), Nil)
Iterates over the inits of this mutable indexed sequence.
Iterates over the inits of this mutable indexed sequence. The first value will be this
mutable indexed sequence and the final one will be an empty mutable indexed sequence, with the intervening
values the results of successive applications of init
.
an iterator over all the inits of this mutable indexed sequence
(array: ofByte).inits
List(1,2,3).inits = Iterator(List(1,2,3), List(1,2), List(1), Nil)
Iterates over the inits of this mutable indexed sequence.
Iterates over the inits of this mutable indexed sequence. The first value will be this
mutable indexed sequence and the final one will be an empty mutable indexed sequence, with the intervening
values the results of successive applications of init
.
an iterator over all the inits of this mutable indexed sequence
(array: ofBoolean).inits
List(1,2,3).inits = Iterator(List(1,2,3), List(1,2), List(1), Nil)
Iterates over the inits of this mutable indexed sequence.
Iterates over the inits of this mutable indexed sequence. The first value will be this
mutable indexed sequence and the final one will be an empty mutable indexed sequence, with the intervening
values the results of successive applications of init
.
an iterator over all the inits of this mutable indexed sequence
(array: ArrayOps[T]).inits
List(1,2,3).inits = Iterator(List(1,2,3), List(1,2), List(1), Nil)
[use case] Computes the multiset intersection between this array and another sequence.
Computes the multiset intersection between this array and another sequence.
the sequence of elements to intersect with.
a new array which contains all elements of this array
which also appear in that
.
If an element value x
appears
n times in that
, then the first n occurrences of x
will be retained
in the result, but any following occurrences will be omitted.
(array: ofRef[T]).intersect(that)
[use case] Computes the multiset intersection between this array and another sequence.
Computes the multiset intersection between this array and another sequence.
the sequence of elements to intersect with.
a new array which contains all elements of this array
which also appear in that
.
If an element value x
appears
n times in that
, then the first n occurrences of x
will be retained
in the result, but any following occurrences will be omitted.
(array: ArrayOps[T]).intersect(that)
Tests whether this mutable indexed sequence contains given index.
Tests whether this mutable indexed sequence contains given index.
The implementations of methods apply
and isDefinedAt
turn a Seq[A]
into
a PartialFunction[Int, A]
.
the index to test
true
if this mutable indexed sequence contains an element at position idx
, false
otherwise.
(array: ofUnit).isDefinedAt(idx)
Tests whether this mutable indexed sequence contains given index.
Tests whether this mutable indexed sequence contains given index.
The implementations of methods apply
and isDefinedAt
turn a Seq[A]
into
a PartialFunction[Int, A]
.
the index to test
true
if this mutable indexed sequence contains an element at position idx
, false
otherwise.
(array: ofShort).isDefinedAt(idx)
Tests whether this mutable indexed sequence contains given index.
Tests whether this mutable indexed sequence contains given index.
The implementations of methods apply
and isDefinedAt
turn a Seq[A]
into
a PartialFunction[Int, A]
.
the index to test
true
if this mutable indexed sequence contains an element at position idx
, false
otherwise.
(array: ofRef[T]).isDefinedAt(idx)
Tests whether this mutable indexed sequence contains given index.
Tests whether this mutable indexed sequence contains given index.
The implementations of methods apply
and isDefinedAt
turn a Seq[A]
into
a PartialFunction[Int, A]
.
the index to test
true
if this mutable indexed sequence contains an element at position idx
, false
otherwise.
(array: ofLong).isDefinedAt(idx)
Tests whether this mutable indexed sequence contains given index.
Tests whether this mutable indexed sequence contains given index.
The implementations of methods apply
and isDefinedAt
turn a Seq[A]
into
a PartialFunction[Int, A]
.
the index to test
true
if this mutable indexed sequence contains an element at position idx
, false
otherwise.
(array: ofInt).isDefinedAt(idx)
Tests whether this mutable indexed sequence contains given index.
Tests whether this mutable indexed sequence contains given index.
The implementations of methods apply
and isDefinedAt
turn a Seq[A]
into
a PartialFunction[Int, A]
.
the index to test
true
if this mutable indexed sequence contains an element at position idx
, false
otherwise.
(array: ofFloat).isDefinedAt(idx)
Tests whether this mutable indexed sequence contains given index.
Tests whether this mutable indexed sequence contains given index.
The implementations of methods apply
and isDefinedAt
turn a Seq[A]
into
a PartialFunction[Int, A]
.
the index to test
true
if this mutable indexed sequence contains an element at position idx
, false
otherwise.
(array: ofDouble).isDefinedAt(idx)
Tests whether this mutable indexed sequence contains given index.
Tests whether this mutable indexed sequence contains given index.
The implementations of methods apply
and isDefinedAt
turn a Seq[A]
into
a PartialFunction[Int, A]
.
the index to test
true
if this mutable indexed sequence contains an element at position idx
, false
otherwise.
(array: ofChar).isDefinedAt(idx)
Tests whether this mutable indexed sequence contains given index.
Tests whether this mutable indexed sequence contains given index.
The implementations of methods apply
and isDefinedAt
turn a Seq[A]
into
a PartialFunction[Int, A]
.
the index to test
true
if this mutable indexed sequence contains an element at position idx
, false
otherwise.
(array: ofByte).isDefinedAt(idx)
Tests whether this mutable indexed sequence contains given index.
Tests whether this mutable indexed sequence contains given index.
The implementations of methods apply
and isDefinedAt
turn a Seq[A]
into
a PartialFunction[Int, A]
.
the index to test
true
if this mutable indexed sequence contains an element at position idx
, false
otherwise.
(array: ofBoolean).isDefinedAt(idx)
Tests whether this mutable indexed sequence contains given index.
Tests whether this mutable indexed sequence contains given index.
The implementations of methods apply
and isDefinedAt
turn a Seq[A]
into
a PartialFunction[Int, A]
.
the index to test
true
if this mutable indexed sequence contains an element at position idx
, false
otherwise.
(array: ArrayOps[T]).isDefinedAt(idx)
Tests whether this mutable indexed sequence is empty.
Tests whether this mutable indexed sequence is empty.
true
if the mutable indexed sequence contain no elements, false
otherwise.
(array: ofUnit).isEmpty
Tests whether this mutable indexed sequence is empty.
Tests whether this mutable indexed sequence is empty.
true
if the mutable indexed sequence contain no elements, false
otherwise.
(array: ofShort).isEmpty
Tests whether this mutable indexed sequence is empty.
Tests whether this mutable indexed sequence is empty.
true
if the mutable indexed sequence contain no elements, false
otherwise.
(array: ofRef[T]).isEmpty
Tests whether this mutable indexed sequence is empty.
Tests whether this mutable indexed sequence is empty.
true
if the mutable indexed sequence contain no elements, false
otherwise.
(array: ofLong).isEmpty
Tests whether this mutable indexed sequence is empty.
Tests whether this mutable indexed sequence is empty.
true
if the mutable indexed sequence contain no elements, false
otherwise.
(array: ofInt).isEmpty
Tests whether this mutable indexed sequence is empty.
Tests whether this mutable indexed sequence is empty.
true
if the mutable indexed sequence contain no elements, false
otherwise.
(array: ofFloat).isEmpty
Tests whether this mutable indexed sequence is empty.
Tests whether this mutable indexed sequence is empty.
true
if the mutable indexed sequence contain no elements, false
otherwise.
(array: ofDouble).isEmpty
Tests whether this mutable indexed sequence is empty.
Tests whether this mutable indexed sequence is empty.
true
if the mutable indexed sequence contain no elements, false
otherwise.
(array: ofChar).isEmpty
Tests whether this mutable indexed sequence is empty.
Tests whether this mutable indexed sequence is empty.
true
if the mutable indexed sequence contain no elements, false
otherwise.
(array: ofByte).isEmpty
Tests whether this mutable indexed sequence is empty.
Tests whether this mutable indexed sequence is empty.
true
if the mutable indexed sequence contain no elements, false
otherwise.
(array: ofBoolean).isEmpty
Tests whether this mutable indexed sequence is empty.
Tests whether this mutable indexed sequence is empty.
true
if the mutable indexed sequence contain no elements, false
otherwise.
(array: ArrayOps[T]).isEmpty
Tests whether this mutable indexed sequence can be repeatedly traversed.
Tests whether this mutable indexed sequence can be repeatedly traversed.
true
(array: ofUnit).isTraversableAgain
Tests whether this mutable indexed sequence can be repeatedly traversed.
Tests whether this mutable indexed sequence can be repeatedly traversed.
true
(array: ofShort).isTraversableAgain
Tests whether this mutable indexed sequence can be repeatedly traversed.
Tests whether this mutable indexed sequence can be repeatedly traversed.
true
(array: ofRef[T]).isTraversableAgain
Tests whether this mutable indexed sequence can be repeatedly traversed.
Tests whether this mutable indexed sequence can be repeatedly traversed.
true
(array: ofLong).isTraversableAgain
Tests whether this mutable indexed sequence can be repeatedly traversed.
Tests whether this mutable indexed sequence can be repeatedly traversed.
true
(array: ofInt).isTraversableAgain
Tests whether this mutable indexed sequence can be repeatedly traversed.
Tests whether this mutable indexed sequence can be repeatedly traversed.
true
(array: ofFloat).isTraversableAgain
Tests whether this mutable indexed sequence can be repeatedly traversed.
Tests whether this mutable indexed sequence can be repeatedly traversed.
true
(array: ofDouble).isTraversableAgain
Tests whether this mutable indexed sequence can be repeatedly traversed.
Tests whether this mutable indexed sequence can be repeatedly traversed.
true
(array: ofChar).isTraversableAgain
Tests whether this mutable indexed sequence can be repeatedly traversed.
Tests whether this mutable indexed sequence can be repeatedly traversed.
true
(array: ofByte).isTraversableAgain
Tests whether this mutable indexed sequence can be repeatedly traversed.
Tests whether this mutable indexed sequence can be repeatedly traversed.
true
(array: ofBoolean).isTraversableAgain
Tests whether this mutable indexed sequence can be repeatedly traversed.
Tests whether this mutable indexed sequence can be repeatedly traversed.
true
(array: ArrayOps[T]).isTraversableAgain
Creates a new iterator over all elements contained in this iterable object.
Creates a new iterator over all elements contained in this iterable object.
the new iterator
(array: ofUnit).iterator
Creates a new iterator over all elements contained in this iterable object.
Creates a new iterator over all elements contained in this iterable object.
the new iterator
(array: ofShort).iterator
Creates a new iterator over all elements contained in this iterable object.
Creates a new iterator over all elements contained in this iterable object.
the new iterator
(array: ofRef[T]).iterator
Creates a new iterator over all elements contained in this iterable object.
Creates a new iterator over all elements contained in this iterable object.
the new iterator
(array: ofLong).iterator
Creates a new iterator over all elements contained in this iterable object.
Creates a new iterator over all elements contained in this iterable object.
the new iterator
(array: ofInt).iterator
Creates a new iterator over all elements contained in this iterable object.
Creates a new iterator over all elements contained in this iterable object.
the new iterator
(array: ofFloat).iterator
Creates a new iterator over all elements contained in this iterable object.
Creates a new iterator over all elements contained in this iterable object.
the new iterator
(array: ofDouble).iterator
Creates a new iterator over all elements contained in this iterable object.
Creates a new iterator over all elements contained in this iterable object.
the new iterator
(array: ofChar).iterator
Creates a new iterator over all elements contained in this iterable object.
Creates a new iterator over all elements contained in this iterable object.
the new iterator
(array: ofByte).iterator
Creates a new iterator over all elements contained in this iterable object.
Creates a new iterator over all elements contained in this iterable object.
the new iterator
(array: ofBoolean).iterator
Creates a new iterator over all elements contained in this iterable object.
Creates a new iterator over all elements contained in this iterable object.
the new iterator
(array: ArrayOps[T]).iterator
Selects the last element.
Selects the last element.
The last element of this mutable indexed sequence.
(array: ofUnit).last
NoSuchElementException
If the mutable indexed sequence is empty.
Selects the last element.
Selects the last element.
The last element of this mutable indexed sequence.
(array: ofShort).last
NoSuchElementException
If the mutable indexed sequence is empty.
Selects the last element.
Selects the last element.
The last element of this mutable indexed sequence.
(array: ofRef[T]).last
NoSuchElementException
If the mutable indexed sequence is empty.
Selects the last element.
Selects the last element.
The last element of this mutable indexed sequence.
(array: ofLong).last
NoSuchElementException
If the mutable indexed sequence is empty.
Selects the last element.
Selects the last element.
The last element of this mutable indexed sequence.
(array: ofInt).last
NoSuchElementException
If the mutable indexed sequence is empty.
Selects the last element.
Selects the last element.
The last element of this mutable indexed sequence.
(array: ofFloat).last
NoSuchElementException
If the mutable indexed sequence is empty.
Selects the last element.
Selects the last element.
The last element of this mutable indexed sequence.
(array: ofDouble).last
NoSuchElementException
If the mutable indexed sequence is empty.
Selects the last element.
Selects the last element.
The last element of this mutable indexed sequence.
(array: ofChar).last
NoSuchElementException
If the mutable indexed sequence is empty.
Selects the last element.
Selects the last element.
The last element of this mutable indexed sequence.
(array: ofByte).last
NoSuchElementException
If the mutable indexed sequence is empty.
Selects the last element.
Selects the last element.
The last element of this mutable indexed sequence.
(array: ofBoolean).last
NoSuchElementException
If the mutable indexed sequence is empty.
Selects the last element.
Selects the last element.
The last element of this mutable indexed sequence.
(array: ArrayOps[T]).last
NoSuchElementException
If the mutable indexed sequence is empty.
[use case] Finds index of last occurrence of some value in this array before or at a given end index.
Finds index of last occurrence of some value in this array before or at a given end index.
the element value to search for.
the end index.
the index <= end
of the last element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
(array: ofRef[T]).lastIndexOf(elem, end)
[use case] Finds index of last occurrence of some value in this array.
Finds index of last occurrence of some value in this array.
the element value to search for.
the index of the last element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
(array: ofRef[T]).lastIndexOf(elem)
[use case] Finds index of last occurrence of some value in this array before or at a given end index.
Finds index of last occurrence of some value in this array before or at a given end index.
the element value to search for.
the end index.
the index <= end
of the last element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
(array: ArrayOps[T]).lastIndexOf(elem, end)
[use case] Finds index of last occurrence of some value in this array.
Finds index of last occurrence of some value in this array.
the element value to search for.
the index of the last element of this array that is equal (as determined by ==
)
to elem
, or -1
, if none exists.
(array: ArrayOps[T]).lastIndexOf(elem)
Finds index of last element satisfying some predicate before or at given end index.
Finds index of last element satisfying some predicate before or at given end index.
the predicate used to test elements.
the index <= end
of the last element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
(array: ofRef[T]).lastIndexWhere(p, end)
Finds index of last element satisfying some predicate.
Finds index of last element satisfying some predicate.
the predicate used to test elements.
the index of the last element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
(array: ofRef[T]).lastIndexWhere(p)
Finds index of last element satisfying some predicate before or at given end index.
Finds index of last element satisfying some predicate before or at given end index.
the predicate used to test elements.
the index <= end
of the last element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
(array: ArrayOps[T]).lastIndexWhere(p, end)
Finds index of last element satisfying some predicate.
Finds index of last element satisfying some predicate.
the predicate used to test elements.
the index of the last element of this mutable indexed sequence that satisfies the predicate p
,
or -1
, if none exists.
(array: ArrayOps[T]).lastIndexWhere(p)
Optionally selects the last element.
Optionally selects the last element.
the last element of this mutable indexed sequence$ if it is nonempty,
None
if it is empty.
(array: ofUnit).lastOption
Optionally selects the last element.
Optionally selects the last element.
the last element of this mutable indexed sequence$ if it is nonempty,
None
if it is empty.
(array: ofShort).lastOption
Optionally selects the last element.
Optionally selects the last element.
the last element of this mutable indexed sequence$ if it is nonempty,
None
if it is empty.
(array: ofRef[T]).lastOption
Optionally selects the last element.
Optionally selects the last element.
the last element of this mutable indexed sequence$ if it is nonempty,
None
if it is empty.
(array: ofLong).lastOption
Optionally selects the last element.
Optionally selects the last element.
the last element of this mutable indexed sequence$ if it is nonempty,
None
if it is empty.
(array: ofInt).lastOption
Optionally selects the last element.
Optionally selects the last element.
the last element of this mutable indexed sequence$ if it is nonempty,
None
if it is empty.
(array: ofFloat).lastOption
Optionally selects the last element.
Optionally selects the last element.
the last element of this mutable indexed sequence$ if it is nonempty,
None
if it is empty.
(array: ofDouble).lastOption
Optionally selects the last element.
Optionally selects the last element.
the last element of this mutable indexed sequence$ if it is nonempty,
None
if it is empty.
(array: ofChar).lastOption
Optionally selects the last element.
Optionally selects the last element.
the last element of this mutable indexed sequence$ if it is nonempty,
None
if it is empty.
(array: ofByte).lastOption
Optionally selects the last element.
Optionally selects the last element.
the last element of this mutable indexed sequence$ if it is nonempty,
None
if it is empty.
(array: ofBoolean).lastOption
Optionally selects the last element.
Optionally selects the last element.
the last element of this mutable indexed sequence$ if it is nonempty,
None
if it is empty.
(array: ArrayOps[T]).lastOption
The length of the mutable indexed sequence.
The length of the mutable indexed sequence.
Note: xs.length
and xs.size
yield the same result.
the number of elements in this mutable indexed sequence.
(array: ofUnit).length
The length of the mutable indexed sequence.
The length of the mutable indexed sequence.
Note: xs.length
and xs.size
yield the same result.
the number of elements in this mutable indexed sequence.
(array: ofShort).length
The length of the mutable indexed sequence.
The length of the mutable indexed sequence.
Note: xs.length
and xs.size
yield the same result.
the number of elements in this mutable indexed sequence.
(array: ofRef[T]).length
The length of the mutable indexed sequence.
The length of the mutable indexed sequence.
Note: xs.length
and xs.size
yield the same result.
the number of elements in this mutable indexed sequence.
(array: ofLong).length
The length of the mutable indexed sequence.
The length of the mutable indexed sequence.
Note: xs.length
and xs.size
yield the same result.
the number of elements in this mutable indexed sequence.
(array: ofInt).length
The length of the mutable indexed sequence.
The length of the mutable indexed sequence.
Note: xs.length
and xs.size
yield the same result.
the number of elements in this mutable indexed sequence.
(array: ofFloat).length
The length of the mutable indexed sequence.
The length of the mutable indexed sequence.
Note: xs.length
and xs.size
yield the same result.
the number of elements in this mutable indexed sequence.
(array: ofDouble).length
The length of the mutable indexed sequence.
The length of the mutable indexed sequence.
Note: xs.length
and xs.size
yield the same result.
the number of elements in this mutable indexed sequence.
(array: ofChar).length
The length of the mutable indexed sequence.
The length of the mutable indexed sequence.
Note: xs.length
and xs.size
yield the same result.
the number of elements in this mutable indexed sequence.
(array: ofByte).length
The length of the mutable indexed sequence.
The length of the mutable indexed sequence.
Note: xs.length
and xs.size
yield the same result.
the number of elements in this mutable indexed sequence.
(array: ofBoolean).length
The length of the mutable indexed sequence.
The length of the mutable indexed sequence.
Note: xs.length
and xs.size
yield the same result.
the number of elements in this mutable indexed sequence.
(array: ArrayOps[T]).length
(array: ArrayCharSequence).length()
Compares the length of this mutable indexed sequence to a test value.
Compares the length of this mutable indexed sequence to a test value.
the test value that gets compared with the length.
A value x
where
x < 0 if this.length < len x == 0 if this.length == len x > 0 if this.length > len
The method as implemented here does not call length
directly; its running time
is O(length min len)
instead of O(length)
. The method should be overwritten
if computing length
is cheap.
(array: ofUnit).lengthCompare(len)
Compares the length of this mutable indexed sequence to a test value.
Compares the length of this mutable indexed sequence to a test value.
the test value that gets compared with the length.
A value x
where
x < 0 if this.length < len x == 0 if this.length == len x > 0 if this.length > len
The method as implemented here does not call length
directly; its running time
is O(length min len)
instead of O(length)
. The method should be overwritten
if computing length
is cheap.
(array: ofShort).lengthCompare(len)
Compares the length of this mutable indexed sequence to a test value.
Compares the length of this mutable indexed sequence to a test value.
the test value that gets compared with the length.
A value x
where
x < 0 if this.length < len x == 0 if this.length == len x > 0 if this.length > len
The method as implemented here does not call length
directly; its running time
is O(length min len)
instead of O(length)
. The method should be overwritten
if computing length
is cheap.
(array: ofRef[T]).lengthCompare(len)
Compares the length of this mutable indexed sequence to a test value.
Compares the length of this mutable indexed sequence to a test value.
the test value that gets compared with the length.
A value x
where
x < 0 if this.length < len x == 0 if this.length == len x > 0 if this.length > len
The method as implemented here does not call length
directly; its running time
is O(length min len)
instead of O(length)
. The method should be overwritten
if computing length
is cheap.
(array: ofLong).lengthCompare(len)
Compares the length of this mutable indexed sequence to a test value.
Compares the length of this mutable indexed sequence to a test value.
the test value that gets compared with the length.
A value x
where
x < 0 if this.length < len x == 0 if this.length == len x > 0 if this.length > len
The method as implemented here does not call length
directly; its running time
is O(length min len)
instead of O(length)
. The method should be overwritten
if computing length
is cheap.
(array: ofInt).lengthCompare(len)
Compares the length of this mutable indexed sequence to a test value.
Compares the length of this mutable indexed sequence to a test value.
the test value that gets compared with the length.
A value x
where
x < 0 if this.length < len x == 0 if this.length == len x > 0 if this.length > len
The method as implemented here does not call length
directly; its running time
is O(length min len)
instead of O(length)
. The method should be overwritten
if computing length
is cheap.
(array: ofFloat).lengthCompare(len)
Compares the length of this mutable indexed sequence to a test value.
Compares the length of this mutable indexed sequence to a test value.
the test value that gets compared with the length.
A value x
where
x < 0 if this.length < len x == 0 if this.length == len x > 0 if this.length > len
The method as implemented here does not call length
directly; its running time
is O(length min len)
instead of O(length)
. The method should be overwritten
if computing length
is cheap.
(array: ofDouble).lengthCompare(len)
Compares the length of this mutable indexed sequence to a test value.
Compares the length of this mutable indexed sequence to a test value.
the test value that gets compared with the length.
A value x
where
x < 0 if this.length < len x == 0 if this.length == len x > 0 if this.length > len
The method as implemented here does not call length
directly; its running time
is O(length min len)
instead of O(length)
. The method should be overwritten
if computing length
is cheap.
(array: ofChar).lengthCompare(len)
Compares the length of this mutable indexed sequence to a test value.
Compares the length of this mutable indexed sequence to a test value.
the test value that gets compared with the length.
A value x
where
x < 0 if this.length < len x == 0 if this.length == len x > 0 if this.length > len
The method as implemented here does not call length
directly; its running time
is O(length min len)
instead of O(length)
. The method should be overwritten
if computing length
is cheap.
(array: ofByte).lengthCompare(len)
Compares the length of this mutable indexed sequence to a test value.
Compares the length of this mutable indexed sequence to a test value.
the test value that gets compared with the length.
A value x
where
x < 0 if this.length < len x == 0 if this.length == len x > 0 if this.length > len
The method as implemented here does not call length
directly; its running time
is O(length min len)
instead of O(length)
. The method should be overwritten
if computing length
is cheap.
(array: ofBoolean).lengthCompare(len)
Compares the length of this mutable indexed sequence to a test value.
Compares the length of this mutable indexed sequence to a test value.
the test value that gets compared with the length.
A value x
where
x < 0 if this.length < len x == 0 if this.length == len x > 0 if this.length > len
The method as implemented here does not call length
directly; its running time
is O(length min len)
instead of O(length)
. The method should be overwritten
if computing length
is cheap.
(array: ArrayOps[T]).lengthCompare(len)
[use case] Finds the largest element.
Finds the largest element.
the largest element of this array.
(array: ofUnit).max
[use case] Finds the largest element.
Finds the largest element.
the largest element of this array.
(array: ofShort).max
[use case] Finds the largest element.
Finds the largest element.
the largest element of this array.
(array: ofRef[T]).max
[use case] Finds the largest element.
Finds the largest element.
the largest element of this array.
(array: ofLong).max
[use case] Finds the largest element.
Finds the largest element.
the largest element of this array.
(array: ofInt).max
[use case] Finds the largest element.
Finds the largest element.
the largest element of this array.
(array: ofFloat).max
[use case] Finds the largest element.
Finds the largest element.
the largest element of this array.
(array: ofDouble).max
[use case] Finds the largest element.
Finds the largest element.
the largest element of this array.
(array: ofChar).max
[use case] Finds the largest element.
Finds the largest element.
the largest element of this array.
(array: ofByte).max
[use case] Finds the largest element.
Finds the largest element.
the largest element of this array.
(array: ofBoolean).max
[use case] Finds the largest element.
Finds the largest element.
the largest element of this array.
(array: ArrayOps[T]).max
[use case] Finds the smallest element.
Finds the smallest element.
the smallest element of this array
(array: ofUnit).min
[use case] Finds the smallest element.
Finds the smallest element.
the smallest element of this array
(array: ofShort).min
[use case] Finds the smallest element.
Finds the smallest element.
the smallest element of this array
(array: ofRef[T]).min
[use case] Finds the smallest element.
Finds the smallest element.
the smallest element of this array
(array: ofLong).min
[use case] Finds the smallest element.
Finds the smallest element.
the smallest element of this array
(array: ofInt).min
[use case] Finds the smallest element.
Finds the smallest element.
the smallest element of this array
(array: ofFloat).min
[use case] Finds the smallest element.
Finds the smallest element.
the smallest element of this array
(array: ofDouble).min
[use case] Finds the smallest element.
Finds the smallest element.
the smallest element of this array
(array: ofChar).min
[use case] Finds the smallest element.
Finds the smallest element.
the smallest element of this array
(array: ofByte).min
[use case] Finds the smallest element.
Finds the smallest element.
the smallest element of this array
(array: ofBoolean).min
[use case] Finds the smallest element.
Finds the smallest element.
the smallest element of this array
(array: ArrayOps[T]).min
Displays all elements of this mutable indexed sequence in a string.
Displays all elements of this mutable indexed sequence in a string.
a string representation of this mutable indexed sequence. In the resulting string
the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence follow each other without any
separator string.
(array: ofUnit).mkString
Displays all elements of this mutable indexed sequence in a string using a separator string.
Displays all elements of this mutable indexed sequence in a string using a separator string.
the separator string.
a string representation of this mutable indexed sequence. In the resulting string
the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence are separated by the string sep
.
(array: ofUnit).mkString(sep)
List(1, 2, 3).mkString("|") = "1|2|3"
Displays all elements of this mutable indexed sequence in a string using start, end, and separator strings.
Displays all elements of this mutable indexed sequence in a string using start, end, and separator strings.
the starting string.
the separator string.
the ending string.
a string representation of this mutable indexed sequence. The resulting string
begins with the string start
and ends with the string
end
. Inside, the string representations (w.r.t. the method
toString
) of all elements of this mutable indexed sequence are separated by
the string sep
.
(array: ofUnit).mkString(start, sep, end)
List(1, 2, 3).mkString("(", "; ", ")") = "(1; 2; 3)"
Displays all elements of this mutable indexed sequence in a string.
Displays all elements of this mutable indexed sequence in a string.
a string representation of this mutable indexed sequence. In the resulting string
the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence follow each other without any
separator string.
(array: ofShort).mkString
Displays all elements of this mutable indexed sequence in a string using a separator string.
Displays all elements of this mutable indexed sequence in a string using a separator string.
the separator string.
a string representation of this mutable indexed sequence. In the resulting string
the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence are separated by the string sep
.
(array: ofShort).mkString(sep)
List(1, 2, 3).mkString("|") = "1|2|3"
Displays all elements of this mutable indexed sequence in a string using start, end, and separator strings.
Displays all elements of this mutable indexed sequence in a string using start, end, and separator strings.
the starting string.
the separator string.
the ending string.
a string representation of this mutable indexed sequence. The resulting string
begins with the string start
and ends with the string
end
. Inside, the string representations (w.r.t. the method
toString
) of all elements of this mutable indexed sequence are separated by
the string sep
.
(array: ofShort).mkString(start, sep, end)
List(1, 2, 3).mkString("(", "; ", ")") = "(1; 2; 3)"
Displays all elements of this mutable indexed sequence in a string.
Displays all elements of this mutable indexed sequence in a string.
a string representation of this mutable indexed sequence. In the resulting string
the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence follow each other without any
separator string.
(array: ofRef[T]).mkString
Displays all elements of this mutable indexed sequence in a string using a separator string.
Displays all elements of this mutable indexed sequence in a string using a separator string.
the separator string.
a string representation of this mutable indexed sequence. In the resulting string
the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence are separated by the string sep
.
(array: ofRef[T]).mkString(sep)
List(1, 2, 3).mkString("|") = "1|2|3"
Displays all elements of this mutable indexed sequence in a string using start, end, and separator strings.
Displays all elements of this mutable indexed sequence in a string using start, end, and separator strings.
the starting string.
the separator string.
the ending string.
a string representation of this mutable indexed sequence. The resulting string
begins with the string start
and ends with the string
end
. Inside, the string representations (w.r.t. the method
toString
) of all elements of this mutable indexed sequence are separated by
the string sep
.
(array: ofRef[T]).mkString(start, sep, end)
List(1, 2, 3).mkString("(", "; ", ")") = "(1; 2; 3)"
Displays all elements of this mutable indexed sequence in a string.
Displays all elements of this mutable indexed sequence in a string.
a string representation of this mutable indexed sequence. In the resulting string
the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence follow each other without any
separator string.
(array: ofLong).mkString
Displays all elements of this mutable indexed sequence in a string using a separator string.
Displays all elements of this mutable indexed sequence in a string using a separator string.
the separator string.
a string representation of this mutable indexed sequence. In the resulting string
the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence are separated by the string sep
.
(array: ofLong).mkString(sep)
List(1, 2, 3).mkString("|") = "1|2|3"
Displays all elements of this mutable indexed sequence in a string using start, end, and separator strings.
Displays all elements of this mutable indexed sequence in a string using start, end, and separator strings.
the starting string.
the separator string.
the ending string.
a string representation of this mutable indexed sequence. The resulting string
begins with the string start
and ends with the string
end
. Inside, the string representations (w.r.t. the method
toString
) of all elements of this mutable indexed sequence are separated by
the string sep
.
(array: ofLong).mkString(start, sep, end)
List(1, 2, 3).mkString("(", "; ", ")") = "(1; 2; 3)"
Displays all elements of this mutable indexed sequence in a string.
Displays all elements of this mutable indexed sequence in a string.
a string representation of this mutable indexed sequence. In the resulting string
the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence follow each other without any
separator string.
(array: ofInt).mkString
Displays all elements of this mutable indexed sequence in a string using a separator string.
Displays all elements of this mutable indexed sequence in a string using a separator string.
the separator string.
a string representation of this mutable indexed sequence. In the resulting string
the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence are separated by the string sep
.
(array: ofInt).mkString(sep)
List(1, 2, 3).mkString("|") = "1|2|3"
Displays all elements of this mutable indexed sequence in a string using start, end, and separator strings.
Displays all elements of this mutable indexed sequence in a string using start, end, and separator strings.
the starting string.
the separator string.
the ending string.
a string representation of this mutable indexed sequence. The resulting string
begins with the string start
and ends with the string
end
. Inside, the string representations (w.r.t. the method
toString
) of all elements of this mutable indexed sequence are separated by
the string sep
.
(array: ofInt).mkString(start, sep, end)
List(1, 2, 3).mkString("(", "; ", ")") = "(1; 2; 3)"
Displays all elements of this mutable indexed sequence in a string.
Displays all elements of this mutable indexed sequence in a string.
a string representation of this mutable indexed sequence. In the resulting string
the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence follow each other without any
separator string.
(array: ofFloat).mkString
Displays all elements of this mutable indexed sequence in a string using a separator string.
Displays all elements of this mutable indexed sequence in a string using a separator string.
the separator string.
a string representation of this mutable indexed sequence. In the resulting string
the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence are separated by the string sep
.
(array: ofFloat).mkString(sep)
List(1, 2, 3).mkString("|") = "1|2|3"
Displays all elements of this mutable indexed sequence in a string using start, end, and separator strings.
Displays all elements of this mutable indexed sequence in a string using start, end, and separator strings.
the starting string.
the separator string.
the ending string.
a string representation of this mutable indexed sequence. The resulting string
begins with the string start
and ends with the string
end
. Inside, the string representations (w.r.t. the method
toString
) of all elements of this mutable indexed sequence are separated by
the string sep
.
(array: ofFloat).mkString(start, sep, end)
List(1, 2, 3).mkString("(", "; ", ")") = "(1; 2; 3)"
Displays all elements of this mutable indexed sequence in a string.
Displays all elements of this mutable indexed sequence in a string.
a string representation of this mutable indexed sequence. In the resulting string
the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence follow each other without any
separator string.
(array: ofDouble).mkString
Displays all elements of this mutable indexed sequence in a string using a separator string.
Displays all elements of this mutable indexed sequence in a string using a separator string.
the separator string.
a string representation of this mutable indexed sequence. In the resulting string
the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence are separated by the string sep
.
(array: ofDouble).mkString(sep)
List(1, 2, 3).mkString("|") = "1|2|3"
Displays all elements of this mutable indexed sequence in a string using start, end, and separator strings.
Displays all elements of this mutable indexed sequence in a string using start, end, and separator strings.
the starting string.
the separator string.
the ending string.
a string representation of this mutable indexed sequence. The resulting string
begins with the string start
and ends with the string
end
. Inside, the string representations (w.r.t. the method
toString
) of all elements of this mutable indexed sequence are separated by
the string sep
.
(array: ofDouble).mkString(start, sep, end)
List(1, 2, 3).mkString("(", "; ", ")") = "(1; 2; 3)"
Displays all elements of this mutable indexed sequence in a string.
Displays all elements of this mutable indexed sequence in a string.
a string representation of this mutable indexed sequence. In the resulting string
the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence follow each other without any
separator string.
(array: ofChar).mkString
Displays all elements of this mutable indexed sequence in a string using a separator string.
Displays all elements of this mutable indexed sequence in a string using a separator string.
the separator string.
a string representation of this mutable indexed sequence. In the resulting string
the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence are separated by the string sep
.
(array: ofChar).mkString(sep)
List(1, 2, 3).mkString("|") = "1|2|3"
Displays all elements of this mutable indexed sequence in a string using start, end, and separator strings.
Displays all elements of this mutable indexed sequence in a string using start, end, and separator strings.
the starting string.
the separator string.
the ending string.
a string representation of this mutable indexed sequence. The resulting string
begins with the string start
and ends with the string
end
. Inside, the string representations (w.r.t. the method
toString
) of all elements of this mutable indexed sequence are separated by
the string sep
.
(array: ofChar).mkString(start, sep, end)
List(1, 2, 3).mkString("(", "; ", ")") = "(1; 2; 3)"
Displays all elements of this mutable indexed sequence in a string.
Displays all elements of this mutable indexed sequence in a string.
a string representation of this mutable indexed sequence. In the resulting string
the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence follow each other without any
separator string.
(array: ofByte).mkString
Displays all elements of this mutable indexed sequence in a string using a separator string.
Displays all elements of this mutable indexed sequence in a string using a separator string.
the separator string.
a string representation of this mutable indexed sequence. In the resulting string
the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence are separated by the string sep
.
(array: ofByte).mkString(sep)
List(1, 2, 3).mkString("|") = "1|2|3"
Displays all elements of this mutable indexed sequence in a string using start, end, and separator strings.
Displays all elements of this mutable indexed sequence in a string using start, end, and separator strings.
the starting string.
the separator string.
the ending string.
a string representation of this mutable indexed sequence. The resulting string
begins with the string start
and ends with the string
end
. Inside, the string representations (w.r.t. the method
toString
) of all elements of this mutable indexed sequence are separated by
the string sep
.
(array: ofByte).mkString(start, sep, end)
List(1, 2, 3).mkString("(", "; ", ")") = "(1; 2; 3)"
Displays all elements of this mutable indexed sequence in a string.
Displays all elements of this mutable indexed sequence in a string.
a string representation of this mutable indexed sequence. In the resulting string
the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence follow each other without any
separator string.
(array: ofBoolean).mkString
Displays all elements of this mutable indexed sequence in a string using a separator string.
Displays all elements of this mutable indexed sequence in a string using a separator string.
the separator string.
a string representation of this mutable indexed sequence. In the resulting string
the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence are separated by the string sep
.
(array: ofBoolean).mkString(sep)
List(1, 2, 3).mkString("|") = "1|2|3"
Displays all elements of this mutable indexed sequence in a string using start, end, and separator strings.
Displays all elements of this mutable indexed sequence in a string using start, end, and separator strings.
the starting string.
the separator string.
the ending string.
a string representation of this mutable indexed sequence. The resulting string
begins with the string start
and ends with the string
end
. Inside, the string representations (w.r.t. the method
toString
) of all elements of this mutable indexed sequence are separated by
the string sep
.
(array: ofBoolean).mkString(start, sep, end)
List(1, 2, 3).mkString("(", "; ", ")") = "(1; 2; 3)"
Displays all elements of this mutable indexed sequence in a string.
Displays all elements of this mutable indexed sequence in a string.
a string representation of this mutable indexed sequence. In the resulting string
the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence follow each other without any
separator string.
(array: ArrayOps[T]).mkString
Displays all elements of this mutable indexed sequence in a string using a separator string.
Displays all elements of this mutable indexed sequence in a string using a separator string.
the separator string.
a string representation of this mutable indexed sequence. In the resulting string
the string representations (w.r.t. the method toString
)
of all elements of this mutable indexed sequence are separated by the string sep
.
(array: ArrayOps[T]).mkString(sep)
List(1, 2, 3).mkString("|") = "1|2|3"
Displays all elements of this mutable indexed sequence in a string using start, end, and separator strings.
Displays all elements of this mutable indexed sequence in a string using start, end, and separator strings.
the starting string.
the separator string.
the ending string.
a string representation of this mutable indexed sequence. The resulting string
begins with the string start
and ends with the string
end
. Inside, the string representations (w.r.t. the method
toString
) of all elements of this mutable indexed sequence are separated by
the string sep
.
(array: ArrayOps[T]).mkString(start, sep, end)
List(1, 2, 3).mkString("(", "; ", ")") = "(1; 2; 3)"
Tests whether the mutable indexed sequence is not empty.
Tests whether the mutable indexed sequence is not empty.
true
if the mutable indexed sequence contains at least one element, false
otherwise.
(array: ofUnit).nonEmpty
Tests whether the mutable indexed sequence is not empty.
Tests whether the mutable indexed sequence is not empty.
true
if the mutable indexed sequence contains at least one element, false
otherwise.
(array: ofShort).nonEmpty
Tests whether the mutable indexed sequence is not empty.
Tests whether the mutable indexed sequence is not empty.
true
if the mutable indexed sequence contains at least one element, false
otherwise.
(array: ofRef[T]).nonEmpty
Tests whether the mutable indexed sequence is not empty.
Tests whether the mutable indexed sequence is not empty.
true
if the mutable indexed sequence contains at least one element, false
otherwise.
(array: ofLong).nonEmpty
Tests whether the mutable indexed sequence is not empty.
Tests whether the mutable indexed sequence is not empty.
true
if the mutable indexed sequence contains at least one element, false
otherwise.
(array: ofInt).nonEmpty
Tests whether the mutable indexed sequence is not empty.
Tests whether the mutable indexed sequence is not empty.
true
if the mutable indexed sequence contains at least one element, false
otherwise.
(array: ofFloat).nonEmpty
Tests whether the mutable indexed sequence is not empty.
Tests whether the mutable indexed sequence is not empty.
true
if the mutable indexed sequence contains at least one element, false
otherwise.
(array: ofDouble).nonEmpty
Tests whether the mutable indexed sequence is not empty.
Tests whether the mutable indexed sequence is not empty.
true
if the mutable indexed sequence contains at least one element, false
otherwise.
(array: ofChar).nonEmpty
Tests whether the mutable indexed sequence is not empty.
Tests whether the mutable indexed sequence is not empty.
true
if the mutable indexed sequence contains at least one element, false
otherwise.
(array: ofByte).nonEmpty
Tests whether the mutable indexed sequence is not empty.
Tests whether the mutable indexed sequence is not empty.
true
if the mutable indexed sequence contains at least one element, false
otherwise.
(array: ofBoolean).nonEmpty
Tests whether the mutable indexed sequence is not empty.
Tests whether the mutable indexed sequence is not empty.
true
if the mutable indexed sequence contains at least one element, false
otherwise.
(array: ArrayOps[T]).nonEmpty
[use case] A copy of this array with an element value appended until a given target length is reached.
A copy of this array with an element value appended until a given target length is reached.
the target length
the padding value
a new array consisting of
all elements of this array followed by the minimal number of occurrences of elem
so
that the resulting array has a length of at least len
.
(array: ofUnit).padTo(len, elem)
[use case] A copy of this array with an element value appended until a given target length is reached.
A copy of this array with an element value appended until a given target length is reached.
the target length
the padding value
a new array consisting of
all elements of this array followed by the minimal number of occurrences of elem
so
that the resulting array has a length of at least len
.
(array: ofShort).padTo(len, elem)
[use case] A copy of this array with an element value appended until a given target length is reached.
A copy of this array with an element value appended until a given target length is reached.
the target length
the padding value
a new array consisting of
all elements of this array followed by the minimal number of occurrences of elem
so
that the resulting array has a length of at least len
.
(array: ofRef[T]).padTo(len, elem)
[use case] A copy of this array with an element value appended until a given target length is reached.
A copy of this array with an element value appended until a given target length is reached.
the target length
the padding value
a new array consisting of
all elements of this array followed by the minimal number of occurrences of elem
so
that the resulting array has a length of at least len
.
(array: ofLong).padTo(len, elem)
[use case] A copy of this array with an element value appended until a given target length is reached.
A copy of this array with an element value appended until a given target length is reached.
the target length
the padding value
a new array consisting of
all elements of this array followed by the minimal number of occurrences of elem
so
that the resulting array has a length of at least len
.
(array: ofInt).padTo(len, elem)
[use case] A copy of this array with an element value appended until a given target length is reached.
A copy of this array with an element value appended until a given target length is reached.
the target length
the padding value
a new array consisting of
all elements of this array followed by the minimal number of occurrences of elem
so
that the resulting array has a length of at least len
.
(array: ofFloat).padTo(len, elem)
[use case] A copy of this array with an element value appended until a given target length is reached.
A copy of this array with an element value appended until a given target length is reached.
the target length
the padding value
a new array consisting of
all elements of this array followed by the minimal number of occurrences of elem
so
that the resulting array has a length of at least len
.
(array: ofDouble).padTo(len, elem)
[use case] A copy of this array with an element value appended until a given target length is reached.
A copy of this array with an element value appended until a given target length is reached.
the target length
the padding value
a new array consisting of
all elements of this array followed by the minimal number of occurrences of elem
so
that the resulting array has a length of at least len
.
(array: ofChar).padTo(len, elem)
[use case] A copy of this array with an element value appended until a given target length is reached.
A copy of this array with an element value appended until a given target length is reached.
the target length
the padding value
a new array consisting of
all elements of this array followed by the minimal number of occurrences of elem
so
that the resulting array has a length of at least len
.
(array: ofByte).padTo(len, elem)
[use case] A copy of this array with an element value appended until a given target length is reached.
A copy of this array with an element value appended until a given target length is reached.
the target length
the padding value
a new array consisting of
all elements of this array followed by the minimal number of occurrences of elem
so
that the resulting array has a length of at least len
.
(array: ofBoolean).padTo(len, elem)
[use case] A copy of this array with an element value appended until a given target length is reached.
A copy of this array with an element value appended until a given target length is reached.
the target length
the padding value
a new array consisting of
all elements of this array followed by the minimal number of occurrences of elem
so
that the resulting array has a length of at least len
.
(array: ArrayOps[T]).padTo(len, elem)
Returns a parallel implementation of this collection.
Returns a parallel implementation of this collection.
For most collection types, this method creates a new parallel collection by copying
all the elements. For these collection, par
takes linear time. Mutable collections
in this category do not produce a mutable parallel collection that has the same
underlying dataset, so changes in one collection will not be reflected in the other one.
Specific collections (e.g. ParArray
or mutable.ParHashMap
) override this default
behaviour by creating a parallel collection which shares the same underlying dataset.
For these collections, par
takes constant or sublinear time.
All parallel collections return a reference to themselves.
a parallel implementation of this collection
(array: ofUnit).par
Returns a parallel implementation of this collection.
Returns a parallel implementation of this collection.
For most collection types, this method creates a new parallel collection by copying
all the elements. For these collection, par
takes linear time. Mutable collections
in this category do not produce a mutable parallel collection that has the same
underlying dataset, so changes in one collection will not be reflected in the other one.
Specific collections (e.g. ParArray
or mutable.ParHashMap
) override this default
behaviour by creating a parallel collection which shares the same underlying dataset.
For these collections, par
takes constant or sublinear time.
All parallel collections return a reference to themselves.
a parallel implementation of this collection
(array: ofShort).par
Returns a parallel implementation of this collection.
Returns a parallel implementation of this collection.
For most collection types, this method creates a new parallel collection by copying
all the elements. For these collection, par
takes linear time. Mutable collections
in this category do not produce a mutable parallel collection that has the same
underlying dataset, so changes in one collection will not be reflected in the other one.
Specific collections (e.g. ParArray
or mutable.ParHashMap
) override this default
behaviour by creating a parallel collection which shares the same underlying dataset.
For these collections, par
takes constant or sublinear time.
All parallel collections return a reference to themselves.
a parallel implementation of this collection
(array: ofRef[T]).par
Returns a parallel implementation of this collection.
Returns a parallel implementation of this collection.
For most collection types, this method creates a new parallel collection by copying
all the elements. For these collection, par
takes linear time. Mutable collections
in this category do not produce a mutable parallel collection that has the same
underlying dataset, so changes in one collection will not be reflected in the other one.
Specific collections (e.g. ParArray
or mutable.ParHashMap
) override this default
behaviour by creating a parallel collection which shares the same underlying dataset.
For these collections, par
takes constant or sublinear time.
All parallel collections return a reference to themselves.
a parallel implementation of this collection
(array: ofLong).par
Returns a parallel implementation of this collection.
Returns a parallel implementation of this collection.
For most collection types, this method creates a new parallel collection by copying
all the elements. For these collection, par
takes linear time. Mutable collections
in this category do not produce a mutable parallel collection that has the same
underlying dataset, so changes in one collection will not be reflected in the other one.
Specific collections (e.g. ParArray
or mutable.ParHashMap
) override this default
behaviour by creating a parallel collection which shares the same underlying dataset.
For these collections, par
takes constant or sublinear time.
All parallel collections return a reference to themselves.
a parallel implementation of this collection
(array: ofInt).par
Returns a parallel implementation of this collection.
Returns a parallel implementation of this collection.
For most collection types, this method creates a new parallel collection by copying
all the elements. For these collection, par
takes linear time. Mutable collections
in this category do not produce a mutable parallel collection that has the same
underlying dataset, so changes in one collection will not be reflected in the other one.
Specific collections (e.g. ParArray
or mutable.ParHashMap
) override this default
behaviour by creating a parallel collection which shares the same underlying dataset.
For these collections, par
takes constant or sublinear time.
All parallel collections return a reference to themselves.
a parallel implementation of this collection
(array: ofFloat).par
Returns a parallel implementation of this collection.
Returns a parallel implementation of this collection.
For most collection types, this method creates a new parallel collection by copying
all the elements. For these collection, par
takes linear time. Mutable collections
in this category do not produce a mutable parallel collection that has the same
underlying dataset, so changes in one collection will not be reflected in the other one.
Specific collections (e.g. ParArray
or mutable.ParHashMap
) override this default
behaviour by creating a parallel collection which shares the same underlying dataset.
For these collections, par
takes constant or sublinear time.
All parallel collections return a reference to themselves.
a parallel implementation of this collection
(array: ofDouble).par
Returns a parallel implementation of this collection.
Returns a parallel implementation of this collection.
For most collection types, this method creates a new parallel collection by copying
all the elements. For these collection, par
takes linear time. Mutable collections
in this category do not produce a mutable parallel collection that has the same
underlying dataset, so changes in one collection will not be reflected in the other one.
Specific collections (e.g. ParArray
or mutable.ParHashMap
) override this default
behaviour by creating a parallel collection which shares the same underlying dataset.
For these collections, par
takes constant or sublinear time.
All parallel collections return a reference to themselves.
a parallel implementation of this collection
(array: ofChar).par
Returns a parallel implementation of this collection.
Returns a parallel implementation of this collection.
For most collection types, this method creates a new parallel collection by copying
all the elements. For these collection, par
takes linear time. Mutable collections
in this category do not produce a mutable parallel collection that has the same
underlying dataset, so changes in one collection will not be reflected in the other one.
Specific collections (e.g. ParArray
or mutable.ParHashMap
) override this default
behaviour by creating a parallel collection which shares the same underlying dataset.
For these collections, par
takes constant or sublinear time.
All parallel collections return a reference to themselves.
a parallel implementation of this collection
(array: ofByte).par
Returns a parallel implementation of this collection.
Returns a parallel implementation of this collection.
For most collection types, this method creates a new parallel collection by copying
all the elements. For these collection, par
takes linear time. Mutable collections
in this category do not produce a mutable parallel collection that has the same
underlying dataset, so changes in one collection will not be reflected in the other one.
Specific collections (e.g. ParArray
or mutable.ParHashMap
) override this default
behaviour by creating a parallel collection which shares the same underlying dataset.
For these collections, par
takes constant or sublinear time.
All parallel collections return a reference to themselves.
a parallel implementation of this collection
(array: ofBoolean).par
Returns a parallel implementation of this collection.
Returns a parallel implementation of this collection.
For most collection types, this method creates a new parallel collection by copying
all the elements. For these collection, par
takes linear time. Mutable collections
in this category do not produce a mutable parallel collection that has the same
underlying dataset, so changes in one collection will not be reflected in the other one.
Specific collections (e.g. ParArray
or mutable.ParHashMap
) override this default
behaviour by creating a parallel collection which shares the same underlying dataset.
For these collections, par
takes constant or sublinear time.
All parallel collections return a reference to themselves.
a parallel implementation of this collection
(array: ArrayOps[T]).par
Partitions this mutable indexed sequence in two mutable indexed sequences according to a predicate.
Partitions this mutable indexed sequence in two mutable indexed sequences according to a predicate.
the predicate on which to partition.
a pair of mutable indexed sequences: the first mutable indexed sequence consists of all elements that
satisfy the predicate p
and the second mutable indexed sequence consists of all elements
that don't. The relative order of the elements in the resulting mutable indexed sequences
is the same as in the original mutable indexed sequence.
(array: ofRef[T]).partition(p)
Partitions this mutable indexed sequence in two mutable indexed sequences according to a predicate.
Partitions this mutable indexed sequence in two mutable indexed sequences according to a predicate.
the predicate on which to partition.
a pair of mutable indexed sequences: the first mutable indexed sequence consists of all elements that
satisfy the predicate p
and the second mutable indexed sequence consists of all elements
that don't. The relative order of the elements in the resulting mutable indexed sequences
is the same as in the original mutable indexed sequence.
(array: ArrayOps[T]).partition(p)
[use case] Produces a new array where a slice of elements in this array is replaced by another sequence.
Produces a new array where a slice of elements in this array is replaced by another sequence.
the index of the first replaced element
the number of elements to drop in the original array
a new array consisting of all elements of this array
except that replaced
elements starting from from
are replaced
by patch
.
(array: ofUnit).patch(from, that, replaced)
[use case] Produces a new array where a slice of elements in this array is replaced by another sequence.
Produces a new array where a slice of elements in this array is replaced by another sequence.
the index of the first replaced element
the number of elements to drop in the original array
a new array consisting of all elements of this array
except that replaced
elements starting from from
are replaced
by patch
.
(array: ofShort).patch(from, that, replaced)
[use case] Produces a new array where a slice of elements in this array is replaced by another sequence.
Produces a new array where a slice of elements in this array is replaced by another sequence.
the index of the first replaced element
the number of elements to drop in the original array
a new array consisting of all elements of this array
except that replaced
elements starting from from
are replaced
by patch
.
(array: ofRef[T]).patch(from, that, replaced)
[use case] Produces a new array where a slice of elements in this array is replaced by another sequence.
Produces a new array where a slice of elements in this array is replaced by another sequence.
the index of the first replaced element
the number of elements to drop in the original array
a new array consisting of all elements of this array
except that replaced
elements starting from from
are replaced
by patch
.
(array: ofLong).patch(from, that, replaced)
[use case] Produces a new array where a slice of elements in this array is replaced by another sequence.
Produces a new array where a slice of elements in this array is replaced by another sequence.
the index of the first replaced element
the number of elements to drop in the original array
a new array consisting of all elements of this array
except that replaced
elements starting from from
are replaced
by patch
.
(array: ofInt).patch(from, that, replaced)
[use case] Produces a new array where a slice of elements in this array is replaced by another sequence.
Produces a new array where a slice of elements in this array is replaced by another sequence.
the index of the first replaced element
the number of elements to drop in the original array
a new array consisting of all elements of this array
except that replaced
elements starting from from
are replaced
by patch
.
(array: ofFloat).patch(from, that, replaced)
[use case] Produces a new array where a slice of elements in this array is replaced by another sequence.
Produces a new array where a slice of elements in this array is replaced by another sequence.
the index of the first replaced element
the number of elements to drop in the original array
a new array consisting of all elements of this array
except that replaced
elements starting from from
are replaced
by patch
.
(array: ofDouble).patch(from, that, replaced)
[use case] Produces a new array where a slice of elements in this array is replaced by another sequence.
Produces a new array where a slice of elements in this array is replaced by another sequence.
the index of the first replaced element
the number of elements to drop in the original array
a new array consisting of all elements of this array
except that replaced
elements starting from from
are replaced
by patch
.
(array: ofChar).patch(from, that, replaced)
[use case] Produces a new array where a slice of elements in this array is replaced by another sequence.
Produces a new array where a slice of elements in this array is replaced by another sequence.
the index of the first replaced element
the number of elements to drop in the original array
a new array consisting of all elements of this array
except that replaced
elements starting from from
are replaced
by patch
.
(array: ofByte).patch(from, that, replaced)
[use case] Produces a new array where a slice of elements in this array is replaced by another sequence.
Produces a new array where a slice of elements in this array is replaced by another sequence.
the index of the first replaced element
the number of elements to drop in the original array
a new array consisting of all elements of this array
except that replaced
elements starting from from
are replaced
by patch
.
(array: ofBoolean).patch(from, that, replaced)
[use case] Produces a new array where a slice of elements in this array is replaced by another sequence.
Produces a new array where a slice of elements in this array is replaced by another sequence.
the index of the first replaced element
the number of elements to drop in the original array
a new array consisting of all elements of this array
except that replaced
elements starting from from
are replaced
by patch
.
(array: ArrayOps[T]).patch(from, that, replaced)
Iterates over distinct permutations.
Iterates over distinct permutations.
An Iterator which traverses the distinct permutations of this mutable indexed sequence.
(array: ofUnit).permutations
"abb".permutations = Iterator(abb, bab, bba)
Iterates over distinct permutations.
Iterates over distinct permutations.
An Iterator which traverses the distinct permutations of this mutable indexed sequence.
(array: ofShort).permutations
"abb".permutations = Iterator(abb, bab, bba)
Iterates over distinct permutations.
Iterates over distinct permutations.
An Iterator which traverses the distinct permutations of this mutable indexed sequence.
(array: ofRef[T]).permutations
"abb".permutations = Iterator(abb, bab, bba)
Iterates over distinct permutations.
Iterates over distinct permutations.
An Iterator which traverses the distinct permutations of this mutable indexed sequence.
(array: ofLong).permutations
"abb".permutations = Iterator(abb, bab, bba)
Iterates over distinct permutations.
Iterates over distinct permutations.
An Iterator which traverses the distinct permutations of this mutable indexed sequence.
(array: ofInt).permutations
"abb".permutations = Iterator(abb, bab, bba)
Iterates over distinct permutations.
Iterates over distinct permutations.
An Iterator which traverses the distinct permutations of this mutable indexed sequence.
(array: ofFloat).permutations
"abb".permutations = Iterator(abb, bab, bba)
Iterates over distinct permutations.
Iterates over distinct permutations.
An Iterator which traverses the distinct permutations of this mutable indexed sequence.
(array: ofDouble).permutations
"abb".permutations = Iterator(abb, bab, bba)
Iterates over distinct permutations.
Iterates over distinct permutations.
An Iterator which traverses the distinct permutations of this mutable indexed sequence.
(array: ofChar).permutations
"abb".permutations = Iterator(abb, bab, bba)
Iterates over distinct permutations.
Iterates over distinct permutations.
An Iterator which traverses the distinct permutations of this mutable indexed sequence.
(array: ofByte).permutations
"abb".permutations = Iterator(abb, bab, bba)
Iterates over distinct permutations.
Iterates over distinct permutations.
An Iterator which traverses the distinct permutations of this mutable indexed sequence.
(array: ofBoolean).permutations
"abb".permutations = Iterator(abb, bab, bba)
Iterates over distinct permutations.
Iterates over distinct permutations.
An Iterator which traverses the distinct permutations of this mutable indexed sequence.
(array: ArrayOps[T]).permutations
"abb".permutations = Iterator(abb, bab, bba)
Returns the length of the longest prefix whose elements all satisfy some predicate.
Returns the length of the longest prefix whose elements all satisfy some predicate.
the predicate used to test elements.
the length of the longest prefix of this mutable indexed sequence
such that every element of the segment satisfies the predicate p
.
(array: ofRef[T]).prefixLength(p)
Returns the length of the longest prefix whose elements all satisfy some predicate.
Returns the length of the longest prefix whose elements all satisfy some predicate.
the predicate used to test elements.
the length of the longest prefix of this mutable indexed sequence
such that every element of the segment satisfies the predicate p
.
(array: ArrayOps[T]).prefixLength(p)
[use case] Multiplies up the elements of this collection.
Multiplies up the elements of this collection.
the product of all elements in this array of numbers of type Int
.
Instead of Int
, any other type T
with an implicit Numeric[T]
implementation
can be used as element type of the array and as result type of product
.
Examples of such types are: Long
, Float
, Double
, BigInt
.
(array: ofUnit).product
[use case] Multiplies up the elements of this collection.
Multiplies up the elements of this collection.
the product of all elements in this array of numbers of type Int
.
Instead of Int
, any other type T
with an implicit Numeric[T]
implementation
can be used as element type of the array and as result type of product
.
Examples of such types are: Long
, Float
, Double
, BigInt
.
(array: ofShort).product
[use case] Multiplies up the elements of this collection.
Multiplies up the elements of this collection.
the product of all elements in this array of numbers of type Int
.
Instead of Int
, any other type T
with an implicit Numeric[T]
implementation
can be used as element type of the array and as result type of product
.
Examples of such types are: Long
, Float
, Double
, BigInt
.
(array: ofRef[T]).product
[use case] Multiplies up the elements of this collection.
Multiplies up the elements of this collection.
the product of all elements in this array of numbers of type Int
.
Instead of Int
, any other type T
with an implicit Numeric[T]
implementation
can be used as element type of the array and as result type of product
.
Examples of such types are: Long
, Float
, Double
, BigInt
.
(array: ofLong).product
[use case] Multiplies up the elements of this collection.
Multiplies up the elements of this collection.
the product of all elements in this array of numbers of type Int
.
Instead of Int
, any other type T
with an implicit Numeric[T]
implementation
can be used as element type of the array and as result type of product
.
Examples of such types are: Long
, Float
, Double
, BigInt
.
(array: ofInt).product
[use case] Multiplies up the elements of this collection.
Multiplies up the elements of this collection.
the product of all elements in this array of numbers of type Int
.
Instead of Int
, any other type T
with an implicit Numeric[T]
implementation
can be used as element type of the array and as result type of product
.
Examples of such types are: Long
, Float
, Double
, BigInt
.
(array: ofFloat).product
[use case] Multiplies up the elements of this collection.
Multiplies up the elements of this collection.
the product of all elements in this array of numbers of type Int
.
Instead of Int
, any other type T
with an implicit Numeric[T]
implementation
can be used as element type of the array and as result type of product
.
Examples of such types are: Long
, Float
, Double
, BigInt
.
(array: ofDouble).product
[use case] Multiplies up the elements of this collection.
Multiplies up the elements of this collection.
the product of all elements in this array of numbers of type Int
.
Instead of Int
, any other type T
with an implicit Numeric[T]
implementation
can be used as element type of the array and as result type of product
.
Examples of such types are: Long
, Float
, Double
, BigInt
.
(array: ofChar).product
[use case] Multiplies up the elements of this collection.
Multiplies up the elements of this collection.
the product of all elements in this array of numbers of type Int
.
Instead of Int
, any other type T
with an implicit Numeric[T]
implementation
can be used as element type of the array and as result type of product
.
Examples of such types are: Long
, Float
, Double
, BigInt
.
(array: ofByte).product
[use case] Multiplies up the elements of this collection.
Multiplies up the elements of this collection.
the product of all elements in this array of numbers of type Int
.
Instead of Int
, any other type T
with an implicit Numeric[T]
implementation
can be used as element type of the array and as result type of product
.
Examples of such types are: Long
, Float
, Double
, BigInt
.
(array: ofBoolean).product
[use case] Multiplies up the elements of this collection.
Multiplies up the elements of this collection.
the product of all elements in this array of numbers of type Int
.
Instead of Int
, any other type T
with an implicit Numeric[T]
implementation
can be used as element type of the array and as result type of product
.
Examples of such types are: Long
, Float
, Double
, BigInt
.
(array: ArrayOps[T]).product
The collection of type mutable indexed sequence underlying this TraversableLike
object.
The collection of type mutable indexed sequence underlying this TraversableLike
object.
By default this is implemented as the TraversableLike
object itself,
but this can be overridden.
(array: ArrayOps[T]).repr
The collection of type mutable indexed sequence underlying this TraversableLike
object.
The collection of type mutable indexed sequence underlying this TraversableLike
object.
By default this is implemented as the TraversableLike
object itself,
but this can be overridden.
(array: ofUnit).repr
The collection of type mutable indexed sequence underlying this TraversableLike
object.
The collection of type mutable indexed sequence underlying this TraversableLike
object.
By default this is implemented as the TraversableLike
object itself,
but this can be overridden.
(array: ofShort).repr
The collection of type mutable indexed sequence underlying this TraversableLike
object.
The collection of type mutable indexed sequence underlying this TraversableLike
object.
By default this is implemented as the TraversableLike
object itself,
but this can be overridden.
(array: ofRef[T]).repr
The collection of type mutable indexed sequence underlying this TraversableLike
object.
The collection of type mutable indexed sequence underlying this TraversableLike
object.
By default this is implemented as the TraversableLike
object itself,
but this can be overridden.
(array: ofLong).repr
The collection of type mutable indexed sequence underlying this TraversableLike
object.
The collection of type mutable indexed sequence underlying this TraversableLike
object.
By default this is implemented as the TraversableLike
object itself,
but this can be overridden.
(array: ofInt).repr
The collection of type mutable indexed sequence underlying this TraversableLike
object.
The collection of type mutable indexed sequence underlying this TraversableLike
object.
By default this is implemented as the TraversableLike
object itself,
but this can be overridden.
(array: ofFloat).repr
The collection of type mutable indexed sequence underlying this TraversableLike
object.
The collection of type mutable indexed sequence underlying this TraversableLike
object.
By default this is implemented as the TraversableLike
object itself,
but this can be overridden.
(array: ofDouble).repr
The collection of type mutable indexed sequence underlying this TraversableLike
object.
The collection of type mutable indexed sequence underlying this TraversableLike
object.
By default this is implemented as the TraversableLike
object itself,
but this can be overridden.
(array: ofChar).repr
The collection of type mutable indexed sequence underlying this TraversableLike
object.
The collection of type mutable indexed sequence underlying this TraversableLike
object.
By default this is implemented as the TraversableLike
object itself,
but this can be overridden.
(array: ofByte).repr
The collection of type mutable indexed sequence underlying this TraversableLike
object.
The collection of type mutable indexed sequence underlying this TraversableLike
object.
By default this is implemented as the TraversableLike
object itself,
but this can be overridden.
(array: ofBoolean).repr
Returns new mutable indexed sequence with elements in reversed order.
Returns new mutable indexed sequence with elements in reversed order.
A new mutable indexed sequence with all elements of this mutable indexed sequence in reversed order.
(array: ofUnit).reverse
Returns new mutable indexed sequence with elements in reversed order.
Returns new mutable indexed sequence with elements in reversed order.
A new mutable indexed sequence with all elements of this mutable indexed sequence in reversed order.
(array: ofShort).reverse
Returns new mutable indexed sequence with elements in reversed order.
Returns new mutable indexed sequence with elements in reversed order.
A new mutable indexed sequence with all elements of this mutable indexed sequence in reversed order.
(array: ofRef[T]).reverse
Returns new mutable indexed sequence with elements in reversed order.
Returns new mutable indexed sequence with elements in reversed order.
A new mutable indexed sequence with all elements of this mutable indexed sequence in reversed order.
(array: ofLong).reverse
Returns new mutable indexed sequence with elements in reversed order.
Returns new mutable indexed sequence with elements in reversed order.
A new mutable indexed sequence with all elements of this mutable indexed sequence in reversed order.
(array: ofInt).reverse
Returns new mutable indexed sequence with elements in reversed order.
Returns new mutable indexed sequence with elements in reversed order.
A new mutable indexed sequence with all elements of this mutable indexed sequence in reversed order.
(array: ofFloat).reverse
Returns new mutable indexed sequence with elements in reversed order.
Returns new mutable indexed sequence with elements in reversed order.
A new mutable indexed sequence with all elements of this mutable indexed sequence in reversed order.
(array: ofDouble).reverse
Returns new mutable indexed sequence with elements in reversed order.
Returns new mutable indexed sequence with elements in reversed order.
A new mutable indexed sequence with all elements of this mutable indexed sequence in reversed order.
(array: ofChar).reverse
Returns new mutable indexed sequence with elements in reversed order.
Returns new mutable indexed sequence with elements in reversed order.
A new mutable indexed sequence with all elements of this mutable indexed sequence in reversed order.
(array: ofByte).reverse
Returns new mutable indexed sequence with elements in reversed order.
Returns new mutable indexed sequence with elements in reversed order.
A new mutable indexed sequence with all elements of this mutable indexed sequence in reversed order.
(array: ofBoolean).reverse
Returns new mutable indexed sequence with elements in reversed order.
Returns new mutable indexed sequence with elements in reversed order.
A new mutable indexed sequence with all elements of this mutable indexed sequence in reversed order.
(array: ArrayOps[T]).reverse
An iterator yielding elements in reversed order.
An iterator yielding elements in reversed order.
Note: xs.reverseIterator
is the same as xs.reverse.iterator
but might be more efficient.
an iterator yielding the elements of this mutable indexed sequence in reversed order
(array: ofUnit).reverseIterator
An iterator yielding elements in reversed order.
An iterator yielding elements in reversed order.
Note: xs.reverseIterator
is the same as xs.reverse.iterator
but might be more efficient.
an iterator yielding the elements of this mutable indexed sequence in reversed order
(array: ofShort).reverseIterator
An iterator yielding elements in reversed order.
An iterator yielding elements in reversed order.
Note: xs.reverseIterator
is the same as xs.reverse.iterator
but might be more efficient.
an iterator yielding the elements of this mutable indexed sequence in reversed order
(array: ofRef[T]).reverseIterator
An iterator yielding elements in reversed order.
An iterator yielding elements in reversed order.
Note: xs.reverseIterator
is the same as xs.reverse.iterator
but might be more efficient.
an iterator yielding the elements of this mutable indexed sequence in reversed order
(array: ofLong).reverseIterator
An iterator yielding elements in reversed order.
An iterator yielding elements in reversed order.
Note: xs.reverseIterator
is the same as xs.reverse.iterator
but might be more efficient.
an iterator yielding the elements of this mutable indexed sequence in reversed order
(array: ofInt).reverseIterator
An iterator yielding elements in reversed order.
An iterator yielding elements in reversed order.
Note: xs.reverseIterator
is the same as xs.reverse.iterator
but might be more efficient.
an iterator yielding the elements of this mutable indexed sequence in reversed order
(array: ofFloat).reverseIterator
An iterator yielding elements in reversed order.
An iterator yielding elements in reversed order.
Note: xs.reverseIterator
is the same as xs.reverse.iterator
but might be more efficient.
an iterator yielding the elements of this mutable indexed sequence in reversed order
(array: ofDouble).reverseIterator
An iterator yielding elements in reversed order.
An iterator yielding elements in reversed order.
Note: xs.reverseIterator
is the same as xs.reverse.iterator
but might be more efficient.
an iterator yielding the elements of this mutable indexed sequence in reversed order
(array: ofChar).reverseIterator
An iterator yielding elements in reversed order.
An iterator yielding elements in reversed order.
Note: xs.reverseIterator
is the same as xs.reverse.iterator
but might be more efficient.
an iterator yielding the elements of this mutable indexed sequence in reversed order
(array: ofByte).reverseIterator
An iterator yielding elements in reversed order.
An iterator yielding elements in reversed order.
Note: xs.reverseIterator
is the same as xs.reverse.iterator
but might be more efficient.
an iterator yielding the elements of this mutable indexed sequence in reversed order
(array: ofBoolean).reverseIterator
An iterator yielding elements in reversed order.
An iterator yielding elements in reversed order.
Note: xs.reverseIterator
is the same as xs.reverse.iterator
but might be more efficient.
an iterator yielding the elements of this mutable indexed sequence in reversed order
(array: ArrayOps[T]).reverseIterator
[use case] Checks if the other iterable collection contains the same elements in the same order as this array.
Checks if the other iterable collection contains the same elements in the same order as this array.
the collection to compare with.
true
, if both collections contain the same elements in the same order, false
otherwise.
(array: ofUnit).sameElements(that)
[use case] Checks if the other iterable collection contains the same elements in the same order as this array.
Checks if the other iterable collection contains the same elements in the same order as this array.
the collection to compare with.
true
, if both collections contain the same elements in the same order, false
otherwise.
(array: ofShort).sameElements(that)
[use case] Checks if the other iterable collection contains the same elements in the same order as this array.
Checks if the other iterable collection contains the same elements in the same order as this array.
the collection to compare with.
true
, if both collections contain the same elements in the same order, false
otherwise.
(array: ofRef[T]).sameElements(that)
[use case] Checks if the other iterable collection contains the same elements in the same order as this array.
Checks if the other iterable collection contains the same elements in the same order as this array.
the collection to compare with.
true
, if both collections contain the same elements in the same order, false
otherwise.
(array: ofLong).sameElements(that)
[use case] Checks if the other iterable collection contains the same elements in the same order as this array.
Checks if the other iterable collection contains the same elements in the same order as this array.
the collection to compare with.
true
, if both collections contain the same elements in the same order, false
otherwise.
(array: ofInt).sameElements(that)
[use case] Checks if the other iterable collection contains the same elements in the same order as this array.
Checks if the other iterable collection contains the same elements in the same order as this array.
the collection to compare with.
true
, if both collections contain the same elements in the same order, false
otherwise.
(array: ofFloat).sameElements(that)
[use case] Checks if the other iterable collection contains the same elements in the same order as this array.
Checks if the other iterable collection contains the same elements in the same order as this array.
the collection to compare with.
true
, if both collections contain the same elements in the same order, false
otherwise.
(array: ofDouble).sameElements(that)
[use case] Checks if the other iterable collection contains the same elements in the same order as this array.
Checks if the other iterable collection contains the same elements in the same order as this array.
the collection to compare with.
true
, if both collections contain the same elements in the same order, false
otherwise.
(array: ofChar).sameElements(that)
[use case] Checks if the other iterable collection contains the same elements in the same order as this array.
Checks if the other iterable collection contains the same elements in the same order as this array.
the collection to compare with.
true
, if both collections contain the same elements in the same order, false
otherwise.
(array: ofByte).sameElements(that)
[use case] Checks if the other iterable collection contains the same elements in the same order as this array.
Checks if the other iterable collection contains the same elements in the same order as this array.
the collection to compare with.
true
, if both collections contain the same elements in the same order, false
otherwise.
(array: ofBoolean).sameElements(that)
[use case] Checks if the other iterable collection contains the same elements in the same order as this array.
Checks if the other iterable collection contains the same elements in the same order as this array.
the collection to compare with.
true
, if both collections contain the same elements in the same order, false
otherwise.
(array: ArrayOps[T]).sameElements(that)
Produces a collection containing cumulative results of applying the operator going left to right.
Produces a collection containing cumulative results of applying the operator going left to right.
the type of the elements in the resulting collection
the actual type of the resulting collection
the initial value
the binary operator applied to the intermediate result and the element
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
collection with intermediate results
(array: ofRef[T]).scanLeft(z)(op)(bf)
Produces a collection containing cumulative results of applying the operator going left to right.
Produces a collection containing cumulative results of applying the operator going left to right.
the type of the elements in the resulting collection
the actual type of the resulting collection
the initial value
the binary operator applied to the intermediate result and the element
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
collection with intermediate results
(array: ArrayOps[T]).scanLeft(z)(op)(bf)
Produces a collection containing cumulative results of applying the operator going right to left.
Produces a collection containing cumulative results of applying the operator going right to left. The head of the collection is the last cumulative result.
Example:
List(1, 2, 3, 4).scanRight(0)(_ + _) == List(10, 9, 7, 4, 0)
the type of the elements in the resulting collection
the actual type of the resulting collection
the initial value
the binary operator applied to the intermediate result and the element
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
collection with intermediate results
(array: ofRef[T]).scanRight(z)(op)(bf)
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
Produces a collection containing cumulative results of applying the operator going right to left.
Produces a collection containing cumulative results of applying the operator going right to left. The head of the collection is the last cumulative result.
Example:
List(1, 2, 3, 4).scanRight(0)(_ + _) == List(10, 9, 7, 4, 0)
the type of the elements in the resulting collection
the actual type of the resulting collection
the initial value
the binary operator applied to the intermediate result and the element
an implicit value of class CanBuildFrom
which determines the
result class That
from the current representation type Repr
and the new element type B
.
collection with intermediate results
(array: ArrayOps[T]).scanRight(z)(op)(bf)
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
Computes length of longest segment whose elements all satisfy some predicate.
Computes length of longest segment whose elements all satisfy some predicate.
the predicate used to test elements.
the index where the search starts.
the length of the longest segment of this mutable indexed sequence starting from index from
such that every element of the segment satisfies the predicate p
.
(array: ofRef[T]).segmentLength(p, from)
Computes length of longest segment whose elements all satisfy some predicate.
Computes length of longest segment whose elements all satisfy some predicate.
the predicate used to test elements.
the index where the search starts.
the length of the longest segment of this mutable indexed sequence starting from index from
such that every element of the segment satisfies the predicate p
.
(array: ArrayOps[T]).segmentLength(p, from)
A version of this collection with all of the operations implemented sequentially (i.e., in a single-threaded manner).
A version of this collection with all of the operations implemented sequentially (i.e., in a single-threaded manner).
This method returns a reference to this collection. In parallel collections, it is redefined to return a sequential implementation of this collection. In both cases, it has O(1) complexity.
a sequential view of the collection.
(array: ofUnit).seq
A version of this collection with all of the operations implemented sequentially (i.e., in a single-threaded manner).
A version of this collection with all of the operations implemented sequentially (i.e., in a single-threaded manner).
This method returns a reference to this collection. In parallel collections, it is redefined to return a sequential implementation of this collection. In both cases, it has O(1) complexity.
a sequential view of the collection.
(array: ofShort).seq
A version of this collection with all of the operations implemented sequentially (i.e., in a single-threaded manner).
A version of this collection with all of the operations implemented sequentially (i.e., in a single-threaded manner).
This method returns a reference to this collection. In parallel collections, it is redefined to return a sequential implementation of this collection. In both cases, it has O(1) complexity.
a sequential view of the collection.
(array: ofRef[T]).seq
A version of this collection with all of the operations implemented sequentially (i.e., in a single-threaded manner).
A version of this collection with all of the operations implemented sequentially (i.e., in a single-threaded manner).
This method returns a reference to this collection. In parallel collections, it is redefined to return a sequential implementation of this collection. In both cases, it has O(1) complexity.
a sequential view of the collection.
(array: ofLong).seq
A version of this collection with all of the operations implemented sequentially (i.e., in a single-threaded manner).
A version of this collection with all of the operations implemented sequentially (i.e., in a single-threaded manner).
This method returns a reference to this collection. In parallel collections, it is redefined to return a sequential implementation of this collection. In both cases, it has O(1) complexity.
a sequential view of the collection.
(array: ofInt).seq
A version of this collection with all of the operations implemented sequentially (i.e., in a single-threaded manner).
A version of this collection with all of the operations implemented sequentially (i.e., in a single-threaded manner).
This method returns a reference to this collection. In parallel collections, it is redefined to return a sequential implementation of this collection. In both cases, it has O(1) complexity.
a sequential view of the collection.
(array: ofFloat).seq
A version of this collection with all of the operations implemented sequentially (i.e., in a single-threaded manner).
A version of this collection with all of the operations implemented sequentially (i.e., in a single-threaded manner).
This method returns a reference to this collection. In parallel collections, it is redefined to return a sequential implementation of this collection. In both cases, it has O(1) complexity.
a sequential view of the collection.
(array: ofDouble).seq
A version of this collection with all of the operations implemented sequentially (i.e., in a single-threaded manner).
A version of this collection with all of the operations implemented sequentially (i.e., in a single-threaded manner).
This method returns a reference to this collection. In parallel collections, it is redefined to return a sequential implementation of this collection. In both cases, it has O(1) complexity.
a sequential view of the collection.
(array: ofChar).seq
A version of this collection with all of the operations implemented sequentially (i.e., in a single-threaded manner).
A version of this collection with all of the operations implemented sequentially (i.e., in a single-threaded manner).
This method returns a reference to this collection. In parallel collections, it is redefined to return a sequential implementation of this collection. In both cases, it has O(1) complexity.
a sequential view of the collection.
(array: ofByte).seq
A version of this collection with all of the operations implemented sequentially (i.e., in a single-threaded manner).
A version of this collection with all of the operations implemented sequentially (i.e., in a single-threaded manner).
This method returns a reference to this collection. In parallel collections, it is redefined to return a sequential implementation of this collection. In both cases, it has O(1) complexity.
a sequential view of the collection.
(array: ofBoolean).seq
A version of this collection with all of the operations implemented sequentially (i.e., in a single-threaded manner).
A version of this collection with all of the operations implemented sequentially (i.e., in a single-threaded manner).
This method returns a reference to this collection. In parallel collections, it is redefined to return a sequential implementation of this collection. In both cases, it has O(1) complexity.
a sequential view of the collection.
(array: ArrayOps[T]).seq
The size of this mutable indexed sequence, equivalent to length
.
The size of this mutable indexed sequence, equivalent to length
.
the number of elements in this mutable indexed sequence.
(array: ofUnit).size
The size of this mutable indexed sequence, equivalent to length
.
The size of this mutable indexed sequence, equivalent to length
.
the number of elements in this mutable indexed sequence.
(array: ofShort).size
The size of this mutable indexed sequence, equivalent to length
.
The size of this mutable indexed sequence, equivalent to length
.
the number of elements in this mutable indexed sequence.
(array: ofRef[T]).size
The size of this mutable indexed sequence, equivalent to length
.
The size of this mutable indexed sequence, equivalent to length
.
the number of elements in this mutable indexed sequence.
(array: ofLong).size
The size of this mutable indexed sequence, equivalent to length
.
The size of this mutable indexed sequence, equivalent to length
.
the number of elements in this mutable indexed sequence.
(array: ofInt).size
The size of this mutable indexed sequence, equivalent to length
.
The size of this mutable indexed sequence, equivalent to length
.
the number of elements in this mutable indexed sequence.
(array: ofFloat).size
The size of this mutable indexed sequence, equivalent to length
.
The size of this mutable indexed sequence, equivalent to length
.
the number of elements in this mutable indexed sequence.
(array: ofDouble).size
The size of this mutable indexed sequence, equivalent to length
.
The size of this mutable indexed sequence, equivalent to length
.
the number of elements in this mutable indexed sequence.
(array: ofChar).size
The size of this mutable indexed sequence, equivalent to length
.
The size of this mutable indexed sequence, equivalent to length
.
the number of elements in this mutable indexed sequence.
(array: ofByte).size
The size of this mutable indexed sequence, equivalent to length
.
The size of this mutable indexed sequence, equivalent to length
.
the number of elements in this mutable indexed sequence.
(array: ofBoolean).size
The size of this mutable indexed sequence, equivalent to length
.
The size of this mutable indexed sequence, equivalent to length
.
the number of elements in this mutable indexed sequence.
(array: ArrayOps[T]).size
Selects an interval of elements.
Selects an interval of elements. The returned collection is made up
of all elements x
which satisfy the invariant:
from <= indexOf(x) < until
a mutable indexed sequence containing the elements greater than or equal to
index from
extending up to (but not including) index until
of this mutable indexed sequence.
(array: ofUnit).slice(from, until)
Selects an interval of elements.
Selects an interval of elements. The returned collection is made up
of all elements x
which satisfy the invariant:
from <= indexOf(x) < until
a mutable indexed sequence containing the elements greater than or equal to
index from
extending up to (but not including) index until
of this mutable indexed sequence.
(array: ofShort).slice(from, until)
Selects an interval of elements.
Selects an interval of elements. The returned collection is made up
of all elements x
which satisfy the invariant:
from <= indexOf(x) < until
a mutable indexed sequence containing the elements greater than or equal to
index from
extending up to (but not including) index until
of this mutable indexed sequence.
(array: ofRef[T]).slice(from, until)
Selects an interval of elements.
Selects an interval of elements. The returned collection is made up
of all elements x
which satisfy the invariant:
from <= indexOf(x) < until
a mutable indexed sequence containing the elements greater than or equal to
index from
extending up to (but not including) index until
of this mutable indexed sequence.
(array: ofLong).slice(from, until)
Selects an interval of elements.
Selects an interval of elements. The returned collection is made up
of all elements x
which satisfy the invariant:
from <= indexOf(x) < until
a mutable indexed sequence containing the elements greater than or equal to
index from
extending up to (but not including) index until
of this mutable indexed sequence.
(array: ofInt).slice(from, until)
Selects an interval of elements.
Selects an interval of elements. The returned collection is made up
of all elements x
which satisfy the invariant:
from <= indexOf(x) < until
a mutable indexed sequence containing the elements greater than or equal to
index from
extending up to (but not including) index until
of this mutable indexed sequence.
(array: ofFloat).slice(from, until)
Selects an interval of elements.
Selects an interval of elements. The returned collection is made up
of all elements x
which satisfy the invariant:
from <= indexOf(x) < until
a mutable indexed sequence containing the elements greater than or equal to
index from
extending up to (but not including) index until
of this mutable indexed sequence.
(array: ofDouble).slice(from, until)
Selects an interval of elements.
Selects an interval of elements. The returned collection is made up
of all elements x
which satisfy the invariant:
from <= indexOf(x) < until
a mutable indexed sequence containing the elements greater than or equal to
index from
extending up to (but not including) index until
of this mutable indexed sequence.
(array: ofChar).slice(from, until)
Selects an interval of elements.
Selects an interval of elements. The returned collection is made up
of all elements x
which satisfy the invariant:
from <= indexOf(x) < until
a mutable indexed sequence containing the elements greater than or equal to
index from
extending up to (but not including) index until
of this mutable indexed sequence.
(array: ofByte).slice(from, until)
Selects an interval of elements.
Selects an interval of elements. The returned collection is made up
of all elements x
which satisfy the invariant:
from <= indexOf(x) < until
a mutable indexed sequence containing the elements greater than or equal to
index from
extending up to (but not including) index until
of this mutable indexed sequence.
(array: ofBoolean).slice(from, until)
Selects an interval of elements.
Selects an interval of elements. The returned collection is made up
of all elements x
which satisfy the invariant:
from <= indexOf(x) < until
a mutable indexed sequence containing the elements greater than or equal to
index from
extending up to (but not including) index until
of this mutable indexed sequence.
(array: ArrayOps[T]).slice(from, until)
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.)
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.)
the number of elements per group
the distance between the first elements of successive groups
An iterator producing mutable indexed sequences of size size
, except the
last and the only element will be truncated if there are
fewer elements than size.
(array: ofUnit).sliding(size, step)
scala.collection.Iterator, method sliding
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.) "Sliding window" step is 1 by default.
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.) "Sliding window" step is 1 by default.
the number of elements per group
An iterator producing mutable indexed sequences of size size
, except the
last and the only element will be truncated if there are
fewer elements than size.
(array: ofUnit).sliding(size)
scala.collection.Iterator, method sliding
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.)
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.)
the number of elements per group
the distance between the first elements of successive groups
An iterator producing mutable indexed sequences of size size
, except the
last and the only element will be truncated if there are
fewer elements than size.
(array: ofShort).sliding(size, step)
scala.collection.Iterator, method sliding
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.) "Sliding window" step is 1 by default.
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.) "Sliding window" step is 1 by default.
the number of elements per group
An iterator producing mutable indexed sequences of size size
, except the
last and the only element will be truncated if there are
fewer elements than size.
(array: ofShort).sliding(size)
scala.collection.Iterator, method sliding
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.)
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.)
the number of elements per group
the distance between the first elements of successive groups
An iterator producing mutable indexed sequences of size size
, except the
last and the only element will be truncated if there are
fewer elements than size.
(array: ofRef[T]).sliding(size, step)
scala.collection.Iterator, method sliding
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.) "Sliding window" step is 1 by default.
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.) "Sliding window" step is 1 by default.
the number of elements per group
An iterator producing mutable indexed sequences of size size
, except the
last and the only element will be truncated if there are
fewer elements than size.
(array: ofRef[T]).sliding(size)
scala.collection.Iterator, method sliding
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.)
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.)
the number of elements per group
the distance between the first elements of successive groups
An iterator producing mutable indexed sequences of size size
, except the
last and the only element will be truncated if there are
fewer elements than size.
(array: ofLong).sliding(size, step)
scala.collection.Iterator, method sliding
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.) "Sliding window" step is 1 by default.
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.) "Sliding window" step is 1 by default.
the number of elements per group
An iterator producing mutable indexed sequences of size size
, except the
last and the only element will be truncated if there are
fewer elements than size.
(array: ofLong).sliding(size)
scala.collection.Iterator, method sliding
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.)
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.)
the number of elements per group
the distance between the first elements of successive groups
An iterator producing mutable indexed sequences of size size
, except the
last and the only element will be truncated if there are
fewer elements than size.
(array: ofInt).sliding(size, step)
scala.collection.Iterator, method sliding
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.) "Sliding window" step is 1 by default.
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.) "Sliding window" step is 1 by default.
the number of elements per group
An iterator producing mutable indexed sequences of size size
, except the
last and the only element will be truncated if there are
fewer elements than size.
(array: ofInt).sliding(size)
scala.collection.Iterator, method sliding
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.)
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.)
the number of elements per group
the distance between the first elements of successive groups
An iterator producing mutable indexed sequences of size size
, except the
last and the only element will be truncated if there are
fewer elements than size.
(array: ofFloat).sliding(size, step)
scala.collection.Iterator, method sliding
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.) "Sliding window" step is 1 by default.
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.) "Sliding window" step is 1 by default.
the number of elements per group
An iterator producing mutable indexed sequences of size size
, except the
last and the only element will be truncated if there are
fewer elements than size.
(array: ofFloat).sliding(size)
scala.collection.Iterator, method sliding
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.)
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.)
the number of elements per group
the distance between the first elements of successive groups
An iterator producing mutable indexed sequences of size size
, except the
last and the only element will be truncated if there are
fewer elements than size.
(array: ofDouble).sliding(size, step)
scala.collection.Iterator, method sliding
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.) "Sliding window" step is 1 by default.
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.) "Sliding window" step is 1 by default.
the number of elements per group
An iterator producing mutable indexed sequences of size size
, except the
last and the only element will be truncated if there are
fewer elements than size.
(array: ofDouble).sliding(size)
scala.collection.Iterator, method sliding
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.)
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.)
the number of elements per group
the distance between the first elements of successive groups
An iterator producing mutable indexed sequences of size size
, except the
last and the only element will be truncated if there are
fewer elements than size.
(array: ofChar).sliding(size, step)
scala.collection.Iterator, method sliding
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.) "Sliding window" step is 1 by default.
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.) "Sliding window" step is 1 by default.
the number of elements per group
An iterator producing mutable indexed sequences of size size
, except the
last and the only element will be truncated if there are
fewer elements than size.
(array: ofChar).sliding(size)
scala.collection.Iterator, method sliding
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.)
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.)
the number of elements per group
the distance between the first elements of successive groups
An iterator producing mutable indexed sequences of size size
, except the
last and the only element will be truncated if there are
fewer elements than size.
(array: ofByte).sliding(size, step)
scala.collection.Iterator, method sliding
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.) "Sliding window" step is 1 by default.
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.) "Sliding window" step is 1 by default.
the number of elements per group
An iterator producing mutable indexed sequences of size size
, except the
last and the only element will be truncated if there are
fewer elements than size.
(array: ofByte).sliding(size)
scala.collection.Iterator, method sliding
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.)
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.)
the number of elements per group
the distance between the first elements of successive groups
An iterator producing mutable indexed sequences of size size
, except the
last and the only element will be truncated if there are
fewer elements than size.
(array: ofBoolean).sliding(size, step)
scala.collection.Iterator, method sliding
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.) "Sliding window" step is 1 by default.
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.) "Sliding window" step is 1 by default.
the number of elements per group
An iterator producing mutable indexed sequences of size size
, except the
last and the only element will be truncated if there are
fewer elements than size.
(array: ofBoolean).sliding(size)
scala.collection.Iterator, method sliding
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.)
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.)
the number of elements per group
the distance between the first elements of successive groups
An iterator producing mutable indexed sequences of size size
, except the
last and the only element will be truncated if there are
fewer elements than size.
(array: ArrayOps[T]).sliding(size, step)
scala.collection.Iterator, method sliding
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.) "Sliding window" step is 1 by default.
Groups elements in fixed size blocks by passing a "sliding window" over them (as opposed to partitioning them, as is done in grouped.) "Sliding window" step is 1 by default.
the number of elements per group
An iterator producing mutable indexed sequences of size size
, except the
last and the only element will be truncated if there are
fewer elements than size.
(array: ArrayOps[T]).sliding(size)
scala.collection.Iterator, method sliding
Sorts this Array
according to the Ordering which results from transforming
an implicitly given Ordering with a transformation function.
Sorts this Array
according to the Ordering which results from transforming
an implicitly given Ordering with a transformation function.
the target type of the transformation f
, and the type where
the ordering ord
is defined.
the transformation function mapping elements
to some other domain B
.
the ordering assumed on domain B
.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the ordering where x < y
if
ord.lt(f(x), f(y))
.
(array: ofRef[T]).sortBy(f)(ord)
val words = "The quick brown fox jumped over the lazy dog".split(' ') // this works because scala.Ordering will implicitly provide an Ordering[Tuple2[Int, Char]] words.sortBy(x => (x.length, x.head)) res0: Array[String] = Array(The, dog, fox, the, lazy, over, brown, quick, jumped)
Sorts this Array
according to the Ordering which results from transforming
an implicitly given Ordering with a transformation function.
Sorts this Array
according to the Ordering which results from transforming
an implicitly given Ordering with a transformation function.
the target type of the transformation f
, and the type where
the ordering ord
is defined.
the transformation function mapping elements
to some other domain B
.
the ordering assumed on domain B
.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the ordering where x < y
if
ord.lt(f(x), f(y))
.
(array: ArrayOps[T]).sortBy(f)(ord)
val words = "The quick brown fox jumped over the lazy dog".split(' ') // this works because scala.Ordering will implicitly provide an Ordering[Tuple2[Int, Char]] words.sortBy(x => (x.length, x.head)) res0: Array[String] = Array(The, dog, fox, the, lazy, over, brown, quick, jumped)
Sorts this mutable indexed sequence according to a comparison function.
Sorts this mutable indexed sequence according to a comparison function.
The sort is stable. That is, elements that are equal (as determined by
lt
) appear in the same order in the sorted sequence as in the original.
the comparison function which tests whether its first argument precedes its second argument in the desired ordering.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the comparison function lt
.
(array: ofRef[T]).sortWith(lt)
List("Steve", "Tom", "John", "Bob").sortWith(_.compareTo(_) < 0) = List("Bob", "John", "Steve", "Tom")
Sorts this mutable indexed sequence according to a comparison function.
Sorts this mutable indexed sequence according to a comparison function.
The sort is stable. That is, elements that are equal (as determined by
lt
) appear in the same order in the sorted sequence as in the original.
the comparison function which tests whether its first argument precedes its second argument in the desired ordering.
a mutable indexed sequence consisting of the elements of this mutable indexed sequence
sorted according to the comparison function lt
.
(array: ArrayOps[T]).sortWith(lt)
List("Steve", "Tom", "John", "Bob").sortWith(_.compareTo(_) < 0) = List("Bob", "John", "Steve", "Tom")
Splits this mutable indexed sequence into a prefix/suffix pair according to a predicate.
Splits this mutable indexed sequence into a prefix/suffix pair according to a predicate.
Note: c span p
is equivalent to (but possibly more efficient than)
(c takeWhile p, c dropWhile p)
, provided the evaluation of the
predicate p
does not cause any side-effects.
a pair consisting of the longest prefix of this mutable indexed sequence whose
elements all satisfy p
, and the rest of this mutable indexed sequence.
(array: ofRef[T]).span(p)
Splits this mutable indexed sequence into a prefix/suffix pair according to a predicate.
Splits this mutable indexed sequence into a prefix/suffix pair according to a predicate.
Note: c span p
is equivalent to (but possibly more efficient than)
(c takeWhile p, c dropWhile p)
, provided the evaluation of the
predicate p
does not cause any side-effects.
a pair consisting of the longest prefix of this mutable indexed sequence whose
elements all satisfy p
, and the rest of this mutable indexed sequence.
(array: ArrayOps[T]).span(p)
Splits this mutable indexed sequence into two at a given position.
Splits this mutable indexed sequence into two at a given position.
Note: c splitAt n
is equivalent to (but possibly more efficient than)
(c take n, c drop n)
.
the position at which to split.
a pair of mutable indexed sequences consisting of the first n
elements of this mutable indexed sequence, and the other elements.
(array: ofUnit).splitAt(n)
Splits this mutable indexed sequence into two at a given position.
Splits this mutable indexed sequence into two at a given position.
Note: c splitAt n
is equivalent to (but possibly more efficient than)
(c take n, c drop n)
.
the position at which to split.
a pair of mutable indexed sequences consisting of the first n
elements of this mutable indexed sequence, and the other elements.
(array: ofShort).splitAt(n)
Splits this mutable indexed sequence into two at a given position.
Splits this mutable indexed sequence into two at a given position.
Note: c splitAt n
is equivalent to (but possibly more efficient than)
(c take n, c drop n)
.
the position at which to split.
a pair of mutable indexed sequences consisting of the first n
elements of this mutable indexed sequence, and the other elements.
(array: ofRef[T]).splitAt(n)
Splits this mutable indexed sequence into two at a given position.
Splits this mutable indexed sequence into two at a given position.
Note: c splitAt n
is equivalent to (but possibly more efficient than)
(c take n, c drop n)
.
the position at which to split.
a pair of mutable indexed sequences consisting of the first n
elements of this mutable indexed sequence, and the other elements.
(array: ofLong).splitAt(n)
Splits this mutable indexed sequence into two at a given position.
Splits this mutable indexed sequence into two at a given position.
Note: c splitAt n
is equivalent to (but possibly more efficient than)
(c take n, c drop n)
.
the position at which to split.
a pair of mutable indexed sequences consisting of the first n
elements of this mutable indexed sequence, and the other elements.
(array: ofInt).splitAt(n)
Splits this mutable indexed sequence into two at a given position.
Splits this mutable indexed sequence into two at a given position.
Note: c splitAt n
is equivalent to (but possibly more efficient than)
(c take n, c drop n)
.
the position at which to split.
a pair of mutable indexed sequences consisting of the first n
elements of this mutable indexed sequence, and the other elements.
(array: ofFloat).splitAt(n)
Splits this mutable indexed sequence into two at a given position.
Splits this mutable indexed sequence into two at a given position.
Note: c splitAt n
is equivalent to (but possibly more efficient than)
(c take n, c drop n)
.
the position at which to split.
a pair of mutable indexed sequences consisting of the first n
elements of this mutable indexed sequence, and the other elements.
(array: ofDouble).splitAt(n)
Splits this mutable indexed sequence into two at a given position.
Splits this mutable indexed sequence into two at a given position.
Note: c splitAt n
is equivalent to (but possibly more efficient than)
(c take n, c drop n)
.
the position at which to split.
a pair of mutable indexed sequences consisting of the first n
elements of this mutable indexed sequence, and the other elements.
(array: ofChar).splitAt(n)
Splits this mutable indexed sequence into two at a given position.
Splits this mutable indexed sequence into two at a given position.
Note: c splitAt n
is equivalent to (but possibly more efficient than)
(c take n, c drop n)
.
the position at which to split.
a pair of mutable indexed sequences consisting of the first n
elements of this mutable indexed sequence, and the other elements.
(array: ofByte).splitAt(n)
Splits this mutable indexed sequence into two at a given position.
Splits this mutable indexed sequence into two at a given position.
Note: c splitAt n
is equivalent to (but possibly more efficient than)
(c take n, c drop n)
.
the position at which to split.
a pair of mutable indexed sequences consisting of the first n
elements of this mutable indexed sequence, and the other elements.
(array: ofBoolean).splitAt(n)
Splits this mutable indexed sequence into two at a given position.
Splits this mutable indexed sequence into two at a given position.
Note: c splitAt n
is equivalent to (but possibly more efficient than)
(c take n, c drop n)
.
the position at which to split.
a pair of mutable indexed sequences consisting of the first n
elements of this mutable indexed sequence, and the other elements.
(array: ArrayOps[T]).splitAt(n)
Tests whether this mutable indexed sequence contains the given sequence at a given index.
Tests whether this mutable indexed sequence contains the given sequence at a given index.
Note: If the both the receiver object this
and the argument
that
are infinite sequences this method may not terminate.
the sequence to test
the index where the sequence is searched.
true
if the sequence that
is contained in this mutable indexed sequence at
index offset
, otherwise false
.
(array: ofUnit).startsWith(that, offset)
Tests whether this mutable indexed sequence starts with the given sequence.
Tests whether this mutable indexed sequence starts with the given sequence.
the sequence to test
true
if this collection has that
as a prefix, false
otherwise.
(array: ofUnit).startsWith(that)
Tests whether this mutable indexed sequence contains the given sequence at a given index.
Tests whether this mutable indexed sequence contains the given sequence at a given index.
Note: If the both the receiver object this
and the argument
that
are infinite sequences this method may not terminate.
the sequence to test
the index where the sequence is searched.
true
if the sequence that
is contained in this mutable indexed sequence at
index offset
, otherwise false
.
(array: ofShort).startsWith(that, offset)
Tests whether this mutable indexed sequence starts with the given sequence.
Tests whether this mutable indexed sequence starts with the given sequence.
the sequence to test
true
if this collection has that
as a prefix, false
otherwise.
(array: ofShort).startsWith(that)
Tests whether this mutable indexed sequence contains the given sequence at a given index.
Tests whether this mutable indexed sequence contains the given sequence at a given index.
Note: If the both the receiver object this
and the argument
that
are infinite sequences this method may not terminate.
the sequence to test
the index where the sequence is searched.
true
if the sequence that
is contained in this mutable indexed sequence at
index offset
, otherwise false
.
(array: ofRef[T]).startsWith(that, offset)
Tests whether this mutable indexed sequence starts with the given sequence.
Tests whether this mutable indexed sequence starts with the given sequence.
the sequence to test
true
if this collection has that
as a prefix, false
otherwise.
(array: ofRef[T]).startsWith(that)
Tests whether this mutable indexed sequence contains the given sequence at a given index.
Tests whether this mutable indexed sequence contains the given sequence at a given index.
Note: If the both the receiver object this
and the argument
that
are infinite sequences this method may not terminate.
the sequence to test
the index where the sequence is searched.
true
if the sequence that
is contained in this mutable indexed sequence at
index offset
, otherwise false
.
(array: ofLong).startsWith(that, offset)
Tests whether this mutable indexed sequence starts with the given sequence.
Tests whether this mutable indexed sequence starts with the given sequence.
the sequence to test
true
if this collection has that
as a prefix, false
otherwise.
(array: ofLong).startsWith(that)
Tests whether this mutable indexed sequence contains the given sequence at a given index.
Tests whether this mutable indexed sequence contains the given sequence at a given index.
Note: If the both the receiver object this
and the argument
that
are infinite sequences this method may not terminate.
the sequence to test
the index where the sequence is searched.
true
if the sequence that
is contained in this mutable indexed sequence at
index offset
, otherwise false
.
(array: ofInt).startsWith(that, offset)
Tests whether this mutable indexed sequence starts with the given sequence.
Tests whether this mutable indexed sequence starts with the given sequence.
the sequence to test
true
if this collection has that
as a prefix, false
otherwise.
(array: ofInt).startsWith(that)
Tests whether this mutable indexed sequence contains the given sequence at a given index.
Tests whether this mutable indexed sequence contains the given sequence at a given index.
Note: If the both the receiver object this
and the argument
that
are infinite sequences this method may not terminate.
the sequence to test
the index where the sequence is searched.
true
if the sequence that
is contained in this mutable indexed sequence at
index offset
, otherwise false
.
(array: ofFloat).startsWith(that, offset)
Tests whether this mutable indexed sequence starts with the given sequence.
Tests whether this mutable indexed sequence starts with the given sequence.
the sequence to test
true
if this collection has that
as a prefix, false
otherwise.
(array: ofFloat).startsWith(that)
Tests whether this mutable indexed sequence contains the given sequence at a given index.
Tests whether this mutable indexed sequence contains the given sequence at a given index.
Note: If the both the receiver object this
and the argument
that
are infinite sequences this method may not terminate.
the sequence to test
the index where the sequence is searched.
true
if the sequence that
is contained in this mutable indexed sequence at
index offset
, otherwise false
.
(array: ofDouble).startsWith(that, offset)
Tests whether this mutable indexed sequence starts with the given sequence.
Tests whether this mutable indexed sequence starts with the given sequence.
the sequence to test
true
if this collection has that
as a prefix, false
otherwise.
(array: ofDouble).startsWith(that)
Tests whether this mutable indexed sequence contains the given sequence at a given index.
Tests whether this mutable indexed sequence contains the given sequence at a given index.
Note: If the both the receiver object this
and the argument
that
are infinite sequences this method may not terminate.
the sequence to test
the index where the sequence is searched.
true
if the sequence that
is contained in this mutable indexed sequence at
index offset
, otherwise false
.
(array: ofChar).startsWith(that, offset)
Tests whether this mutable indexed sequence starts with the given sequence.
Tests whether this mutable indexed sequence starts with the given sequence.
the sequence to test
true
if this collection has that
as a prefix, false
otherwise.
(array: ofChar).startsWith(that)
Tests whether this mutable indexed sequence contains the given sequence at a given index.
Tests whether this mutable indexed sequence contains the given sequence at a given index.
Note: If the both the receiver object this
and the argument
that
are infinite sequences this method may not terminate.
the sequence to test
the index where the sequence is searched.
true
if the sequence that
is contained in this mutable indexed sequence at
index offset
, otherwise false
.
(array: ofByte).startsWith(that, offset)
Tests whether this mutable indexed sequence starts with the given sequence.
Tests whether this mutable indexed sequence starts with the given sequence.
the sequence to test
true
if this collection has that
as a prefix, false
otherwise.
(array: ofByte).startsWith(that)
Tests whether this mutable indexed sequence contains the given sequence at a given index.
Tests whether this mutable indexed sequence contains the given sequence at a given index.
Note: If the both the receiver object this
and the argument
that
are infinite sequences this method may not terminate.
the sequence to test
the index where the sequence is searched.
true
if the sequence that
is contained in this mutable indexed sequence at
index offset
, otherwise false
.
(array: ofBoolean).startsWith(that, offset)
Tests whether this mutable indexed sequence starts with the given sequence.
Tests whether this mutable indexed sequence starts with the given sequence.
the sequence to test
true
if this collection has that
as a prefix, false
otherwise.
(array: ofBoolean).startsWith(that)
Tests whether this mutable indexed sequence contains the given sequence at a given index.
Tests whether this mutable indexed sequence contains the given sequence at a given index.
Note: If the both the receiver object this
and the argument
that
are infinite sequences this method may not terminate.
the sequence to test
the index where the sequence is searched.
true
if the sequence that
is contained in this mutable indexed sequence at
index offset
, otherwise false
.
(array: ArrayOps[T]).startsWith(that, offset)
Tests whether this mutable indexed sequence starts with the given sequence.
Tests whether this mutable indexed sequence starts with the given sequence.
the sequence to test
true
if this collection has that
as a prefix, false
otherwise.
(array: ArrayOps[T]).startsWith(that)
Defines the prefix of this object's toString
representation.
Defines the prefix of this object's toString
representation.
a string representation which starts the result of toString
applied to this mutable indexed sequence. By default the string prefix is the
simple name of the collection class mutable indexed sequence.
(array: ofUnit).stringPrefix
Defines the prefix of this object's toString
representation.
Defines the prefix of this object's toString
representation.
a string representation which starts the result of toString
applied to this mutable indexed sequence. By default the string prefix is the
simple name of the collection class mutable indexed sequence.
(array: ofShort).stringPrefix
Defines the prefix of this object's toString
representation.
Defines the prefix of this object's toString
representation.
a string representation which starts the result of toString
applied to this mutable indexed sequence. By default the string prefix is the
simple name of the collection class mutable indexed sequence.
(array: ofRef[T]).stringPrefix
Defines the prefix of this object's toString
representation.
Defines the prefix of this object's toString
representation.
a string representation which starts the result of toString
applied to this mutable indexed sequence. By default the string prefix is the
simple name of the collection class mutable indexed sequence.
(array: ofLong).stringPrefix
Defines the prefix of this object's toString
representation.
Defines the prefix of this object's toString
representation.
a string representation which starts the result of toString
applied to this mutable indexed sequence. By default the string prefix is the
simple name of the collection class mutable indexed sequence.
(array: ofInt).stringPrefix
Defines the prefix of this object's toString
representation.
Defines the prefix of this object's toString
representation.
a string representation which starts the result of toString
applied to this mutable indexed sequence. By default the string prefix is the
simple name of the collection class mutable indexed sequence.
(array: ofFloat).stringPrefix
Defines the prefix of this object's toString
representation.
Defines the prefix of this object's toString
representation.
a string representation which starts the result of toString
applied to this mutable indexed sequence. By default the string prefix is the
simple name of the collection class mutable indexed sequence.
(array: ofDouble).stringPrefix
Defines the prefix of this object's toString
representation.
Defines the prefix of this object's toString
representation.
a string representation which starts the result of toString
applied to this mutable indexed sequence. By default the string prefix is the
simple name of the collection class mutable indexed sequence.
(array: ofChar).stringPrefix
Defines the prefix of this object's toString
representation.
Defines the prefix of this object's toString
representation.
a string representation which starts the result of toString
applied to this mutable indexed sequence. By default the string prefix is the
simple name of the collection class mutable indexed sequence.
(array: ofByte).stringPrefix
Defines the prefix of this object's toString
representation.
Defines the prefix of this object's toString
representation.
a string representation which starts the result of toString
applied to this mutable indexed sequence. By default the string prefix is the
simple name of the collection class mutable indexed sequence.
(array: ofBoolean).stringPrefix
Defines the prefix of this object's toString
representation.
Defines the prefix of this object's toString
representation.
a string representation which starts the result of toString
applied to this mutable indexed sequence. By default the string prefix is the
simple name of the collection class mutable indexed sequence.
(array: ArrayOps[T]).stringPrefix
[use case] Sums up the elements of this collection.
Sums up the elements of this collection.
the sum of all elements in this array of numbers of type Int
.
Instead of Int
, any other type T
with an implicit Numeric[T]
implementation
can be used as element type of the array and as result type of sum
.
Examples of such types are: Long
, Float
, Double
, BigInt
.
(array: ofUnit).sum
[use case] Sums up the elements of this collection.
Sums up the elements of this collection.
the sum of all elements in this array of numbers of type Int
.
Instead of Int
, any other type T
with an implicit Numeric[T]
implementation
can be used as element type of the array and as result type of sum
.
Examples of such types are: Long
, Float
, Double
, BigInt
.
(array: ofShort).sum
[use case] Sums up the elements of this collection.
Sums up the elements of this collection.
the sum of all elements in this array of numbers of type Int
.
Instead of Int
, any other type T
with an implicit Numeric[T]
implementation
can be used as element type of the array and as result type of sum
.
Examples of such types are: Long
, Float
, Double
, BigInt
.
(array: ofRef[T]).sum
[use case] Sums up the elements of this collection.
Sums up the elements of this collection.
the sum of all elements in this array of numbers of type Int
.
Instead of Int
, any other type T
with an implicit Numeric[T]
implementation
can be used as element type of the array and as result type of sum
.
Examples of such types are: Long
, Float
, Double
, BigInt
.
(array: ofLong).sum
[use case] Sums up the elements of this collection.
Sums up the elements of this collection.
the sum of all elements in this array of numbers of type Int
.
Instead of Int
, any other type T
with an implicit Numeric[T]
implementation
can be used as element type of the array and as result type of sum
.
Examples of such types are: Long
, Float
, Double
, BigInt
.
(array: ofInt).sum
[use case] Sums up the elements of this collection.
Sums up the elements of this collection.
the sum of all elements in this array of numbers of type Int
.
Instead of Int
, any other type T
with an implicit Numeric[T]
implementation
can be used as element type of the array and as result type of sum
.
Examples of such types are: Long
, Float
, Double
, BigInt
.
(array: ofFloat).sum
[use case] Sums up the elements of this collection.
Sums up the elements of this collection.
the sum of all elements in this array of numbers of type Int
.
Instead of Int
, any other type T
with an implicit Numeric[T]
implementation
can be used as element type of the array and as result type of sum
.
Examples of such types are: Long
, Float
, Double
, BigInt
.
(array: ofDouble).sum
[use case] Sums up the elements of this collection.
Sums up the elements of this collection.
the sum of all elements in this array of numbers of type Int
.
Instead of Int
, any other type T
with an implicit Numeric[T]
implementation
can be used as element type of the array and as result type of sum
.
Examples of such types are: Long
, Float
, Double
, BigInt
.
(array: ofChar).sum
[use case] Sums up the elements of this collection.
Sums up the elements of this collection.
the sum of all elements in this array of numbers of type Int
.
Instead of Int
, any other type T
with an implicit Numeric[T]
implementation
can be used as element type of the array and as result type of sum
.
Examples of such types are: Long
, Float
, Double
, BigInt
.
(array: ofByte).sum
[use case] Sums up the elements of this collection.
Sums up the elements of this collection.
the sum of all elements in this array of numbers of type Int
.
Instead of Int
, any other type T
with an implicit Numeric[T]
implementation
can be used as element type of the array and as result type of sum
.
Examples of such types are: Long
, Float
, Double
, BigInt
.
(array: ofBoolean).sum
[use case] Sums up the elements of this collection.
Sums up the elements of this collection.
the sum of all elements in this array of numbers of type Int
.
Instead of Int
, any other type T
with an implicit Numeric[T]
implementation
can be used as element type of the array and as result type of sum
.
Examples of such types are: Long
, Float
, Double
, BigInt
.
(array: ArrayOps[T]).sum
Selects all elements except the first.
Selects all elements except the first.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the first one.
(array: ofUnit).tail
`UnsupportedOperationException`
if the mutable indexed sequence is empty.
Selects all elements except the first.
Selects all elements except the first.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the first one.
(array: ofShort).tail
`UnsupportedOperationException`
if the mutable indexed sequence is empty.
Selects all elements except the first.
Selects all elements except the first.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the first one.
(array: ofRef[T]).tail
`UnsupportedOperationException`
if the mutable indexed sequence is empty.
Selects all elements except the first.
Selects all elements except the first.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the first one.
(array: ofLong).tail
`UnsupportedOperationException`
if the mutable indexed sequence is empty.
Selects all elements except the first.
Selects all elements except the first.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the first one.
(array: ofInt).tail
`UnsupportedOperationException`
if the mutable indexed sequence is empty.
Selects all elements except the first.
Selects all elements except the first.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the first one.
(array: ofFloat).tail
`UnsupportedOperationException`
if the mutable indexed sequence is empty.
Selects all elements except the first.
Selects all elements except the first.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the first one.
(array: ofDouble).tail
`UnsupportedOperationException`
if the mutable indexed sequence is empty.
Selects all elements except the first.
Selects all elements except the first.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the first one.
(array: ofChar).tail
`UnsupportedOperationException`
if the mutable indexed sequence is empty.
Selects all elements except the first.
Selects all elements except the first.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the first one.
(array: ofByte).tail
`UnsupportedOperationException`
if the mutable indexed sequence is empty.
Selects all elements except the first.
Selects all elements except the first.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the first one.
(array: ofBoolean).tail
`UnsupportedOperationException`
if the mutable indexed sequence is empty.
Selects all elements except the first.
Selects all elements except the first.
a mutable indexed sequence consisting of all elements of this mutable indexed sequence except the first one.
(array: ArrayOps[T]).tail
`UnsupportedOperationException`
if the mutable indexed sequence is empty.
Iterates over the tails of this mutable indexed sequence.
Iterates over the tails of this mutable indexed sequence. The first value will be this
mutable indexed sequence and the final one will be an empty mutable indexed sequence, with the intervening
values the results of successive applications of tail
.
an iterator over all the tails of this mutable indexed sequence
(array: ofUnit).tails
List(1,2,3).tails = Iterator(List(1,2,3), List(2,3), List(3), Nil)
Iterates over the tails of this mutable indexed sequence.
Iterates over the tails of this mutable indexed sequence. The first value will be this
mutable indexed sequence and the final one will be an empty mutable indexed sequence, with the intervening
values the results of successive applications of tail
.
an iterator over all the tails of this mutable indexed sequence
(array: ofShort).tails
List(1,2,3).tails = Iterator(List(1,2,3), List(2,3), List(3), Nil)
Iterates over the tails of this mutable indexed sequence.
Iterates over the tails of this mutable indexed sequence. The first value will be this
mutable indexed sequence and the final one will be an empty mutable indexed sequence, with the intervening
values the results of successive applications of tail
.
an iterator over all the tails of this mutable indexed sequence
(array: ofRef[T]).tails
List(1,2,3).tails = Iterator(List(1,2,3), List(2,3), List(3), Nil)
Iterates over the tails of this mutable indexed sequence.
Iterates over the tails of this mutable indexed sequence. The first value will be this
mutable indexed sequence and the final one will be an empty mutable indexed sequence, with the intervening
values the results of successive applications of tail
.
an iterator over all the tails of this mutable indexed sequence
(array: ofLong).tails
List(1,2,3).tails = Iterator(List(1,2,3), List(2,3), List(3), Nil)
Iterates over the tails of this mutable indexed sequence.
Iterates over the tails of this mutable indexed sequence. The first value will be this
mutable indexed sequence and the final one will be an empty mutable indexed sequence, with the intervening
values the results of successive applications of tail
.
an iterator over all the tails of this mutable indexed sequence
(array: ofInt).tails
List(1,2,3).tails = Iterator(List(1,2,3), List(2,3), List(3), Nil)
Iterates over the tails of this mutable indexed sequence.
Iterates over the tails of this mutable indexed sequence. The first value will be this
mutable indexed sequence and the final one will be an empty mutable indexed sequence, with the intervening
values the results of successive applications of tail
.
an iterator over all the tails of this mutable indexed sequence
(array: ofFloat).tails
List(1,2,3).tails = Iterator(List(1,2,3), List(2,3), List(3), Nil)
Iterates over the tails of this mutable indexed sequence.
Iterates over the tails of this mutable indexed sequence. The first value will be this
mutable indexed sequence and the final one will be an empty mutable indexed sequence, with the intervening
values the results of successive applications of tail
.
an iterator over all the tails of this mutable indexed sequence
(array: ofDouble).tails
List(1,2,3).tails = Iterator(List(1,2,3), List(2,3), List(3), Nil)
Iterates over the tails of this mutable indexed sequence.
Iterates over the tails of this mutable indexed sequence. The first value will be this
mutable indexed sequence and the final one will be an empty mutable indexed sequence, with the intervening
values the results of successive applications of tail
.
an iterator over all the tails of this mutable indexed sequence
(array: ofChar).tails
List(1,2,3).tails = Iterator(List(1,2,3), List(2,3), List(3), Nil)
Iterates over the tails of this mutable indexed sequence.
Iterates over the tails of this mutable indexed sequence. The first value will be this
mutable indexed sequence and the final one will be an empty mutable indexed sequence, with the intervening
values the results of successive applications of tail
.
an iterator over all the tails of this mutable indexed sequence
(array: ofByte).tails
List(1,2,3).tails = Iterator(List(1,2,3), List(2,3), List(3), Nil)
Iterates over the tails of this mutable indexed sequence.
Iterates over the tails of this mutable indexed sequence. The first value will be this
mutable indexed sequence and the final one will be an empty mutable indexed sequence, with the intervening
values the results of successive applications of tail
.
an iterator over all the tails of this mutable indexed sequence
(array: ofBoolean).tails
List(1,2,3).tails = Iterator(List(1,2,3), List(2,3), List(3), Nil)
Iterates over the tails of this mutable indexed sequence.
Iterates over the tails of this mutable indexed sequence. The first value will be this
mutable indexed sequence and the final one will be an empty mutable indexed sequence, with the intervening
values the results of successive applications of tail
.
an iterator over all the tails of this mutable indexed sequence
(array: ArrayOps[T]).tails
List(1,2,3).tails = Iterator(List(1,2,3), List(2,3), List(3), Nil)
Selects first n elements.
Selects first n elements.
the number of elements to take from this mutable indexed sequence.
a mutable indexed sequence consisting only of the first n
elements of this mutable indexed sequence,
or else the whole mutable indexed sequence, if it has less than n
elements.
(array: ofUnit).take(n)
Selects first n elements.
Selects first n elements.
the number of elements to take from this mutable indexed sequence.
a mutable indexed sequence consisting only of the first n
elements of this mutable indexed sequence,
or else the whole mutable indexed sequence, if it has less than n
elements.
(array: ofShort).take(n)
Selects first n elements.
Selects first n elements.
the number of elements to take from this mutable indexed sequence.
a mutable indexed sequence consisting only of the first n
elements of this mutable indexed sequence,
or else the whole mutable indexed sequence, if it has less than n
elements.
(array: ofRef[T]).take(n)
Selects first n elements.
Selects first n elements.
the number of elements to take from this mutable indexed sequence.
a mutable indexed sequence consisting only of the first n
elements of this mutable indexed sequence,
or else the whole mutable indexed sequence, if it has less than n
elements.
(array: ofLong).take(n)
Selects first n elements.
Selects first n elements.
the number of elements to take from this mutable indexed sequence.
a mutable indexed sequence consisting only of the first n
elements of this mutable indexed sequence,
or else the whole mutable indexed sequence, if it has less than n
elements.
(array: ofInt).take(n)
Selects first n elements.
Selects first n elements.
the number of elements to take from this mutable indexed sequence.
a mutable indexed sequence consisting only of the first n
elements of this mutable indexed sequence,
or else the whole mutable indexed sequence, if it has less than n
elements.
(array: ofFloat).take(n)
Selects first n elements.
Selects first n elements.
the number of elements to take from this mutable indexed sequence.
a mutable indexed sequence consisting only of the first n
elements of this mutable indexed sequence,
or else the whole mutable indexed sequence, if it has less than n
elements.
(array: ofDouble).take(n)
Selects first n elements.
Selects first n elements.
the number of elements to take from this mutable indexed sequence.
a mutable indexed sequence consisting only of the first n
elements of this mutable indexed sequence,
or else the whole mutable indexed sequence, if it has less than n
elements.
(array: ofChar).take(n)
Selects first n elements.
Selects first n elements.
the number of elements to take from this mutable indexed sequence.
a mutable indexed sequence consisting only of the first n
elements of this mutable indexed sequence,
or else the whole mutable indexed sequence, if it has less than n
elements.
(array: ofByte).take(n)
Selects first n elements.
Selects first n elements.
the number of elements to take from this mutable indexed sequence.
a mutable indexed sequence consisting only of the first n
elements of this mutable indexed sequence,
or else the whole mutable indexed sequence, if it has less than n
elements.
(array: ofBoolean).take(n)
Selects first n elements.
Selects first n elements.
the number of elements to take from this mutable indexed sequence.
a mutable indexed sequence consisting only of the first n
elements of this mutable indexed sequence,
or else the whole mutable indexed sequence, if it has less than n
elements.
(array: ArrayOps[T]).take(n)
Selects last n elements.
Selects last n elements.
the number of elements to take
a mutable indexed sequence consisting only of the last n
elements of this mutable indexed sequence, or else the
whole mutable indexed sequence, if it has less than n
elements.
(array: ofUnit).takeRight(n)
Selects last n elements.
Selects last n elements.
the number of elements to take
a mutable indexed sequence consisting only of the last n
elements of this mutable indexed sequence, or else the
whole mutable indexed sequence, if it has less than n
elements.
(array: ofShort).takeRight(n)
Selects last n elements.
Selects last n elements.
the number of elements to take
a mutable indexed sequence consisting only of the last n
elements of this mutable indexed sequence, or else the
whole mutable indexed sequence, if it has less than n
elements.
(array: ofRef[T]).takeRight(n)
Selects last n elements.
Selects last n elements.
the number of elements to take
a mutable indexed sequence consisting only of the last n
elements of this mutable indexed sequence, or else the
whole mutable indexed sequence, if it has less than n
elements.
(array: ofLong).takeRight(n)
Selects last n elements.
Selects last n elements.
the number of elements to take
a mutable indexed sequence consisting only of the last n
elements of this mutable indexed sequence, or else the
whole mutable indexed sequence, if it has less than n
elements.
(array: ofInt).takeRight(n)
Selects last n elements.
Selects last n elements.
the number of elements to take
a mutable indexed sequence consisting only of the last n
elements of this mutable indexed sequence, or else the
whole mutable indexed sequence, if it has less than n
elements.
(array: ofFloat).takeRight(n)
Selects last n elements.
Selects last n elements.
the number of elements to take
a mutable indexed sequence consisting only of the last n
elements of this mutable indexed sequence, or else the
whole mutable indexed sequence, if it has less than n
elements.
(array: ofDouble).takeRight(n)
Selects last n elements.
Selects last n elements.
the number of elements to take
a mutable indexed sequence consisting only of the last n
elements of this mutable indexed sequence, or else the
whole mutable indexed sequence, if it has less than n
elements.
(array: ofChar).takeRight(n)
Selects last n elements.
Selects last n elements.
the number of elements to take
a mutable indexed sequence consisting only of the last n
elements of this mutable indexed sequence, or else the
whole mutable indexed sequence, if it has less than n
elements.
(array: ofByte).takeRight(n)
Selects last n elements.
Selects last n elements.
the number of elements to take
a mutable indexed sequence consisting only of the last n
elements of this mutable indexed sequence, or else the
whole mutable indexed sequence, if it has less than n
elements.
(array: ofBoolean).takeRight(n)
Selects last n elements.
Selects last n elements.
the number of elements to take
a mutable indexed sequence consisting only of the last n
elements of this mutable indexed sequence, or else the
whole mutable indexed sequence, if it has less than n
elements.
(array: ArrayOps[T]).takeRight(n)
Takes longest prefix of elements that satisfy a predicate.
Takes longest prefix of elements that satisfy a predicate.
the longest prefix of this mutable indexed sequence whose elements all satisfy
the predicate p
.
(array: ofRef[T]).takeWhile(p)
Takes longest prefix of elements that satisfy a predicate.
Takes longest prefix of elements that satisfy a predicate.
the longest prefix of this mutable indexed sequence whose elements all satisfy
the predicate p
.
(array: ArrayOps[T]).takeWhile(p)
[use case] Converts this array into another by copying all elements.
Converts this array into another by copying all elements.
The collection type to build.
a new collection containing all elements of this array.
(array: ofUnit).to
[use case] Converts this array into another by copying all elements.
Converts this array into another by copying all elements.
The collection type to build.
a new collection containing all elements of this array.
(array: ofShort).to
[use case] Converts this array into another by copying all elements.
Converts this array into another by copying all elements.
The collection type to build.
a new collection containing all elements of this array.
(array: ofRef[T]).to
[use case] Converts this array into another by copying all elements.
Converts this array into another by copying all elements.
The collection type to build.
a new collection containing all elements of this array.
(array: ofLong).to
[use case] Converts this array into another by copying all elements.
Converts this array into another by copying all elements.
The collection type to build.
a new collection containing all elements of this array.
(array: ofInt).to
[use case] Converts this array into another by copying all elements.
Converts this array into another by copying all elements.
The collection type to build.
a new collection containing all elements of this array.
(array: ofFloat).to
[use case] Converts this array into another by copying all elements.
Converts this array into another by copying all elements.
The collection type to build.
a new collection containing all elements of this array.
(array: ofDouble).to
[use case] Converts this array into another by copying all elements.
Converts this array into another by copying all elements.
The collection type to build.
a new collection containing all elements of this array.
(array: ofChar).to
[use case] Converts this array into another by copying all elements.
Converts this array into another by copying all elements.
The collection type to build.
a new collection containing all elements of this array.
(array: ofByte).to
[use case] Converts this array into another by copying all elements.
Converts this array into another by copying all elements.
The collection type to build.
a new collection containing all elements of this array.
(array: ofBoolean).to
[use case] Converts this array into another by copying all elements.
Converts this array into another by copying all elements.
The collection type to build.
a new collection containing all elements of this array.
(array: ArrayOps[T]).to
[use case] Converts this array to an array.
Converts this array to an array.
an array containing all elements of this array.
An ClassTag
must be available for the element type of this array.
(array: ofUnit).toArray
[use case] Converts this array to an array.
Converts this array to an array.
an array containing all elements of this array.
An ClassTag
must be available for the element type of this array.
(array: ofShort).toArray
[use case] Converts this array to an array.
Converts this array to an array.
an array containing all elements of this array.
An ClassTag
must be available for the element type of this array.
(array: ofRef[T]).toArray
[use case] Converts this array to an array.
Converts this array to an array.
an array containing all elements of this array.
An ClassTag
must be available for the element type of this array.
(array: ofLong).toArray
[use case] Converts this array to an array.
Converts this array to an array.
an array containing all elements of this array.
An ClassTag
must be available for the element type of this array.
(array: ofInt).toArray
[use case] Converts this array to an array.
Converts this array to an array.
an array containing all elements of this array.
An ClassTag
must be available for the element type of this array.
(array: ofFloat).toArray
[use case] Converts this array to an array.
Converts this array to an array.
an array containing all elements of this array.
An ClassTag
must be available for the element type of this array.
(array: ofDouble).toArray
[use case] Converts this array to an array.
Converts this array to an array.
an array containing all elements of this array.
An ClassTag
must be available for the element type of this array.
(array: ofChar).toArray
[use case] Converts this array to an array.
Converts this array to an array.
an array containing all elements of this array.
An ClassTag
must be available for the element type of this array.
(array: ofByte).toArray
[use case] Converts this array to an array.
Converts this array to an array.
an array containing all elements of this array.
An ClassTag
must be available for the element type of this array.
(array: ofBoolean).toArray
[use case] Converts this array to an array.
Converts this array to an array.
an array containing all elements of this array.
An ClassTag
must be available for the element type of this array.
(array: ArrayOps[T]).toArray
Uses the contents of this mutable indexed sequence to create a new mutable buffer.
Uses the contents of this mutable indexed sequence to create a new mutable buffer.
a buffer containing all elements of this mutable indexed sequence.
(array: ofUnit).toBuffer
Uses the contents of this mutable indexed sequence to create a new mutable buffer.
Uses the contents of this mutable indexed sequence to create a new mutable buffer.
a buffer containing all elements of this mutable indexed sequence.
(array: ofShort).toBuffer
Uses the contents of this mutable indexed sequence to create a new mutable buffer.
Uses the contents of this mutable indexed sequence to create a new mutable buffer.
a buffer containing all elements of this mutable indexed sequence.
(array: ofRef[T]).toBuffer
Uses the contents of this mutable indexed sequence to create a new mutable buffer.
Uses the contents of this mutable indexed sequence to create a new mutable buffer.
a buffer containing all elements of this mutable indexed sequence.
(array: ofLong).toBuffer
Uses the contents of this mutable indexed sequence to create a new mutable buffer.
Uses the contents of this mutable indexed sequence to create a new mutable buffer.
a buffer containing all elements of this mutable indexed sequence.
(array: ofInt).toBuffer
Uses the contents of this mutable indexed sequence to create a new mutable buffer.
Uses the contents of this mutable indexed sequence to create a new mutable buffer.
a buffer containing all elements of this mutable indexed sequence.
(array: ofFloat).toBuffer
Uses the contents of this mutable indexed sequence to create a new mutable buffer.
Uses the contents of this mutable indexed sequence to create a new mutable buffer.
a buffer containing all elements of this mutable indexed sequence.
(array: ofDouble).toBuffer
Uses the contents of this mutable indexed sequence to create a new mutable buffer.
Uses the contents of this mutable indexed sequence to create a new mutable buffer.
a buffer containing all elements of this mutable indexed sequence.
(array: ofChar).toBuffer
Uses the contents of this mutable indexed sequence to create a new mutable buffer.
Uses the contents of this mutable indexed sequence to create a new mutable buffer.
a buffer containing all elements of this mutable indexed sequence.
(array: ofByte).toBuffer
Uses the contents of this mutable indexed sequence to create a new mutable buffer.
Uses the contents of this mutable indexed sequence to create a new mutable buffer.
a buffer containing all elements of this mutable indexed sequence.
(array: ofBoolean).toBuffer
Uses the contents of this mutable indexed sequence to create a new mutable buffer.
Uses the contents of this mutable indexed sequence to create a new mutable buffer.
a buffer containing all elements of this mutable indexed sequence.
(array: ArrayOps[T]).toBuffer
Converts this mutable indexed sequence to an indexed sequence.
Converts this mutable indexed sequence to an indexed sequence.
an indexed sequence containing all elements of this mutable indexed sequence.
(array: ofUnit).toIndexedSeq
Converts this mutable indexed sequence to an indexed sequence.
Converts this mutable indexed sequence to an indexed sequence.
an indexed sequence containing all elements of this mutable indexed sequence.
(array: ofShort).toIndexedSeq
Converts this mutable indexed sequence to an indexed sequence.
Converts this mutable indexed sequence to an indexed sequence.
an indexed sequence containing all elements of this mutable indexed sequence.
(array: ofRef[T]).toIndexedSeq
Converts this mutable indexed sequence to an indexed sequence.
Converts this mutable indexed sequence to an indexed sequence.
an indexed sequence containing all elements of this mutable indexed sequence.
(array: ofLong).toIndexedSeq
Converts this mutable indexed sequence to an indexed sequence.
Converts this mutable indexed sequence to an indexed sequence.
an indexed sequence containing all elements of this mutable indexed sequence.
(array: ofInt).toIndexedSeq
Converts this mutable indexed sequence to an indexed sequence.
Converts this mutable indexed sequence to an indexed sequence.
an indexed sequence containing all elements of this mutable indexed sequence.
(array: ofFloat).toIndexedSeq
Converts this mutable indexed sequence to an indexed sequence.
Converts this mutable indexed sequence to an indexed sequence.
an indexed sequence containing all elements of this mutable indexed sequence.
(array: ofDouble).toIndexedSeq
Converts this mutable indexed sequence to an indexed sequence.
Converts this mutable indexed sequence to an indexed sequence.
an indexed sequence containing all elements of this mutable indexed sequence.
(array: ofChar).toIndexedSeq
Converts this mutable indexed sequence to an indexed sequence.
Converts this mutable indexed sequence to an indexed sequence.
an indexed sequence containing all elements of this mutable indexed sequence.
(array: ofByte).toIndexedSeq
Converts this mutable indexed sequence to an indexed sequence.
Converts this mutable indexed sequence to an indexed sequence.
an indexed sequence containing all elements of this mutable indexed sequence.
(array: ofBoolean).toIndexedSeq
Converts this mutable indexed sequence to an indexed sequence.
Converts this mutable indexed sequence to an indexed sequence.
an indexed sequence containing all elements of this mutable indexed sequence.
(array: ArrayOps[T]).toIndexedSeq
Returns this mutable indexed sequence as an iterable collection.
Returns this mutable indexed sequence as an iterable collection.
A new collection will not be built; lazy collections will stay lazy.
an Iterable
containing all elements of this mutable indexed sequence.
(array: ofUnit).toIterable
Returns this mutable indexed sequence as an iterable collection.
Returns this mutable indexed sequence as an iterable collection.
A new collection will not be built; lazy collections will stay lazy.
an Iterable
containing all elements of this mutable indexed sequence.
(array: ofShort).toIterable
Returns this mutable indexed sequence as an iterable collection.
Returns this mutable indexed sequence as an iterable collection.
A new collection will not be built; lazy collections will stay lazy.
an Iterable
containing all elements of this mutable indexed sequence.
(array: ofRef[T]).toIterable
Returns this mutable indexed sequence as an iterable collection.
Returns this mutable indexed sequence as an iterable collection.
A new collection will not be built; lazy collections will stay lazy.
an Iterable
containing all elements of this mutable indexed sequence.
(array: ofLong).toIterable
Returns this mutable indexed sequence as an iterable collection.
Returns this mutable indexed sequence as an iterable collection.
A new collection will not be built; lazy collections will stay lazy.
an Iterable
containing all elements of this mutable indexed sequence.
(array: ofInt).toIterable
Returns this mutable indexed sequence as an iterable collection.
Returns this mutable indexed sequence as an iterable collection.
A new collection will not be built; lazy collections will stay lazy.
an Iterable
containing all elements of this mutable indexed sequence.
(array: ofFloat).toIterable
Returns this mutable indexed sequence as an iterable collection.
Returns this mutable indexed sequence as an iterable collection.
A new collection will not be built; lazy collections will stay lazy.
an Iterable
containing all elements of this mutable indexed sequence.
(array: ofDouble).toIterable
Returns this mutable indexed sequence as an iterable collection.
Returns this mutable indexed sequence as an iterable collection.
A new collection will not be built; lazy collections will stay lazy.
an Iterable
containing all elements of this mutable indexed sequence.
(array: ofChar).toIterable
Returns this mutable indexed sequence as an iterable collection.
Returns this mutable indexed sequence as an iterable collection.
A new collection will not be built; lazy collections will stay lazy.
an Iterable
containing all elements of this mutable indexed sequence.
(array: ofByte).toIterable
Returns this mutable indexed sequence as an iterable collection.
Returns this mutable indexed sequence as an iterable collection.
A new collection will not be built; lazy collections will stay lazy.
an Iterable
containing all elements of this mutable indexed sequence.
(array: ofBoolean).toIterable
Returns this mutable indexed sequence as an iterable collection.
Returns this mutable indexed sequence as an iterable collection.
A new collection will not be built; lazy collections will stay lazy.
an Iterable
containing all elements of this mutable indexed sequence.
(array: ArrayOps[T]).toIterable
Returns an Iterator over the elements in this mutable indexed sequence.
Returns an Iterator over the elements in this mutable indexed sequence. Produces the same
result as iterator
.
an Iterator containing all elements of this mutable indexed sequence.
(array: ofUnit).toIterator
Returns an Iterator over the elements in this mutable indexed sequence.
Returns an Iterator over the elements in this mutable indexed sequence. Produces the same
result as iterator
.
an Iterator containing all elements of this mutable indexed sequence.
(array: ofShort).toIterator
Returns an Iterator over the elements in this mutable indexed sequence.
Returns an Iterator over the elements in this mutable indexed sequence. Produces the same
result as iterator
.
an Iterator containing all elements of this mutable indexed sequence.
(array: ofRef[T]).toIterator
Returns an Iterator over the elements in this mutable indexed sequence.
Returns an Iterator over the elements in this mutable indexed sequence. Produces the same
result as iterator
.
an Iterator containing all elements of this mutable indexed sequence.
(array: ofLong).toIterator
Returns an Iterator over the elements in this mutable indexed sequence.
Returns an Iterator over the elements in this mutable indexed sequence. Produces the same
result as iterator
.
an Iterator containing all elements of this mutable indexed sequence.
(array: ofInt).toIterator
Returns an Iterator over the elements in this mutable indexed sequence.
Returns an Iterator over the elements in this mutable indexed sequence. Produces the same
result as iterator
.
an Iterator containing all elements of this mutable indexed sequence.
(array: ofFloat).toIterator
Returns an Iterator over the elements in this mutable indexed sequence.
Returns an Iterator over the elements in this mutable indexed sequence. Produces the same
result as iterator
.
an Iterator containing all elements of this mutable indexed sequence.
(array: ofDouble).toIterator
Returns an Iterator over the elements in this mutable indexed sequence.
Returns an Iterator over the elements in this mutable indexed sequence. Produces the same
result as iterator
.
an Iterator containing all elements of this mutable indexed sequence.
(array: ofChar).toIterator
Returns an Iterator over the elements in this mutable indexed sequence.
Returns an Iterator over the elements in this mutable indexed sequence. Produces the same
result as iterator
.
an Iterator containing all elements of this mutable indexed sequence.
(array: ofByte).toIterator
Returns an Iterator over the elements in this mutable indexed sequence.
Returns an Iterator over the elements in this mutable indexed sequence. Produces the same
result as iterator
.
an Iterator containing all elements of this mutable indexed sequence.
(array: ofBoolean).toIterator
Returns an Iterator over the elements in this mutable indexed sequence.
Returns an Iterator over the elements in this mutable indexed sequence. Produces the same
result as iterator
.
an Iterator containing all elements of this mutable indexed sequence.
(array: ArrayOps[T]).toIterator
Converts this mutable indexed sequence to a list.
Converts this mutable indexed sequence to a list.
a list containing all elements of this mutable indexed sequence.
(array: ofUnit).toList
Converts this mutable indexed sequence to a list.
Converts this mutable indexed sequence to a list.
a list containing all elements of this mutable indexed sequence.
(array: ofShort).toList
Converts this mutable indexed sequence to a list.
Converts this mutable indexed sequence to a list.
a list containing all elements of this mutable indexed sequence.
(array: ofRef[T]).toList
Converts this mutable indexed sequence to a list.
Converts this mutable indexed sequence to a list.
a list containing all elements of this mutable indexed sequence.
(array: ofLong).toList
Converts this mutable indexed sequence to a list.
Converts this mutable indexed sequence to a list.
a list containing all elements of this mutable indexed sequence.
(array: ofInt).toList
Converts this mutable indexed sequence to a list.
Converts this mutable indexed sequence to a list.
a list containing all elements of this mutable indexed sequence.
(array: ofFloat).toList
Converts this mutable indexed sequence to a list.
Converts this mutable indexed sequence to a list.
a list containing all elements of this mutable indexed sequence.
(array: ofDouble).toList
Converts this mutable indexed sequence to a list.
Converts this mutable indexed sequence to a list.
a list containing all elements of this mutable indexed sequence.
(array: ofChar).toList
Converts this mutable indexed sequence to a list.
Converts this mutable indexed sequence to a list.
a list containing all elements of this mutable indexed sequence.
(array: ofByte).toList
Converts this mutable indexed sequence to a list.
Converts this mutable indexed sequence to a list.
a list containing all elements of this mutable indexed sequence.
(array: ofBoolean).toList
Converts this mutable indexed sequence to a list.
Converts this mutable indexed sequence to a list.
a list containing all elements of this mutable indexed sequence.
(array: ArrayOps[T]).toList
[use case] Converts this array to a map.
Converts this array to a map. This method is unavailable unless the elements are members of Tuple2, each ((T, U)) becoming a key-value pair in the map. Duplicate keys will be overwritten by later keys: if this is an unordered collection, which key is in the resulting map is undefined.
a map of type immutable.Map[T, U]
containing all key/value pairs of type (T, U)
of this array.
(array: ofUnit).toMap
[use case] Converts this array to a map.
Converts this array to a map. This method is unavailable unless the elements are members of Tuple2, each ((T, U)) becoming a key-value pair in the map. Duplicate keys will be overwritten by later keys: if this is an unordered collection, which key is in the resulting map is undefined.
a map of type immutable.Map[T, U]
containing all key/value pairs of type (T, U)
of this array.
(array: ofShort).toMap
[use case] Converts this array to a map.
Converts this array to a map. This method is unavailable unless the elements are members of Tuple2, each ((T, U)) becoming a key-value pair in the map. Duplicate keys will be overwritten by later keys: if this is an unordered collection, which key is in the resulting map is undefined.
a map of type immutable.Map[T, U]
containing all key/value pairs of type (T, U)
of this array.
(array: ofRef[T]).toMap
[use case] Converts this array to a map.
Converts this array to a map. This method is unavailable unless the elements are members of Tuple2, each ((T, U)) becoming a key-value pair in the map. Duplicate keys will be overwritten by later keys: if this is an unordered collection, which key is in the resulting map is undefined.
a map of type immutable.Map[T, U]
containing all key/value pairs of type (T, U)
of this array.
(array: ofLong).toMap
[use case] Converts this array to a map.
Converts this array to a map. This method is unavailable unless the elements are members of Tuple2, each ((T, U)) becoming a key-value pair in the map. Duplicate keys will be overwritten by later keys: if this is an unordered collection, which key is in the resulting map is undefined.
a map of type immutable.Map[T, U]
containing all key/value pairs of type (T, U)
of this array.
(array: ofInt).toMap
[use case] Converts this array to a map.
Converts this array to a map. This method is unavailable unless the elements are members of Tuple2, each ((T, U)) becoming a key-value pair in the map. Duplicate keys will be overwritten by later keys: if this is an unordered collection, which key is in the resulting map is undefined.
a map of type immutable.Map[T, U]
containing all key/value pairs of type (T, U)
of this array.
(array: ofFloat).toMap
[use case] Converts this array to a map.
Converts this array to a map. This method is unavailable unless the elements are members of Tuple2, each ((T, U)) becoming a key-value pair in the map. Duplicate keys will be overwritten by later keys: if this is an unordered collection, which key is in the resulting map is undefined.
a map of type immutable.Map[T, U]
containing all key/value pairs of type (T, U)
of this array.
(array: ofDouble).toMap
[use case] Converts this array to a map.
Converts this array to a map. This method is unavailable unless the elements are members of Tuple2, each ((T, U)) becoming a key-value pair in the map. Duplicate keys will be overwritten by later keys: if this is an unordered collection, which key is in the resulting map is undefined.
a map of type immutable.Map[T, U]
containing all key/value pairs of type (T, U)
of this array.
(array: ofChar).toMap
[use case] Converts this array to a map.
Converts this array to a map. This method is unavailable unless the elements are members of Tuple2, each ((T, U)) becoming a key-value pair in the map. Duplicate keys will be overwritten by later keys: if this is an unordered collection, which key is in the resulting map is undefined.
a map of type immutable.Map[T, U]
containing all key/value pairs of type (T, U)
of this array.
(array: ofByte).toMap
[use case] Converts this array to a map.
Converts this array to a map. This method is unavailable unless the elements are members of Tuple2, each ((T, U)) becoming a key-value pair in the map. Duplicate keys will be overwritten by later keys: if this is an unordered collection, which key is in the resulting map is undefined.
a map of type immutable.Map[T, U]
containing all key/value pairs of type (T, U)
of this array.
(array: ofBoolean).toMap
[use case] Converts this array to a map.
Converts this array to a map. This method is unavailable unless the elements are members of Tuple2, each ((T, U)) becoming a key-value pair in the map. Duplicate keys will be overwritten by later keys: if this is an unordered collection, which key is in the resulting map is undefined.
a map of type immutable.Map[T, U]
containing all key/value pairs of type (T, U)
of this array.
(array: ArrayOps[T]).toMap
Converts this mutable indexed sequence to a sequence.
Converts this mutable indexed sequence to a sequence.
A new collection will not be built; in particular, lazy sequences will stay lazy.
a sequence containing all elements of this mutable indexed sequence.
(array: ofUnit).toSeq
Converts this mutable indexed sequence to a sequence.
Converts this mutable indexed sequence to a sequence.
A new collection will not be built; in particular, lazy sequences will stay lazy.
a sequence containing all elements of this mutable indexed sequence.
(array: ofShort).toSeq
Converts this mutable indexed sequence to a sequence.
Converts this mutable indexed sequence to a sequence.
A new collection will not be built; in particular, lazy sequences will stay lazy.
a sequence containing all elements of this mutable indexed sequence.
(array: ofRef[T]).toSeq
Converts this mutable indexed sequence to a sequence.
Converts this mutable indexed sequence to a sequence.
A new collection will not be built; in particular, lazy sequences will stay lazy.
a sequence containing all elements of this mutable indexed sequence.
(array: ofLong).toSeq
Converts this mutable indexed sequence to a sequence.
Converts this mutable indexed sequence to a sequence.
A new collection will not be built; in particular, lazy sequences will stay lazy.
a sequence containing all elements of this mutable indexed sequence.
(array: ofInt).toSeq
Converts this mutable indexed sequence to a sequence.
Converts this mutable indexed sequence to a sequence.
A new collection will not be built; in particular, lazy sequences will stay lazy.
a sequence containing all elements of this mutable indexed sequence.
(array: ofFloat).toSeq
Converts this mutable indexed sequence to a sequence.
Converts this mutable indexed sequence to a sequence.
A new collection will not be built; in particular, lazy sequences will stay lazy.
a sequence containing all elements of this mutable indexed sequence.
(array: ofDouble).toSeq
Converts this mutable indexed sequence to a sequence.
Converts this mutable indexed sequence to a sequence.
A new collection will not be built; in particular, lazy sequences will stay lazy.
a sequence containing all elements of this mutable indexed sequence.
(array: ofChar).toSeq
Converts this mutable indexed sequence to a sequence.
Converts this mutable indexed sequence to a sequence.
A new collection will not be built; in particular, lazy sequences will stay lazy.
a sequence containing all elements of this mutable indexed sequence.
(array: ofByte).toSeq
Converts this mutable indexed sequence to a sequence.
Converts this mutable indexed sequence to a sequence.
A new collection will not be built; in particular, lazy sequences will stay lazy.
a sequence containing all elements of this mutable indexed sequence.
(array: ofBoolean).toSeq
Converts this mutable indexed sequence to a sequence.
Converts this mutable indexed sequence to a sequence.
A new collection will not be built; in particular, lazy sequences will stay lazy.
a sequence containing all elements of this mutable indexed sequence.
(array: ArrayOps[T]).toSeq
Converts this mutable indexed sequence to a set.
Converts this mutable indexed sequence to a set.
a set containing all elements of this mutable indexed sequence.
(array: ofUnit).toSet
Converts this mutable indexed sequence to a set.
Converts this mutable indexed sequence to a set.
a set containing all elements of this mutable indexed sequence.
(array: ofShort).toSet
Converts this mutable indexed sequence to a set.
Converts this mutable indexed sequence to a set.
a set containing all elements of this mutable indexed sequence.
(array: ofRef[T]).toSet
Converts this mutable indexed sequence to a set.
Converts this mutable indexed sequence to a set.
a set containing all elements of this mutable indexed sequence.
(array: ofLong).toSet
Converts this mutable indexed sequence to a set.
Converts this mutable indexed sequence to a set.
a set containing all elements of this mutable indexed sequence.
(array: ofInt).toSet
Converts this mutable indexed sequence to a set.
Converts this mutable indexed sequence to a set.
a set containing all elements of this mutable indexed sequence.
(array: ofFloat).toSet
Converts this mutable indexed sequence to a set.
Converts this mutable indexed sequence to a set.
a set containing all elements of this mutable indexed sequence.
(array: ofDouble).toSet
Converts this mutable indexed sequence to a set.
Converts this mutable indexed sequence to a set.
a set containing all elements of this mutable indexed sequence.
(array: ofChar).toSet
Converts this mutable indexed sequence to a set.
Converts this mutable indexed sequence to a set.
a set containing all elements of this mutable indexed sequence.
(array: ofByte).toSet
Converts this mutable indexed sequence to a set.
Converts this mutable indexed sequence to a set.
a set containing all elements of this mutable indexed sequence.
(array: ofBoolean).toSet
Converts this mutable indexed sequence to a set.
Converts this mutable indexed sequence to a set.
a set containing all elements of this mutable indexed sequence.
(array: ArrayOps[T]).toSet
Converts this mutable indexed sequence to a stream.
Converts this mutable indexed sequence to a stream.
a stream containing all elements of this mutable indexed sequence.
(array: ofUnit).toStream
Converts this mutable indexed sequence to a stream.
Converts this mutable indexed sequence to a stream.
a stream containing all elements of this mutable indexed sequence.
(array: ofShort).toStream
Converts this mutable indexed sequence to a stream.
Converts this mutable indexed sequence to a stream.
a stream containing all elements of this mutable indexed sequence.
(array: ofRef[T]).toStream
Converts this mutable indexed sequence to a stream.
Converts this mutable indexed sequence to a stream.
a stream containing all elements of this mutable indexed sequence.
(array: ofLong).toStream
Converts this mutable indexed sequence to a stream.
Converts this mutable indexed sequence to a stream.
a stream containing all elements of this mutable indexed sequence.
(array: ofInt).toStream
Converts this mutable indexed sequence to a stream.
Converts this mutable indexed sequence to a stream.
a stream containing all elements of this mutable indexed sequence.
(array: ofFloat).toStream
Converts this mutable indexed sequence to a stream.
Converts this mutable indexed sequence to a stream.
a stream containing all elements of this mutable indexed sequence.
(array: ofDouble).toStream
Converts this mutable indexed sequence to a stream.
Converts this mutable indexed sequence to a stream.
a stream containing all elements of this mutable indexed sequence.
(array: ofChar).toStream
Converts this mutable indexed sequence to a stream.
Converts this mutable indexed sequence to a stream.
a stream containing all elements of this mutable indexed sequence.
(array: ofByte).toStream
Converts this mutable indexed sequence to a stream.
Converts this mutable indexed sequence to a stream.
a stream containing all elements of this mutable indexed sequence.
(array: ofBoolean).toStream
Converts this mutable indexed sequence to a stream.
Converts this mutable indexed sequence to a stream.
a stream containing all elements of this mutable indexed sequence.
(array: ArrayOps[T]).toStream
Converts this mutable indexed sequence to a string.
Converts this mutable indexed sequence to a string.
a string representation of this collection. By default this
string consists of the stringPrefix
of this mutable indexed sequence, followed
by all elements separated by commas and enclosed in parentheses.
(array: ofUnit).toString()
Converts this mutable indexed sequence to a string.
Converts this mutable indexed sequence to a string.
a string representation of this collection. By default this
string consists of the stringPrefix
of this mutable indexed sequence, followed
by all elements separated by commas and enclosed in parentheses.
(array: ofShort).toString()
Converts this mutable indexed sequence to a string.
Converts this mutable indexed sequence to a string.
a string representation of this collection. By default this
string consists of the stringPrefix
of this mutable indexed sequence, followed
by all elements separated by commas and enclosed in parentheses.
(array: ofRef[T]).toString()
Converts this mutable indexed sequence to a string.
Converts this mutable indexed sequence to a string.
a string representation of this collection. By default this
string consists of the stringPrefix
of this mutable indexed sequence, followed
by all elements separated by commas and enclosed in parentheses.
(array: ofLong).toString()
Converts this mutable indexed sequence to a string.
Converts this mutable indexed sequence to a string.
a string representation of this collection. By default this
string consists of the stringPrefix
of this mutable indexed sequence, followed
by all elements separated by commas and enclosed in parentheses.
(array: ofInt).toString()
Converts this mutable indexed sequence to a string.
Converts this mutable indexed sequence to a string.
a string representation of this collection. By default this
string consists of the stringPrefix
of this mutable indexed sequence, followed
by all elements separated by commas and enclosed in parentheses.
(array: ofFloat).toString()
Converts this mutable indexed sequence to a string.
Converts this mutable indexed sequence to a string.
a string representation of this collection. By default this
string consists of the stringPrefix
of this mutable indexed sequence, followed
by all elements separated by commas and enclosed in parentheses.
(array: ofDouble).toString()
Converts this mutable indexed sequence to a string.
Converts this mutable indexed sequence to a string.
a string representation of this collection. By default this
string consists of the stringPrefix
of this mutable indexed sequence, followed
by all elements separated by commas and enclosed in parentheses.
(array: ofChar).toString()
Converts this mutable indexed sequence to a string.
Converts this mutable indexed sequence to a string.
a string representation of this collection. By default this
string consists of the stringPrefix
of this mutable indexed sequence, followed
by all elements separated by commas and enclosed in parentheses.
(array: ofByte).toString()
Converts this mutable indexed sequence to a string.
Converts this mutable indexed sequence to a string.
a string representation of this collection. By default this
string consists of the stringPrefix
of this mutable indexed sequence, followed
by all elements separated by commas and enclosed in parentheses.
(array: ofBoolean).toString()
Converts this mutable indexed sequence to a string.
Converts this mutable indexed sequence to a string.
a string representation of this collection. By default this
string consists of the stringPrefix
of this mutable indexed sequence, followed
by all elements separated by commas and enclosed in parentheses.
(array: ArrayOps[T]).toString()
Creates a String representation of this object.
Creates a String representation of this object. The default representation is platform dependent. On the java platform it is the concatenation of the class name, "@", and the object's hashcode in hexadecimal.
a String representation of the object.
(array: ArrayCharSequence).toString()
Converts this mutable indexed sequence to an unspecified Traversable.
Converts this mutable indexed sequence to an unspecified Traversable. Will return the same collection if this instance is already Traversable.
a Traversable containing all elements of this mutable indexed sequence.
(array: ofUnit).toTraversable
Converts this mutable indexed sequence to an unspecified Traversable.
Converts this mutable indexed sequence to an unspecified Traversable. Will return the same collection if this instance is already Traversable.
a Traversable containing all elements of this mutable indexed sequence.
(array: ofShort).toTraversable
Converts this mutable indexed sequence to an unspecified Traversable.
Converts this mutable indexed sequence to an unspecified Traversable. Will return the same collection if this instance is already Traversable.
a Traversable containing all elements of this mutable indexed sequence.
(array: ofRef[T]).toTraversable
Converts this mutable indexed sequence to an unspecified Traversable.
Converts this mutable indexed sequence to an unspecified Traversable. Will return the same collection if this instance is already Traversable.
a Traversable containing all elements of this mutable indexed sequence.
(array: ofLong).toTraversable
Converts this mutable indexed sequence to an unspecified Traversable.
Converts this mutable indexed sequence to an unspecified Traversable. Will return the same collection if this instance is already Traversable.
a Traversable containing all elements of this mutable indexed sequence.
(array: ofInt).toTraversable
Converts this mutable indexed sequence to an unspecified Traversable.
Converts this mutable indexed sequence to an unspecified Traversable. Will return the same collection if this instance is already Traversable.
a Traversable containing all elements of this mutable indexed sequence.
(array: ofFloat).toTraversable
Converts this mutable indexed sequence to an unspecified Traversable.
Converts this mutable indexed sequence to an unspecified Traversable. Will return the same collection if this instance is already Traversable.
a Traversable containing all elements of this mutable indexed sequence.
(array: ofDouble).toTraversable
Converts this mutable indexed sequence to an unspecified Traversable.
Converts this mutable indexed sequence to an unspecified Traversable. Will return the same collection if this instance is already Traversable.
a Traversable containing all elements of this mutable indexed sequence.
(array: ofChar).toTraversable
Converts this mutable indexed sequence to an unspecified Traversable.
Converts this mutable indexed sequence to an unspecified Traversable. Will return the same collection if this instance is already Traversable.
a Traversable containing all elements of this mutable indexed sequence.
(array: ofByte).toTraversable
Converts this mutable indexed sequence to an unspecified Traversable.
Converts this mutable indexed sequence to an unspecified Traversable. Will return the same collection if this instance is already Traversable.
a Traversable containing all elements of this mutable indexed sequence.
(array: ofBoolean).toTraversable
Converts this mutable indexed sequence to an unspecified Traversable.
Converts this mutable indexed sequence to an unspecified Traversable. Will return the same collection if this instance is already Traversable.
a Traversable containing all elements of this mutable indexed sequence.
(array: ArrayOps[T]).toTraversable
Converts this mutable indexed sequence to a Vector.
Converts this mutable indexed sequence to a Vector.
a vector containing all elements of this mutable indexed sequence.
(array: ofUnit).toVector
Converts this mutable indexed sequence to a Vector.
Converts this mutable indexed sequence to a Vector.
a vector containing all elements of this mutable indexed sequence.
(array: ofShort).toVector
Converts this mutable indexed sequence to a Vector.
Converts this mutable indexed sequence to a Vector.
a vector containing all elements of this mutable indexed sequence.
(array: ofRef[T]).toVector
Converts this mutable indexed sequence to a Vector.
Converts this mutable indexed sequence to a Vector.
a vector containing all elements of this mutable indexed sequence.
(array: ofLong).toVector
Converts this mutable indexed sequence to a Vector.
Converts this mutable indexed sequence to a Vector.
a vector containing all elements of this mutable indexed sequence.
(array: ofInt).toVector
Converts this mutable indexed sequence to a Vector.
Converts this mutable indexed sequence to a Vector.
a vector containing all elements of this mutable indexed sequence.
(array: ofFloat).toVector
Converts this mutable indexed sequence to a Vector.
Converts this mutable indexed sequence to a Vector.
a vector containing all elements of this mutable indexed sequence.
(array: ofDouble).toVector
Converts this mutable indexed sequence to a Vector.
Converts this mutable indexed sequence to a Vector.
a vector containing all elements of this mutable indexed sequence.
(array: ofChar).toVector
Converts this mutable indexed sequence to a Vector.
Converts this mutable indexed sequence to a Vector.
a vector containing all elements of this mutable indexed sequence.
(array: ofByte).toVector
Converts this mutable indexed sequence to a Vector.
Converts this mutable indexed sequence to a Vector.
a vector containing all elements of this mutable indexed sequence.
(array: ofBoolean).toVector
Converts this mutable indexed sequence to a Vector.
Converts this mutable indexed sequence to a Vector.
a vector containing all elements of this mutable indexed sequence.
(array: ArrayOps[T]).toVector
Transposes a two dimensional array.
Transposes a two dimensional array.
Type of row elements.
A function that converts elements of this array to rows - arrays of type U
.
An array obtained by replacing elements of this arrays with rows the represent.
(array: ofRef[T]).transpose(asArray)
Transposes a two dimensional array.
Transposes a two dimensional array.
Type of row elements.
A function that converts elements of this array to rows - arrays of type U
.
An array obtained by replacing elements of this arrays with rows the represent.
(array: ArrayOps[T]).transpose(asArray)
[use case] Produces a new sequence which contains all elements of this array and also all elements of a given sequence.
Produces a new sequence which contains all elements of this array and also all elements of
a given sequence. xs union ys
is equivalent to xs ++ ys
.
Another way to express this
is that xs union ys
computes the order-preserving multi-set union of xs
and ys
.
union
is hence a counter-part of diff
and intersect
which also work on multi-sets.
the sequence to add.
a new array which contains all elements of this array
followed by all elements of that
.
(array: ofRef[T]).union(that)
[use case] Produces a new sequence which contains all elements of this array and also all elements of a given sequence.
Produces a new sequence which contains all elements of this array and also all elements of
a given sequence. xs union ys
is equivalent to xs ++ ys
.
Another way to express this
is that xs union ys
computes the order-preserving multi-set union of xs
and ys
.
union
is hence a counter-part of diff
and intersect
which also work on multi-sets.
the sequence to add.
a new array which contains all elements of this array
followed by all elements of that
.
(array: ArrayOps[T]).union(that)
Converts an array of pairs into an array of first elements and an array of second elements.
Converts an array of pairs into an array of first elements and an array of second elements.
the type of the first half of the element pairs
the type of the second half of the element pairs
an implicit conversion which asserts that the element type of this Array is a pair.
a class tag for T1 type parameter that is required to create an instance of Array[T1]
a class tag for T2 type parameter that is required to create an instance of Array[T2]
a pair of Arrays, containing, respectively, the first and second half of each element pair of this Array.
(array: ofRef[T]).unzip(asPair, ct1, ct2)
Converts an array of pairs into an array of first elements and an array of second elements.
Converts an array of pairs into an array of first elements and an array of second elements.
the type of the first half of the element pairs
the type of the second half of the element pairs
an implicit conversion which asserts that the element type of this Array is a pair.
a class tag for T1 type parameter that is required to create an instance of Array[T1]
a class tag for T2 type parameter that is required to create an instance of Array[T2]
a pair of Arrays, containing, respectively, the first and second half of each element pair of this Array.
(array: ArrayOps[T]).unzip(asPair, ct1, ct2)
Converts an array of triples into three arrays, one containing the elements from each position of the triple.
Converts an array of triples into three arrays, one containing the elements from each position of the triple.
the type of the first of three elements in the triple
the type of the second of three elements in the triple
the type of the third of three elements in the triple
an implicit conversion which asserts that the element type of this Array is a triple.
a class tag for T1 type parameter that is required to create an instance of Array[T1]
a class tag for T2 type parameter that is required to create an instance of Array[T2]
a class tag for T3 type parameter that is required to create an instance of Array[T3]
a triple of Arrays, containing, respectively, the first, second, and third elements from each element triple of this Array.
(array: ofRef[T]).unzip3(asTriple, ct1, ct2, ct3)
Converts an array of triples into three arrays, one containing the elements from each position of the triple.
Converts an array of triples into three arrays, one containing the elements from each position of the triple.
the type of the first of three elements in the triple
the type of the second of three elements in the triple
the type of the third of three elements in the triple
an implicit conversion which asserts that the element type of this Array is a triple.
a class tag for T1 type parameter that is required to create an instance of Array[T1]
a class tag for T2 type parameter that is required to create an instance of Array[T2]
a class tag for T3 type parameter that is required to create an instance of Array[T3]
a triple of Arrays, containing, respectively, the first, second, and third elements from each element triple of this Array.
(array: ArrayOps[T]).unzip3(asTriple, ct1, ct2, ct3)
Replaces element at given index with a new value.
Replaces element at given index with a new value.
the new value.
(array: ofUnit).update(index, elem)
IndexOutOfBoundsException
if the index is not valid.
Replaces element at given index with a new value.
Replaces element at given index with a new value.
the new value.
(array: ofShort).update(index, elem)
IndexOutOfBoundsException
if the index is not valid.
Replaces element at given index with a new value.
Replaces element at given index with a new value.
the new value.
(array: ofRef[T]).update(index, elem)
IndexOutOfBoundsException
if the index is not valid.
Replaces element at given index with a new value.
Replaces element at given index with a new value.
the new value.
(array: ofLong).update(index, elem)
IndexOutOfBoundsException
if the index is not valid.
Replaces element at given index with a new value.
Replaces element at given index with a new value.
the new value.
(array: ofInt).update(index, elem)
IndexOutOfBoundsException
if the index is not valid.
Replaces element at given index with a new value.
Replaces element at given index with a new value.
the new value.
(array: ofFloat).update(index, elem)
IndexOutOfBoundsException
if the index is not valid.
Replaces element at given index with a new value.
Replaces element at given index with a new value.
the new value.
(array: ofDouble).update(index, elem)
IndexOutOfBoundsException
if the index is not valid.
Replaces element at given index with a new value.
Replaces element at given index with a new value.
the new value.
(array: ofChar).update(index, elem)
IndexOutOfBoundsException
if the index is not valid.
Replaces element at given index with a new value.
Replaces element at given index with a new value.
the new value.
(array: ofByte).update(index, elem)
IndexOutOfBoundsException
if the index is not valid.
Replaces element at given index with a new value.
Replaces element at given index with a new value.
the new value.
(array: ofBoolean).update(index, elem)
IndexOutOfBoundsException
if the index is not valid.
Replaces element at given index with a new value.
Replaces element at given index with a new value.
the index of the element to replace.
the new value.
(array: ArrayOps[T]).update(idx, elem)
IndexOutOfBoundsException
if the index is not valid.
[use case] A copy of this array with one single replaced element.
A copy of this array with one single replaced element.
the position of the replacement
the replacing element
a copy of this array with the element at position index
replaced by elem
.
(array: ofUnit).updated(index, elem)
[use case] A copy of this array with one single replaced element.
A copy of this array with one single replaced element.
the position of the replacement
the replacing element
a copy of this array with the element at position index
replaced by elem
.
(array: ofShort).updated(index, elem)
[use case] A copy of this array with one single replaced element.
A copy of this array with one single replaced element.
the position of the replacement
the replacing element
a copy of this array with the element at position index
replaced by elem
.
(array: ofRef[T]).updated(index, elem)
[use case] A copy of this array with one single replaced element.
A copy of this array with one single replaced element.
the position of the replacement
the replacing element
a copy of this array with the element at position index
replaced by elem
.
(array: ofLong).updated(index, elem)
[use case] A copy of this array with one single replaced element.
A copy of this array with one single replaced element.
the position of the replacement
the replacing element
a copy of this array with the element at position index
replaced by elem
.
(array: ofInt).updated(index, elem)
[use case] A copy of this array with one single replaced element.
A copy of this array with one single replaced element.
the position of the replacement
the replacing element
a copy of this array with the element at position index
replaced by elem
.
(array: ofFloat).updated(index, elem)
[use case] A copy of this array with one single replaced element.
A copy of this array with one single replaced element.
the position of the replacement
the replacing element
a copy of this array with the element at position index
replaced by elem
.
(array: ofDouble).updated(index, elem)
[use case] A copy of this array with one single replaced element.
A copy of this array with one single replaced element.
the position of the replacement
the replacing element
a copy of this array with the element at position index
replaced by elem
.
(array: ofChar).updated(index, elem)
[use case] A copy of this array with one single replaced element.
A copy of this array with one single replaced element.
the position of the replacement
the replacing element
a copy of this array with the element at position index
replaced by elem
.
(array: ofByte).updated(index, elem)
[use case] A copy of this array with one single replaced element.
A copy of this array with one single replaced element.
the position of the replacement
the replacing element
a copy of this array with the element at position index
replaced by elem
.
(array: ofBoolean).updated(index, elem)
[use case] A copy of this array with one single replaced element.
A copy of this array with one single replaced element.
the position of the replacement
the replacing element
a copy of this array with the element at position index
replaced by elem
.
(array: ArrayOps[T]).updated(index, elem)
A sub-sequence view starting at index from
and extending up to (but not including) index until
.
A sub-sequence view starting at index from
and extending up to (but not including) index until
.
The index of the first element of the slice
The index of the element following the slice
a non-strict view of a slice of this mutable indexed sequence, starting at index from
and extending up to (but not including) index until
.@note The difference between view
and slice
is that view
produces
a view of the current sequence, whereas slice
produces a new sequence.
(array: ofUnit).view(from, until)
view(from, to) is equivalent to view.slice(from, to)
Creates a view of this iterable @see Iterable.View
Creates a view of this iterable @see Iterable.View
a non-strict view of this mutable indexed sequence.
(array: ofUnit).view
A sub-sequence view starting at index from
and extending up to (but not including) index until
.
A sub-sequence view starting at index from
and extending up to (but not including) index until
.
The index of the first element of the slice
The index of the element following the slice
a non-strict view of a slice of this mutable indexed sequence, starting at index from
and extending up to (but not including) index until
.@note The difference between view
and slice
is that view
produces
a view of the current sequence, whereas slice
produces a new sequence.
(array: ofShort).view(from, until)
view(from, to) is equivalent to view.slice(from, to)
Creates a view of this iterable @see Iterable.View
Creates a view of this iterable @see Iterable.View
a non-strict view of this mutable indexed sequence.
(array: ofShort).view
A sub-sequence view starting at index from
and extending up to (but not including) index until
.
A sub-sequence view starting at index from
and extending up to (but not including) index until
.
The index of the first element of the slice
The index of the element following the slice
a non-strict view of a slice of this mutable indexed sequence, starting at index from
and extending up to (but not including) index until
.@note The difference between view
and slice
is that view
produces
a view of the current sequence, whereas slice
produces a new sequence.
(array: ofRef[T]).view(from, until)
view(from, to) is equivalent to view.slice(from, to)
Creates a view of this iterable @see Iterable.View
Creates a view of this iterable @see Iterable.View
a non-strict view of this mutable indexed sequence.
(array: ofRef[T]).view
A sub-sequence view starting at index from
and extending up to (but not including) index until
.
A sub-sequence view starting at index from
and extending up to (but not including) index until
.
The index of the first element of the slice
The index of the element following the slice
a non-strict view of a slice of this mutable indexed sequence, starting at index from
and extending up to (but not including) index until
.@note The difference between view
and slice
is that view
produces
a view of the current sequence, whereas slice
produces a new sequence.
(array: ofLong).view(from, until)
view(from, to) is equivalent to view.slice(from, to)
Creates a view of this iterable @see Iterable.View
Creates a view of this iterable @see Iterable.View
a non-strict view of this mutable indexed sequence.
(array: ofLong).view
A sub-sequence view starting at index from
and extending up to (but not including) index until
.
A sub-sequence view starting at index from
and extending up to (but not including) index until
.
The index of the first element of the slice
The index of the element following the slice
a non-strict view of a slice of this mutable indexed sequence, starting at index from
and extending up to (but not including) index until
.@note The difference between view
and slice
is that view
produces
a view of the current sequence, whereas slice
produces a new sequence.
(array: ofInt).view(from, until)
view(from, to) is equivalent to view.slice(from, to)
Creates a view of this iterable @see Iterable.View
Creates a view of this iterable @see Iterable.View
a non-strict view of this mutable indexed sequence.
(array: ofInt).view
A sub-sequence view starting at index from
and extending up to (but not including) index until
.
A sub-sequence view starting at index from
and extending up to (but not including) index until
.
The index of the first element of the slice
The index of the element following the slice
a non-strict view of a slice of this mutable indexed sequence, starting at index from
and extending up to (but not including) index until
.@note The difference between view
and slice
is that view
produces
a view of the current sequence, whereas slice
produces a new sequence.
(array: ofFloat).view(from, until)
view(from, to) is equivalent to view.slice(from, to)
Creates a view of this iterable @see Iterable.View
Creates a view of this iterable @see Iterable.View
a non-strict view of this mutable indexed sequence.
(array: ofFloat).view
A sub-sequence view starting at index from
and extending up to (but not including) index until
.
A sub-sequence view starting at index from
and extending up to (but not including) index until
.
The index of the first element of the slice
The index of the element following the slice
a non-strict view of a slice of this mutable indexed sequence, starting at index from
and extending up to (but not including) index until
.@note The difference between view
and slice
is that view
produces
a view of the current sequence, whereas slice
produces a new sequence.
(array: ofDouble).view(from, until)
view(from, to) is equivalent to view.slice(from, to)
Creates a view of this iterable @see Iterable.View
Creates a view of this iterable @see Iterable.View
a non-strict view of this mutable indexed sequence.
(array: ofDouble).view
A sub-sequence view starting at index from
and extending up to (but not including) index until
.
A sub-sequence view starting at index from
and extending up to (but not including) index until
.
The index of the first element of the slice
The index of the element following the slice
a non-strict view of a slice of this mutable indexed sequence, starting at index from
and extending up to (but not including) index until
.@note The difference between view
and slice
is that view
produces
a view of the current sequence, whereas slice
produces a new sequence.
(array: ofChar).view(from, until)
view(from, to) is equivalent to view.slice(from, to)
Creates a view of this iterable @see Iterable.View
Creates a view of this iterable @see Iterable.View
a non-strict view of this mutable indexed sequence.
(array: ofChar).view
A sub-sequence view starting at index from
and extending up to (but not including) index until
.
A sub-sequence view starting at index from
and extending up to (but not including) index until
.
The index of the first element of the slice
The index of the element following the slice
a non-strict view of a slice of this mutable indexed sequence, starting at index from
and extending up to (but not including) index until
.@note The difference between view
and slice
is that view
produces
a view of the current sequence, whereas slice
produces a new sequence.
(array: ofByte).view(from, until)
view(from, to) is equivalent to view.slice(from, to)
Creates a view of this iterable @see Iterable.View
Creates a view of this iterable @see Iterable.View
a non-strict view of this mutable indexed sequence.
(array: ofByte).view
A sub-sequence view starting at index from
and extending up to (but not including) index until
.
A sub-sequence view starting at index from
and extending up to (but not including) index until
.
The index of the first element of the slice
The index of the element following the slice
a non-strict view of a slice of this mutable indexed sequence, starting at index from
and extending up to (but not including) index until
.@note The difference between view
and slice
is that view
produces
a view of the current sequence, whereas slice
produces a new sequence.
(array: ofBoolean).view(from, until)
view(from, to) is equivalent to view.slice(from, to)
Creates a view of this iterable @see Iterable.View
Creates a view of this iterable @see Iterable.View
a non-strict view of this mutable indexed sequence.
(array: ofBoolean).view
A sub-sequence view starting at index from
and extending up to (but not including) index until
.
A sub-sequence view starting at index from
and extending up to (but not including) index until
.
The index of the first element of the slice
The index of the element following the slice
a non-strict view of a slice of this mutable indexed sequence, starting at index from
and extending up to (but not including) index until
.@note The difference between view
and slice
is that view
produces
a view of the current sequence, whereas slice
produces a new sequence.
(array: ArrayOps[T]).view(from, until)
view(from, to) is equivalent to view.slice(from, to)
Creates a view of this iterable @see Iterable.View
Creates a view of this iterable @see Iterable.View
a non-strict view of this mutable indexed sequence.
(array: ArrayOps[T]).view
Creates a non-strict filter of this mutable indexed sequence.
Creates a non-strict filter of this mutable indexed sequence.
Note: the difference between c filter p
and c withFilter p
is that
the former creates a new collection, whereas the latter only
restricts the domain of subsequent map
, flatMap
, foreach
,
and withFilter
operations.
the predicate used to test elements.
an object of class WithFilter
, which supports
map
, flatMap
, foreach
, and withFilter
operations.
All these operations apply to those elements of this mutable indexed sequence
which satisfy the predicate p
.
(array: ofRef[T]).withFilter(p)
Creates a non-strict filter of this mutable indexed sequence.
Creates a non-strict filter of this mutable indexed sequence.
Note: the difference between c filter p
and c withFilter p
is that
the former creates a new collection, whereas the latter only
restricts the domain of subsequent map
, flatMap
, foreach
,
and withFilter
operations.
the predicate used to test elements.
an object of class WithFilter
, which supports
map
, flatMap
, foreach
, and withFilter
operations.
All these operations apply to those elements of this mutable indexed sequence
which satisfy the predicate p
.
(array: ArrayOps[T]).withFilter(p)
[use case] Zips this array with its indices.
Zips this array with its indices.
A new array containing pairs consisting of all elements of this
array paired with their index. Indices start at 0
.
(array: ofUnit).zipWithIndex
List("a", "b", "c").zipWithIndex = List(("a", 0), ("b", 1), ("c", 2))
[use case] Zips this array with its indices.
Zips this array with its indices.
A new array containing pairs consisting of all elements of this
array paired with their index. Indices start at 0
.
(array: ofShort).zipWithIndex
List("a", "b", "c").zipWithIndex = List(("a", 0), ("b", 1), ("c", 2))
[use case] Zips this array with its indices.
Zips this array with its indices.
A new array containing pairs consisting of all elements of this
array paired with their index. Indices start at 0
.
(array: ofRef[T]).zipWithIndex
List("a", "b", "c").zipWithIndex = List(("a", 0), ("b", 1), ("c", 2))
[use case] Zips this array with its indices.
Zips this array with its indices.
A new array containing pairs consisting of all elements of this
array paired with their index. Indices start at 0
.
(array: ofLong).zipWithIndex
List("a", "b", "c").zipWithIndex = List(("a", 0), ("b", 1), ("c", 2))
[use case] Zips this array with its indices.
Zips this array with its indices.
A new array containing pairs consisting of all elements of this
array paired with their index. Indices start at 0
.
(array: ofInt).zipWithIndex
List("a", "b", "c").zipWithIndex = List(("a", 0), ("b", 1), ("c", 2))
[use case] Zips this array with its indices.
Zips this array with its indices.
A new array containing pairs consisting of all elements of this
array paired with their index. Indices start at 0
.
(array: ofFloat).zipWithIndex
List("a", "b", "c").zipWithIndex = List(("a", 0), ("b", 1), ("c", 2))
[use case] Zips this array with its indices.
Zips this array with its indices.
A new array containing pairs consisting of all elements of this
array paired with their index. Indices start at 0
.
(array: ofDouble).zipWithIndex
List("a", "b", "c").zipWithIndex = List(("a", 0), ("b", 1), ("c", 2))
[use case] Zips this array with its indices.
Zips this array with its indices.
A new array containing pairs consisting of all elements of this
array paired with their index. Indices start at 0
.
(array: ofChar).zipWithIndex
List("a", "b", "c").zipWithIndex = List(("a", 0), ("b", 1), ("c", 2))
[use case] Zips this array with its indices.
Zips this array with its indices.
A new array containing pairs consisting of all elements of this
array paired with their index. Indices start at 0
.
(array: ofByte).zipWithIndex
List("a", "b", "c").zipWithIndex = List(("a", 0), ("b", 1), ("c", 2))
[use case] Zips this array with its indices.
Zips this array with its indices.
A new array containing pairs consisting of all elements of this
array paired with their index. Indices start at 0
.
(array: ofBoolean).zipWithIndex
List("a", "b", "c").zipWithIndex = List(("a", 0), ("b", 1), ("c", 2))
[use case] Zips this array with its indices.
Zips this array with its indices.
A new array containing pairs consisting of all elements of this
array paired with their index. Indices start at 0
.
(array: ArrayOps[T]).zipWithIndex
List("a", "b", "c").zipWithIndex = List(("a", 0), ("b", 1), ("c", 2))
Arrays are mutable, indexed collections of values.
Array[T]
is Scala's representation for Java'sT[]
.Arrays make use of two common pieces of Scala syntactic sugar, shown on lines 2 and 3 of the above example code. Line 2 is translated into a call to
apply(Int)
, while line 3 is translated into a call toupdate(Int, T)
.Two implicit conversions exist in scala.Predef that are frequently applied to arrays: a conversion to scala.collection.mutable.ArrayOps (shown on line 4 of the example above) and a conversion to scala.collection.mutable.WrappedArray (a subtype of scala.collection.Seq). Both types make available many of the standard operations found in the Scala collections API. The conversion to
ArrayOps
is temporary, as all operations defined onArrayOps
return anArray
, while the conversion toWrappedArray
is permanent as all operations return aWrappedArray
.The conversion to
ArrayOps
takes priority over the conversion toWrappedArray
. For instance, consider the following code:Value
arrReversed
will be of typeArray[Int]
, with an implicit conversion toArrayOps
occurring to perform thereverse
operation. The value ofseqReversed
, on the other hand, will be computed by converting toWrappedArray
first and invoking the variant ofreverse
that returns anotherWrappedArray
.1.0
"The Scala 2.8 Collections' API" section on
Array
by Martin Odersky for more information."Scala 2.8 Arrays" the Scala Improvement Document detailing arrays since Scala 2.8.
Scala Language Specification, for in-depth information on the transformations the Scala compiler makes on Arrays (Sections 6.6 and 6.15 respectively.)