scala

# Predef

#### object Predef extends LowPriorityImplicits

The `Predef` object provides definitions that are accessible in all Scala compilation units without explicit qualification.

Source
  Predef.scala

Linear Supertypes
LowPriorityImplicits, AnyRef, Any
Ordering

1. Alphabetic
2. By inheritance

Inherited

1. Hide All
2. Show all

1. Predef
2. LowPriorityImplicits
3. AnyRef
4. Any

Visibility

1. Public
2. All

### Type Members

1. #### class <:< [-From, +To] extends (From) ⇒ To with Serializable

   An instance of `A <:< B` witnesses that `A` is a subtype of `B`.

2. #### class =:= [From, To] extends (From) ⇒ To with Serializable

   An instance of `A =:= B` witnesses that the types `A` and `B` are equal.

3. #### class ArrowAssoc [A] extends AnyRef

   Attributes
     final

4. #### type Class [T] = Class[T]

5. #### type ClassManifest [T] = ClassManifest[T]

6. #### class DummyImplicit extends AnyRef

   A type for which there is always an implicit value.

7. #### class Ensuring [A] extends AnyRef

   Attributes
     final

8. #### type Function [-A, +B] = (A) ⇒ B

9. #### type Manifest [T] = Manifest[T]

10. #### type Map [A, +B] = Map[A, B]

11. #### type OptManifest [T] = OptManifest[T]

12. #### type Pair [+A, +B] = (A, B)

13. #### type Set [A] = Set[A]

14. #### type String = String

15. #### type Triple [+A, +B, +C] = (A, B, C)

16. #### class <%< [-From, +To] extends (From) ⇒ To with Serializable

    Attributes
      sealed abstract
    Annotations
      @deprecated
    Deprecated

      Use From => To instead

### Value Members

1. #### def != (arg0: AnyRef): Boolean

   Attributes
     final
   Definition Classes
     AnyRef

2. #### def != (arg0: Any): Boolean

   Test two objects for inequality.

   Test two objects for inequality.

   returns

     `true` if !(this == that), false otherwise.

   Attributes
     final
   Definition Classes
     Any

3. #### def ## (): Int

   Equivalent to `x.hashCode` except for boxed numeric types.

   Equivalent to `x.hashCode` except for boxed numeric types. 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.

   returns

     a hash value consistent with ==

   Attributes
     final
   Definition Classes
     AnyRef → Any

4. #### val $scope : xml.TopScope.type

5. #### object <%< extends Serializable

6. #### object =:= extends Serializable

7. #### def == (arg0: AnyRef): Boolean

   Attributes
     final
   Definition Classes
     AnyRef

8. #### def == (arg0: Any): Boolean

   Test two objects for equality.

   Test two objects for equality.

   returns

     `true` if the receiver object is equivalent to the argument; `false` otherwise.

   Attributes
     final
   Definition Classes
     Any

9. #### val AnyRef : SpecializableCompanion

10. #### implicit def Boolean2boolean (x: Boolean): Boolean

    Attributes
      implicit

11. #### implicit def Boolean2booleanNullConflict (x: Null): Boolean

    Attributes
      implicit
    Definition Classes
      LowPriorityImplicits

12. #### implicit def Byte2byte (x: Byte): Byte

    Attributes
      implicit

13. #### implicit def Byte2byteNullConflict (x: Null): Byte

    Attributes
      implicit
    Definition Classes
      LowPriorityImplicits

14. #### implicit def Character2char (x: Character): Char

    Attributes
      implicit

15. #### implicit def Character2charNullConflict (x: Null): Char

    Attributes
      implicit
    Definition Classes
      LowPriorityImplicits

16. #### val ClassManifest : reflect.ClassManifest.type

17. #### implicit def Double2double (x: Double): Double

    Attributes
      implicit

18. #### implicit def Double2doubleNullConflict (x: Null): Double

    Attributes
      implicit
    Definition Classes
      LowPriorityImplicits

19. #### object DummyImplicit extends AnyRef

20. #### implicit def Float2float (x: Float): Float

    Attributes
      implicit

21. #### implicit def Float2floatNullConflict (x: Null): Float

    Attributes
      implicit
    Definition Classes
      LowPriorityImplicits

22. #### implicit def Integer2int (x: Integer): Int

    Attributes
      implicit

