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.

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.

Tests whether the argument (that) is a reference to the receiver object (this).

Tests whether the argument (that) 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:

It is consistent: for any non-null instances x and y of type AnyRef, multiple invocations of
x.eq(y) consistently returns true or consistently returns false.

For any non-null instance 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).

returns

true if the argument is a reference to the receiver object; false otherwise.

Attempting to retrieve match information before performing the first match
or after exhausting the iterator results in java.lang.IllegalStateException.
See scala.util.matching.Regex.MatchIterator for details.

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.

In the replacement String, a dollar sign ($) followed by a number will be
interpreted as a reference to a group in the matched pattern, with numbers
1 through 9 corresponding to the first nine groups, and 0 standing for the
whole match. Any other character is an error. The backslash (\) character
will be interpreted as an escape character and can be used to escape the
dollar sign. Use Regex.quoteReplacement to escape these characters.

In the replacement String, a dollar sign ($) followed by a number will be
interpreted as a reference to a group in the matched pattern, with numbers
1 through 9 corresponding to the first nine groups, and 0 standing for the
whole match. Any other character is an error. The backslash (\) character
will be interpreted as an escape character and can be used to escape the
dollar sign. Use Regex.quoteReplacement to escape these characters.

In the replacement String, a dollar sign ($) followed by a number will be
interpreted as a reference to a group in the matched pattern, with numbers
1 through 9 corresponding to the first nine groups, and 0 standing for the
whole match. Any other character is an error. The backslash (\) character
will be interpreted as an escape character and can be used to escape the
dollar sign. Use Regex.quoteReplacement to escape these characters.

Replaces some of the matches using a replacer function that returns an scala.Option.

Replaces some of the matches using a replacer function that returns an scala.Option.
The replacer function takes a scala.util.matching.Regex.Match so that extra
information can be obtained from the match. For example:

In the replacement String, a dollar sign ($) followed by a number will be
interpreted as a reference to a group in the matched pattern, with numbers
1 through 9 corresponding to the first nine groups, and 0 standing for the
whole match. Any other character is an error. The backslash (\) character
will be interpreted as an escape character and can be used to escape the
dollar sign. Use Regex.quoteReplacement to escape these characters.

If the match succeeds, the result is a list of the matching
groups (or a null element if a group did not match any input).
If the pattern specifies no groups, then the result will be an empty list
on a successful match.

This method attempts to match the entire input by default; to find the next
matching subsequence, use an unanchored Regex.