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 ==
Test two objects for equality.
Test two objects for equality.
The expression x == that
is equivalent to if (x eq null) that eq null else x.equals(that)
.
true
if the receiver object is equivalent to the argument; false
otherwise.
Specialization.
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.
if the receiver object is not an instance of the erasure of type T0
.
Given type U, creates a Type representing Class[_ <: U].
Given a class symbol C with type parameters T1, T2, .
Given a class symbol C with type parameters T1, T2, ... Tn which have upper/lower bounds LB1/UB1, LB1/UB2, ..., LBn/UBn, returns an existential type of the form
C[E1, ..., En] forSome { E1 >: LB1 <: UB1 ... en >: LBn <: UBn }.
Order a list of types with non-trait classes before others.
Create a copy of the receiver object.
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.
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.
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
Using getDecl rather than getMember may avoid issues with OverloadedTypes turning up when you don't want them, if you know the method in question is uniquely declared in the given owner.
if tpe <: ProductN[T1,.
if tpe <: ProductN[T1,...,TN], returns List(T1,...,TN) else Nil
The hashCode method for reference types.
Is symbol a boxed value class, e.
Is symbol a boxed value class, e.g. java.lang.Integer?
returns true if this type is exactly ProductN[T1,.
returns true if this type is exactly ProductN[T1,...,Tn], not some subclass
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.
Is symbol a numeric value class?
Is symbol a numeric value class?
Is type's symbol a numeric value class?
Is symbol a phantom class for which no runtime representation exists?
Is the symbol that of a parent which is added during parsing?
Is sym
a member of Predef with the given name?
Note: DON't replace this by sym == Predef_conforms/etc, as Predef_conforms is a def
which does a member lookup (it can't be a lazy val because we might reload Predef
during resident compilations).
Is symbol a value class?
Equivalent to !(this eq that)
.
Equivalent to !(this eq that)
.
true
if the argument is not a reference to the receiver object; false
otherwise.
T1 means one type parameter.
The following transformations applied to a list of parents.
The following transformations applied to a list of parents. If any parent is a class/trait, all parents which normalize to Object are discarded. Otherwise, all parents which normalize to Object except the first one found are discarded.
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
Remove references to class Object (other than the head) in a list of parents
Remove all but one reference to class Object from a list of parents.
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.
Creators for TupleN, ProductN, FunctionN.
If symbol is a value class (boxed or not), return the unboxed value class.
If symbol is a value class (boxed or not), return the unboxed value class. Otherwise, NoSymbol.
(definitionsClass: StringAdd).self
(definitionsClass: StringFormat).self
(Since version 2.10.0) Moved to rootMirror.EmptyPackage
(Since version 2.10.0) Moved to rootMirror.EmptyPackageClass
(Since version 2.10.0) Use AnyRefModule
(Since version 2.10.0) Moved to rootMirror.RootClass
(Since version 2.10.0) Moved to rootMirror.RootPackage
(Since version 2.10.0) Moved to rootMirror.getClass
(Since version 2.10.0) Moved to rootMirror.getModule
(Since version 2.10.0) Use isTupleType
To avoid unchecked warnings on polymorphic classes, translate a Foo[T] into a Foo[_] for use in the pattern matcher.
To avoid unchecked warnings on polymorphic classes, translate a Foo[T] into a Foo[_] for use in the pattern matcher.
(Since version 2.10.0) Use classExistentialType
(definitionsClass: ArrowAssoc[DefinitionsClass]).x
(Since version 2.10.0) Use leftOfArrow
instead
(definitionsClass: Ensuring[DefinitionsClass]).x
(Since version 2.10.0) Use resultOfEnsuring
instead