23. #### implicit def Integer2intNullConflict (x: Null): Int

    Attributes
      implicit
    Definition Classes
      LowPriorityImplicits

24. #### implicit def Long2long (x: Long): Long

    Attributes
      implicit

25. #### implicit def Long2longNullConflict (x: Null): Long

    Attributes
      implicit
    Definition Classes
      LowPriorityImplicits

26. #### val Manifest : reflect.Manifest.type

27. #### val Map : scala.collection.immutable.Map.type

28. #### val NoManifest : reflect.NoManifest.type

29. #### object Pair extends Serializable

30. #### val Set : scala.collection.immutable.Set.type

31. #### implicit def Short2short (x: Short): Short

    Attributes
      implicit

32. #### implicit def Short2shortNullConflict (x: Null): Short

    Attributes
      implicit
    Definition Classes
      LowPriorityImplicits

33. #### object Triple extends Serializable

34. #### implicit def any2ArrowAssoc [A] (x: A): ArrowAssoc[A]

    Attributes
      implicit

35. #### implicit def any2Ensuring [A] (x: A): Ensuring[A]

    Attributes
      implicit

36. #### implicit def any2stringadd (x: Any): StringAdd

    Attributes
      implicit

37. #### implicit def arrayToCharSequence (xs: Array[Char]): CharSequence

    Attributes
      implicit

38. #### def asInstanceOf [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.

    returns

      the receiver object.

    Attributes
      final
    Definition Classes
      Any

39. #### def assert (assertion: Boolean, message: ⇒ Any): Unit

    Tests an expression, throwing an AssertionError if false.

    Tests an expression, throwing an AssertionError if false. Calls to this method will not be generated if -Xelide-below is at least ASSERTION.

    Attributes
      final
    Annotations
      @elidable( level = ASSERTION ) @inline()
    See also

      elidable

40. #### def assert (assertion: Boolean): Unit

    Tests an expression, throwing an AssertionError if false.

    Tests an expression, throwing an AssertionError if false. Calls to this method will not be generated if -Xelide-below is at least ASSERTION.

    Annotations
      @elidable( level = ASSERTION )
    See also

      elidable

41. #### def assume (assumption: Boolean, message: ⇒ Any): Unit

    Tests an expression, throwing an AssertionError if false.

    Tests an expression, throwing an AssertionError if false. This method differs from assert only in the intent expressed: assert contains a predicate which needs to be proven, while assume contains an axiom for a static checker. Calls to this method will not be generated if -Xelide-below is at least ASSERTION.

    Attributes
      final
    Annotations
      @elidable( level = ASSERTION ) @inline()
    See also

      elidable

42. #### def assume (assumption: Boolean): Unit

    Tests an expression, throwing an AssertionError if false.

    Tests an expression, throwing an AssertionError if false. This method differs from assert only in the intent expressed: assert contains a predicate which needs to be proven, while assume contains an axiom for a static checker. Calls to this method will not be generated if -Xelide-below is at least ASSERTION.

    Annotations
      @elidable( level = ASSERTION )
    See also

      elidable

43. #### implicit def augmentString (x: String): StringOps

    Attributes
      implicit

44. #### implicit def boolean2Boolean (x: Boolean): Boolean

    Attributes
      implicit

45. #### implicit def boolean2BooleanConflict (x: Boolean): AnyRef

    Attributes
      implicit

46. #### implicit def booleanArrayOps (xs: Array[Boolean]): ArrayOps[Boolean]

    Attributes
      implicit

47. #### implicit def booleanWrapper (x: Boolean): RichBoolean

    Attributes
      implicit
    Definition Classes
      LowPriorityImplicits

48. #### implicit def byte2Byte (x: Byte): Byte

    Attributes
      implicit

49. #### implicit def byte2ByteConflict (x: Byte): AnyRef

    Attributes
      implicit

50. #### implicit def byte2double (x: Byte): Double

    Attributes
      implicit

51. #### implicit def byte2float (x: Byte): Float

    Attributes
      implicit

52. #### implicit def byte2int (x: Byte): Int

    Attributes
      implicit

53. #### implicit def byte2long (x: Byte): Long

    Attributes
      implicit

54. #### implicit def byte2short (x: Byte): Short

    Attributes
      implicit

55. #### implicit def byteArrayOps (xs: Array[Byte]): ArrayOps[Byte]

    Attributes
      implicit

56. #### implicit def byteWrapper (x: Byte): RichByte

    We prefer the java.

    We prefer the java.lang.* boxed types to these wrappers in any potential conflicts. Conflicts do exist because the wrappers need to implement ScalaNumber in order to have a symmetric equals method, but that implies implementing java.lang.Number as well.

    Attributes
      implicit
    Definition Classes
      LowPriorityImplicits

57. #### implicit def char2Character (x: Char): Character

    Attributes
      implicit

58. #### implicit def char2CharacterConflict (x: Char): AnyRef

    Attributes
      implicit

59. #### implicit def char2double (x: Char): Double

    Attributes
      implicit

60. #### implicit def char2float (x: Char): Float

    Attributes
      implicit

61. #### implicit def char2int (x: Char): Int

    Attributes
      implicit

62. #### implicit def char2long (x: Char): Long

    Attributes
      implicit

63. #### implicit def charArrayOps (xs: Array[Char]): ArrayOps[Char]

    Attributes
      implicit

64. #### implicit def charWrapper (c: Char): RichChar

    Attributes
      implicit
    Definition Classes
      LowPriorityImplicits

65. #### def classManifest [T] (implicit m: ClassManifest[T]): ClassManifest[T]

66. #### def classOf [T] : Class[T]

    Return the runtime representation of a class type.

    Return the runtime representation of a class type. This is a stub method. The actual implementation is filled in by the compiler.

67. #### def clone (): AnyRef

    Create a copy of the receiver object.

    Create a copy of the receiver object.

    The default implementation of the `clone` method is platform dependent.

    returns

      a copy of the receiver object.

    Attributes
      protected[lang]
    Definition Classes
      AnyRef
    Annotations
      @throws()

68. #### implicit def conforms [A] : <:<[A, A]

    Attributes
      implicit

69. #### implicit def double2Double (x: Double): Double

    Attributes
      implicit

70. #### implicit def double2DoubleConflict (x: Double): AnyRef

    Attributes
      implicit

71. #### implicit def doubleArrayOps (xs: Array[Double]): ArrayOps[Double]

    Attributes
      implicit

72. #### implicit def doubleWrapper (x: Double): RichDouble

    Attributes
      implicit
    Definition Classes
      LowPriorityImplicits

73. #### def eq (arg0: AnyRef): Boolean

    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:

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

    Attributes
      final
    Definition Classes
      AnyRef

74. #### def equals (arg0: Any): Boolean

    The equality method for reference types.

    The equality method for reference types. See equals in Any.

    returns

      `true` if the receiver object is equivalent to the argument; `false` otherwise.

    Definition Classes
      AnyRef → Any

75. #### implicit def exceptionWrapper (exc: Throwable): RichException

    Attributes
      implicit

76. #### implicit def fallbackStringCanBuildFrom [T] : CanBuildFrom[String, T, IndexedSeq[T]]

    Attributes
      implicit
    Definition Classes
      LowPriorityImplicits

77. #### def finalize (): Unit

    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.

    Attributes
      protected[lang]
    Definition Classes
      AnyRef
    Annotations
      @throws()

78. #### implicit def float2Float (x: Float): Float

    Attributes
      implicit

79. #### implicit def float2FloatConflict (x: Float): AnyRef

    Attributes
      implicit

80. #### implicit def float2double (x: Float): Double

    Attributes
      implicit

81. #### implicit def floatArrayOps (xs: Array[Float]): ArrayOps[Float]

    Attributes
      implicit

82. #### implicit def floatWrapper (x: Float): RichFloat

    Attributes
      implicit
    Definition Classes
      LowPriorityImplicits

83. #### implicit def genericArrayOps [T] (xs: Array[T]): ArrayOps[T]

    Attributes
      implicit

84. #### implicit def genericWrapArray [T] (xs: Array[T]): WrappedArray[T]

    Attributes
      implicit
    Definition Classes
      LowPriorityImplicits

85. #### def getClass (): java.lang.Class[_]

    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.

    returns

      a representation that corresponds to the dynamic class of the receiver object.

    Attributes
      final
    Definition Classes
      AnyRef → Any

86. #### def hashCode (): Int

    The hashCode method for reference types.

    The hashCode method for reference types. See hashCode in Any.

    returns

      the hash code value for this object.

    Definition Classes
      AnyRef → Any

