scala.PartialFunction

trait PartialFunction

trait PartialFunction[- A, + B]

 extends (A) => B


A partial function of type PartialFunction[A, B] is a unary function where the domain does not include all values of type A. The function isDefinedAt allows to test dynamically, if a value is in the domain of the function.
author
- Martin Odersky
version
- 1.0, 16/07/2003


Source: PartialFunction.scala(23)

Direct Known Subclasses

Seq, Map,

 Methods

!= final def !=(arg0 : Object) Boolean AnyRef
!= final def !=(arg0 : Any) Boolean Any
== final def ==(arg0 : Any) Boolean Any
== final def ==(arg0 : Object) Boolean AnyRef
andThen override def andThen[C](k : (B) => C)
(f andThen g)(x) == g(f(x))
PartialFunction[A, C]
apply abstract def apply(v1 : T1) R Function1
asInstanceOf final def asInstanceOf[T0] T0 Any
clone protected def clone Object AnyRef
compose def compose[A](g : (A) => T1)
(f compose g)(x) == f(g(x))
(A) => R Function1
eq final def eq(arg0 : Object) Boolean AnyRef
equals def equals(arg0 : Any) Boolean AnyRef
finalize protected def finalize Unit AnyRef
getClass final def getClass Class[Any] AnyRef
hashCode def hashCode Int AnyRef
isDefinedAt abstract def isDefinedAt(x : A)
Checks if a value is contained in the functions domain [details]
param
x - the value to test
return
- true, iff x is in the domain of this function.
Boolean
isInstanceOf final def isInstanceOf[T0] Boolean Any
ne final def ne(arg0 : Object) Boolean AnyRef
notify final def notify Unit AnyRef
notifyAll final def notifyAll Unit AnyRef
orElse def orElse[A1 <: A, B1 >: B](that : PartialFunction[A1, B1]) PartialFunction[A1, B1]
synchronized final def synchronized[T0](arg0 : T0) T0 AnyRef
toString override def toString String Function1
wait final def wait(arg0 : Long, arg1 : Int) Unit AnyRef
wait final def wait Unit AnyRef
wait final def wait(arg0 : Long) Unit AnyRef
Copyright (c) 2008. All Rights Reserved.