Unit

scala.Unit
See theUnit companion class
object Unit

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Unit.type

Members list

Value members

Concrete methods

def box(x: Unit): BoxedUnit

Transforms a value type into a boxed reference type.

Transforms a value type into a boxed reference type.

This method is not intended for use in source code. The runtime representation of this value is platform specific.

Value parameters

x

the Unit to be boxed

Attributes

Returns

a scala.runtime.BoxedUnit offering x as its underlying value.

override def toString: String

The String representation of the scala.Unit companion object.

The String representation of the scala.Unit companion object.

Attributes

Definition Classes
Any
def unbox(x: Object): Unit

Transforms a boxed type into a value type. Note that this method is not typesafe: it accepts any Object, but will throw an exception if the argument is not a scala.runtime.BoxedUnit.

Transforms a boxed type into a value type. Note that this method is not typesafe: it accepts any Object, but will throw an exception if the argument is not a scala.runtime.BoxedUnit.

This method is not intended for use in source code. The result of successfully unboxing a value is ().

Value parameters

x

the scala.runtime.BoxedUnit to be unboxed.

Attributes

Returns

the Unit value ()

Throws
ClassCastException

if the argument is not a scala.runtime.BoxedUnit

Implicits

Implicits

implicit def unitOrOps[A](x: A | Unit): UndefOrOps[A]