87. #### def identity [A] (x: A): A

88. #### def implicitly [T] (implicit e: T): T

89. #### implicit def int2Integer (x: Int): Integer

    Attributes
      implicit

90. #### implicit def int2IntegerConflict (x: Int): AnyRef

    Attributes
      implicit

91. #### implicit def int2double (x: Int): Double

    Attributes
      implicit

92. #### implicit def int2float (x: Int): Float

    Attributes
      implicit

93. #### implicit def int2long (x: Int): Long

    Attributes
      implicit

94. #### implicit def intArrayOps (xs: Array[Int]): ArrayOps[Int]

    Attributes
      implicit

95. #### implicit def intWrapper (x: Int): RichInt

    Attributes
      implicit
    Definition Classes
      LowPriorityImplicits

96. #### def isInstanceOf [T0] : Boolean

    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.

    returns

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

    Attributes
      final
    Definition Classes
      Any

97. #### def locally [T] (x: T): T

    Annotations
      @inline()

98. #### implicit def long2Long (x: Long): Long

    Attributes
      implicit

99. #### implicit def long2LongConflict (x: Long): AnyRef

    Attributes
      implicit

100. #### implicit def long2double (x: Long): Double

     Attributes
       implicit

101. #### implicit def long2float (x: Long): Float

     Attributes
       implicit

102. #### implicit def longArrayOps (xs: Array[Long]): ArrayOps[Long]

     Attributes
       implicit

103. #### implicit def longWrapper (x: Long): RichLong

     Attributes
       implicit
     Definition Classes
       LowPriorityImplicits

104. #### def manifest [T] (implicit m: Manifest[T]): Manifest[T]

105. #### def ne (arg0: AnyRef): Boolean

     Equivalent to `!(this eq that)`.

     Equivalent to `!(this eq that)`.

     returns

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

     Attributes
       final
     Definition Classes
       AnyRef

106. #### def notify (): Unit

     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
       final
     Definition Classes
       AnyRef

107. #### def notifyAll (): Unit

     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
       final
     Definition Classes
       AnyRef

108. #### def optManifest [T] (implicit m: OptManifest[T]): OptManifest[T]

109. #### def print (x: Any): Unit

110. #### def printf (text: String, xs: Any*): Unit

111. #### def println (x: Any): Unit

112. #### def println (): Unit

113. #### def readBoolean (): Boolean

114. #### def readByte (): Byte

115. #### def readChar (): Char

116. #### def readDouble (): Double

117. #### def readFloat (): Float

118. #### def readInt (): Int

119. #### def readLine (text: String, args: Any*): String

120. #### def readLine (): String

121. #### def readLong (): Long

122. #### def readShort (): Short

123. #### def readf (format: String): List[Any]

124. #### def readf1 (format: String): Any

125. #### def readf2 (format: String): (Any, Any)

126. #### def readf3 (format: String): (Any, Any, Any)

127. #### implicit def refArrayOps [T <: AnyRef] (xs: Array[T]): ArrayOps[T]

     Attributes
       implicit

128. #### def require (requirement: Boolean, message: ⇒ Any): Unit

     Tests an expression, throwing an IllegalArgumentException if false.

     Tests an expression, throwing an IllegalArgumentException if false. This method is similar to assert, but blames the caller of the method for violating the condition.

     Attributes
       final
     Annotations
       @inline()

129. #### def require (requirement: Boolean): Unit

     Tests an expression, throwing an IllegalArgumentException if false.

     Tests an expression, throwing an IllegalArgumentException if false. This method is similar to assert, but blames the caller of the method for violating the condition.

130. #### implicit def seqToCharSequence (xs: IndexedSeq[Char]): CharSequence

     Attributes
       implicit

131. #### implicit def short2Short (x: Short): Short

     Attributes
       implicit

132. #### implicit def short2ShortConflict (x: Short): AnyRef

     Attributes
       implicit

133. #### implicit def short2double (x: Short): Double

     Attributes
       implicit

134. #### implicit def short2float (x: Short): Float

     Attributes
       implicit

135. #### implicit def short2int (x: Short): Int

     Attributes
       implicit

136. #### implicit def short2long (x: Short): Long

     Attributes
       implicit

137. #### implicit def shortArrayOps (xs: Array[Short]): ArrayOps[Short]

     Attributes
       implicit

