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.

[use case] Returns a new sequence containing the elements from the left hand operand followed by the elements from the
right hand operand.

[use case]

Returns a new sequence containing the elements from the left hand operand followed by the elements from the
right hand operand. The element type of the sequence is the most specific superclass encompassing
the element types of the two operands.

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.

B

the element type of the returned collection.

That

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.

that

the traversable to append.

bf

an implicit value of class CanBuildFrom which determines the
result class That from the current representation type Repr
and the new element type B.

returns

a new collection of type That which contains all elements
of this sequence followed by all elements of that.

Appends all elements of this sequence to a string builder.
The written text consists of the string representations (w.r.t. the method
toString) of all elements of this sequence without any separator string.

Appends all elements of this sequence to a string builder using a separator string.

Appends all elements of this 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 sequence, separated by the string sep.

Appends all elements of this sequence to a string builder using start, end, and separator strings.

Appends all elements of this 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 sequence are separated by the string sep.

defaggregate[B](z: B)(seqop: (B, A) ⇒ B, combop: (B, B) ⇒ B): B

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).

B

the type of accumulated results

z

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)

seqop

an operator used to accumulate results within a partition

combop

an associative operator used to combine results from different partitions

final defasInstanceOf[T0]: T0

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.

Copies elements of this sequence to an array.
Fills the given array xs with at most len elements of
this sequence, starting at position start.
Copying will stop once either the end of the current sequence is reached,
or the end of the array is reached, or len elements have been copied.

Copies values of this sequence to an array.
Fills the given array xs with values of this sequence.
Copying will stop once either the end of the current sequence is reached,
or the end of the array is reached.

Copies values of this sequence to an array.
Fills the given array xs with values of this sequence, beginning at index start.
Copying will stop once either the end of the current sequence is reached,
or the end of the array is reached.

[use case] Computes the multiset difference between this sequence and another sequence.

[use case]

Computes the multiset difference between this sequence and another sequence.

that

the sequence of elements to remove

returns

a new sequence which contains all elements of this sequence
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.

deffold[A1 >: A](z: A1)(op: (A1, A1) ⇒ A1): A1

Folds the elements of this sequence using the specified associative
binary operator.

Folds the elements of this sequence using the specified associative
binary operator.

The order in which operations are performed on elements is unspecified
and may be nondeterministic.

A1

a type parameter for the binary operator, a supertype of A.

z

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.)

op

a binary operator that must be associative

returns

the result of applying fold operator op between all the elements and z

Tests whether this 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.

returns

true if this collection is known to have finite size,
false otherwise.

[use case] Computes the multiset intersection between this sequence and another sequence.

[use case]

Computes the multiset intersection between this sequence and another sequence.

that

the sequence of elements to intersect with.

returns

a new sequence which contains all elements of this sequence
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.

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.

returns

true if the receiver object is an instance of erasure of type T0; false otherwise.

a string representation of this sequence. In the resulting string
the string representations (w.r.t. the method toString)
of all elements of this sequence follow each other without any
separator string.

Displays all elements of this sequence in a string using start, end, and
separator strings.

Displays all elements of this sequence in a string using start, end, and
separator strings.

start

the starting string.

sep

the separator string.

end

the ending string.

returns

a string representation of this 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 sequence are separated by
the string sep.

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.

a pair of sequences: the first sequence consists of all elements that
satisfy the predicate p and the second sequence consists of all elements
that don't. The relative order of the elements in the resulting sequences
is the same as in the original sequence.

defproduct: A

[use case] Multiplies up the elements of this collection.

[use case]

Multiplies up the elements of this collection.

returns

the product of all elements in this sequence 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 sequence and as result type of product.
Examples of such types are: Long, Float, Double, BigInt.

defsum: A

[use case] Sums up the elements of this collection.

[use case]

Sums up the elements of this collection.

returns

the sum of all elements in this sequence 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 sequence and as result type of sum.
Examples of such types are: Long, Float, Double, BigInt.

Converts this sequence to an iterable collection. Note that
the choice of target Iterable is lazy in this default implementation
as this TraversableOnce may be lazy and unevaluated (i.e. it may
be an iterator which is only traversable once).

Converts this sequence 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.

returns

a map of type immutable.Map[T, U]
containing all key/value pairs of type (T, U) of this 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.

p

the predicate used to test elements.

returns

an object of class WithFilter, which supports
map, flatMap, foreach, and withFilter operations.
All these operations apply to those elements of this sequence
which satisfy the predicate p.

[use case] Returns a sequence formed from this sequence and another iterable collection
by combining corresponding elements in pairs.

[use case]

Returns a sequence formed from this sequence 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.

B

the type of the second half of the returned pairs

that

The iterable providing the second half of each result pair

returns

a new sequence containing pairs consisting of
corresponding elements of this sequence and that. The length
of the returned collection is the minimum of the lengths of this sequence and that.

[use case] Returns a sequence formed from this sequence and another iterable collection
by combining corresponding elements in pairs.

[use case]

Returns a sequence formed from this sequence 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.

B

the type of the second half of the returned pairs

that

The iterable providing the second half of each result pair

thisElem

the element to be used to fill up the result if this sequence is shorter than that.

thatElem

the element to be used to fill up the result if that is shorter than this sequence.

returns

a new sequence containing pairs consisting of
corresponding elements of this sequence and that. The length
of the returned collection is the maximum of the lengths of this sequence and that.
If this sequence is shorter than that, thisElem values are used to pad the result.
If that is shorter than this sequence, thatElem values are used to pad the result.

This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.To access this member you can use a type ascription:

This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.To access this member you can use a type ascription:

This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.To access this member you can use a type ascription:

This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.To access this member you can use a type ascription: