AnyRef
Class AnyRef
is the root class of all reference types. All types except the value types descend from this class.
Attributes
- Graph
-
- Known subtypes
-
trait () => Rclass FromJavaBooleanSupplierclass FromJavaDoubleSupplierclass FromJavaIntSupplierclass FromJavaLongSupplierclass FromJavaSupplier[T]trait Reference[T]trait ReferenceWrapper[T]class PhantomReference[T]class SoftReference[T]class WeakReference[T]trait JFunction0$mcB$sptrait JFunction0$mcC$sptrait JFunction0$mcD$sptrait JFunction0$mcF$sptrait JFunction0$mcI$sptrait JFunction0$mcJ$sptrait JFunction0$mcS$sptrait JFunction0$mcV$sptrait JFunction0$mcZ$spclass AbstractFunction0[R]trait T1 => Rtrait Set[A]class AbstractSet[A]class BitSetclass BitSet1class BitSet2class BitSetNclass HashSet[A]class ListSet[A]class Set1[A]class Set2[A]class Set3[A]class Set4[A]class TreeSet[A]trait SortedSet[A]class HashSet[A]class LinkedHashSet[A]trait Set[A]class AbstractSet[A]class BitSetclass TreeSet[A]trait SortedSet[A]trait Set[A]class AbstractSet[A]trait SortedSet[A]trait BitSettrait BitSetOps[C]class FromJavaConsumer[T]class FromJavaDoubleConsumerclass FromJavaDoubleFunction[R]class FromJavaDoublePredicateclass FromJavaIntConsumerclass FromJavaIntFunction[R]class FromJavaIntPredicateclass FromJavaIntUnaryOperatorclass FromJavaLongConsumerclass FromJavaLongFunction[R]class FromJavaLongPredicateclass FromJavaPredicate[T]class FromJavaToDoubleFunction[T]class FromJavaToIntFunction[T]class FromJavaToLongFunction[T]class FromJavaUnaryOperator[T]trait JFunction1$mcDD$sptrait JFunction1$mcDF$sptrait JFunction1$mcDI$sptrait JFunction1$mcDJ$sptrait JFunction1$mcFD$sptrait JFunction1$mcFF$sptrait JFunction1$mcFI$sptrait JFunction1$mcFJ$sptrait JFunction1$mcID$sptrait JFunction1$mcIF$sptrait JFunction1$mcII$sptrait JFunction1$mcIJ$sptrait JFunction1$mcJD$sptrait JFunction1$mcJF$sptrait JFunction1$mcJI$sptrait JFunction1$mcJJ$sptrait JFunction1$mcVD$sptrait JFunction1$mcVF$sptrait JFunction1$mcVI$sptrait JFunction1$mcVJ$sptrait JFunction1$mcZD$sptrait JFunction1$mcZF$sptrait JFunction1$mcZI$sptrait JFunction1$mcZJ$spclass IntMap[T]class LongMap[T]class LongMap[V]class SystemPropertiestrait Seq[A]trait Seq[A]class AbstractSeq[A]class ArraySeq[A]class ofBooleanclass ofByteclass ofCharclass ofDoubleclass ofFloatclass ofIntclass ofLongclass ofRef[T]class ofShortclass ofUnitclass LazyList[A]class List[A]class ::[A]object Nilclass NumericRange[T]class Exclusive[T]class Inclusive[T]class Queue[A]class Rangeclass Exclusiveclass Inclusiveclass Stream[A]class Cons[A]object Emptyclass Vector[A]class WrappedStringtrait IndexedSeq[A]trait LinearSeq[A]trait Seq[A]class AbstractSeq[A]class AbstractBuffer[A]class ArrayBuffer[A]class ArrayDeque[A]class Queue[A]class Stack[A]class ListBuffer[A]class UnrolledBuffer[T]class ArraySeq[T]class ofBooleanclass ofByteclass ofCharclass ofDoubleclass ofFloatclass ofIntclass ofLongclass ofRef[T]class ofShortclass ofUnitclass StringBuildertrait Buffer[A]trait IndexedBuffer[A]trait IndexedSeq[T]class AnyAccumulator[A]class DoubleAccumulatorclass IntAccumulatorclass LongAccumulatorclass AbstractSeq[A]trait IndexedSeq[A]trait LinearSeq[A]trait (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) => Rtrait (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) => Rtrait (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) => Rtrait (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) => Rtrait (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) => Rtrait (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) => Rtrait (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) => Rtrait (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) => Rclass AbstractFunction17[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, R]trait (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) => Rclass AbstractFunction18[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, R]trait (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) => Rclass AbstractFunction19[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, R]trait (T1, T2) => Rclass FromJavaBinaryOperator[T]class FromJavaObjDoubleConsumer[T]class FromJavaObjIntConsumer[T]class FromJavaObjLongConsumer[T]trait JFunction2$mcDDD$sptrait JFunction2$mcDDI$sptrait JFunction2$mcDDJ$sptrait JFunction2$mcDID$sptrait JFunction2$mcDII$sptrait JFunction2$mcDIJ$sptrait JFunction2$mcDJD$sptrait JFunction2$mcDJI$sptrait JFunction2$mcDJJ$sptrait JFunction2$mcFDD$sptrait JFunction2$mcFDI$sptrait JFunction2$mcFDJ$sptrait JFunction2$mcFID$sptrait JFunction2$mcFII$sptrait JFunction2$mcFIJ$sptrait JFunction2$mcFJD$sptrait JFunction2$mcFJI$sptrait JFunction2$mcFJJ$sptrait JFunction2$mcIDD$sptrait JFunction2$mcIDI$sptrait JFunction2$mcIDJ$sptrait JFunction2$mcIID$sptrait JFunction2$mcIII$sptrait JFunction2$mcIIJ$sptrait JFunction2$mcIJD$sptrait JFunction2$mcIJI$sptrait JFunction2$mcIJJ$sptrait JFunction2$mcJDD$sptrait JFunction2$mcJDI$sptrait JFunction2$mcJDJ$sptrait JFunction2$mcJID$sptrait JFunction2$mcJII$sptrait JFunction2$mcJIJ$sptrait JFunction2$mcJJD$sptrait JFunction2$mcJJI$sptrait JFunction2$mcJJJ$sptrait JFunction2$mcVDD$sptrait JFunction2$mcVDI$sptrait JFunction2$mcVDJ$sptrait JFunction2$mcVID$sptrait JFunction2$mcVII$sptrait JFunction2$mcVIJ$sptrait JFunction2$mcVJD$sptrait JFunction2$mcVJI$sptrait JFunction2$mcVJJ$sptrait JFunction2$mcZDD$sptrait JFunction2$mcZDI$sptrait JFunction2$mcZDJ$sptrait JFunction2$mcZID$sptrait JFunction2$mcZII$sptrait JFunction2$mcZIJ$sptrait JFunction2$mcZJD$sptrait JFunction2$mcZJI$sptrait JFunction2$mcZJJ$sptrait (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) => Rclass AbstractFunction20[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, R]trait (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) => Rclass AbstractFunction21[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, R]trait (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) => Rclass AbstractFunction22[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, R]trait (T1, T2, T3) => Rtrait (T1, T2, T3, T4) => Rtrait (T1, T2, T3, T4, T5) => Rtrait (T1, T2, T3, T4, T5, T6) => Rtrait (T1, T2, T3, T4, T5, T6, T7) => Rtrait (T1, T2, T3, T4, T5, T6, T7, T8) => Rtrait (T1, T2, T3, T4, T5, T6, T7, T8, T9) => RShow all
Members list
Value members
Concrete methods
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
andy
of typeAnyRef
, multiple invocations ofx.eq(y)
consistently returnstrue
or consistently returnsfalse
. -
For any non-null instance
x
of typeAnyRef
,x.eq(null)
andnull.eq(x)
returnsfalse
. -
null.eq(null)
returnstrue
.
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
).
Value parameters
- that
-
the object to compare against this object for reference equality.
Attributes
- Returns
-
true
if the argument is a reference to the receiver object;false
otherwise.
Equivalent to !(this eq that)
.
Equivalent to !(this eq that)
.
Value parameters
- that
-
the object to compare against this object for reference equality.
Attributes
- Returns
-
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.
Attributes
- Note
-
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.
Attributes
- Note
-
not specified by SLS as a member of AnyRef
Executes the code in body
with an exclusive lock on this
.
Executes the code in body
with an exclusive lock on this
.
Value parameters
- body
-
the code to execute
Attributes
- Returns
-
the result of
body
Attributes
- Note
-
not specified by SLS as a member of AnyRef
Value parameters
- timeout
-
the maximum time to wait in milliseconds.
Attributes
- Note
-
not specified by SLS as a member of AnyRef
Value parameters
- nanos
-
additional time, in nanoseconds range 0-999999.
- timeout
-
the maximum time to wait in milliseconds.
Attributes
- Note
-
not specified by SLS as a member of AnyRef