138. #### implicit def shortWrapper (x: Short): RichShort

     Attributes
       implicit
     Definition Classes
       LowPriorityImplicits

139. #### implicit def stringCanBuildFrom : CanBuildFrom[String, Char, String]

     Attributes
       implicit

140. #### def synchronized [T0] (arg0: ⇒ T0): T0

     Attributes
       final
     Definition Classes
       AnyRef

141. #### def toString (): String

     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.

     returns

       a String representation of the object.

     Definition Classes
       AnyRef → Any

142. #### implicit def unaugmentString (x: StringOps): String

     Attributes
       implicit

143. #### implicit def unitArrayOps (xs: Array[Unit]): ArrayOps[Unit]

     Attributes
       implicit

144. #### implicit def unwrapString (ws: WrappedString): String

     Attributes
       implicit
     Definition Classes
       LowPriorityImplicits

145. #### def wait (): Unit

     Attributes
       final
     Definition Classes
       AnyRef
     Annotations
       @throws()

146. #### def wait (arg0: Long, arg1: Int): Unit

     Attributes
       final
     Definition Classes
       AnyRef
     Annotations
       @throws()

147. #### def wait (arg0: Long): Unit

     Attributes
       final
     Definition Classes
       AnyRef
     Annotations
       @throws()

148. #### implicit def wrapBooleanArray (xs: Array[Boolean]): WrappedArray[Boolean]

     Attributes
       implicit
     Definition Classes
       LowPriorityImplicits

149. #### implicit def wrapByteArray (xs: Array[Byte]): WrappedArray[Byte]

     Attributes
       implicit
     Definition Classes
       LowPriorityImplicits

150. #### implicit def wrapCharArray (xs: Array[Char]): WrappedArray[Char]

     Attributes
       implicit
     Definition Classes
       LowPriorityImplicits

151. #### implicit def wrapDoubleArray (xs: Array[Double]): WrappedArray[Double]

     Attributes
       implicit
     Definition Classes
       LowPriorityImplicits

152. #### implicit def wrapFloatArray (xs: Array[Float]): WrappedArray[Float]

     Attributes
       implicit
     Definition Classes
       LowPriorityImplicits

153. #### implicit def wrapIntArray (xs: Array[Int]): WrappedArray[Int]

     Attributes
       implicit
     Definition Classes
       LowPriorityImplicits

154. #### implicit def wrapLongArray (xs: Array[Long]): WrappedArray[Long]

     Attributes
       implicit
     Definition Classes
       LowPriorityImplicits

155. #### implicit def wrapRefArray [T <: AnyRef] (xs: Array[T]): WrappedArray[T]

     Attributes
       implicit
     Definition Classes
       LowPriorityImplicits

156. #### implicit def wrapShortArray (xs: Array[Short]): WrappedArray[Short]

     Attributes
       implicit
     Definition Classes
       LowPriorityImplicits

157. #### implicit def wrapString (s: String): WrappedString

     Attributes
       implicit
     Definition Classes
       LowPriorityImplicits

158. #### implicit def wrapUnitArray (xs: Array[Unit]): WrappedArray[Unit]

     Attributes
       implicit
     Definition Classes
       LowPriorityImplicits

159. #### implicit def zipped2ToTraversable [El1, El2] (zz: (_$1, _$2)#Zipped[_, El1, _, El2]): Traversable[(El1, El2)]

     Attributes
       implicit

160. #### implicit def zipped3ToTraversable [El1, El2, El3] (zz: (_$5, _$6, _$7)#Zipped[_, El1, _, El2, _, El3]): Traversable[(El1, El2, El3)]

     Attributes
       implicit

### Deprecated Value Members

1. #### def error (message: String): Nothing

   Annotations
     @deprecated
   Deprecated

     Use sys.error(message) instead

2. #### def exit (status: Int): Nothing

   Annotations
     @deprecated
   Deprecated

     Use sys.exit(status) instead

3. #### def exit (): Nothing

   Annotations
     @deprecated
   Deprecated

     Use sys.exit() instead

4. #### def format (text: String, xs: Any*): String

   Annotations
     @deprecated
   Deprecated

     Use formatString.format(args: _*) or arg.formatted(formatString) instead

### Inherited from LowPriorityImplicits

### Inherited from AnyRef

### Inherited from Any