trait
Function0[+R] extends AnyRef
Abstract Value Members
-
abstract
def
apply(): R
Concrete Value Members
-
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
def
+(other: String): String
-
def
->[B](y: B): (() ⇒ R, B)
-
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
def
ensuring(cond: (() ⇒ R) ⇒ Boolean, msg: ⇒ Any): () ⇒ R
-
def
ensuring(cond: (() ⇒ R) ⇒ Boolean): () ⇒ R
-
def
ensuring(cond: Boolean, msg: ⇒ Any): () ⇒ R
-
def
ensuring(cond: Boolean): () ⇒ R
-
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
def
formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
-
def
→[B](y: B): (() ⇒ R, B)
Inherited from Any
Inherited by implicit conversion StringAdd from
() ⇒ R to StringAdd[() ⇒ R]
Inherited by implicit conversion StringFormat from
() ⇒ R to StringFormat[() ⇒ R]
Inherited by implicit conversion Ensuring from
() ⇒ R to Ensuring[() ⇒ R]
Inherited by implicit conversion ArrowAssoc from
() ⇒ R to ArrowAssoc[() ⇒ R]
A function of 0 parameters.
In the following example, the definition of javaVersion is a shorthand for the anonymous class definition anonfun0:
Note that
Function1
does not define a total function, as might be suggested by the existence of scala.PartialFunction. The only distinction betweenFunction1
andPartialFunction
is that the latter can specify inputs which it will not handle.