in scala
trait PartialFunction

trait PartialFunction[-A,+B]()
extends Object
with ScalaObject
with (A) => B
Implementing classes or objects:
trait Seq[+A]()
class BoxedArray() in scala/runtime
trait Map[A,+B]() in scala/collection
class MutableList[A]() in scala/collection/mutable

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

Method Summary
abstract def isDefinedAt(x: A): Boolean
     Checks if a value is contained in the functions domain.

Methods inherited from java/lang/Object-class
clone, eq, equals, finalize, getClass, hashCode, ne, notify, notifyAll, synchronized, toString, wait, wait, wait

Methods inherited from scala/Any-class
!=, ==, asInstanceOf, isInstanceOf, match

Methods inherited from scala/Function1-class
apply

Methods inherited from scala/ScalaObject-class
getScalaType

Method Detail

isDefinedAt

  abstract def isDefinedAt(x: A): Boolean
Checks if a value is contained in the functions domain.
Parameters:
x - the value to test
Returns:
true, iff x is in the domain of this function.