scalax.control

trait Injection

[source: scalax/control/Injection.scala]

trait Injection[A, B]
extends (A) => B
Represents functions which have (potentially partial) inverses, and that can therefore be used both in expressions and pattern matches.
Method Summary
def andThen [C](that : Injection[B, C]) : Injection[A, C]
def compose [C](that : Injection[C, A]) : Injection[C, B]
abstract def unapply (x : B) : scala.Option[A]
Methods inherited from scala.Function1
scala.Function1.apply (abstract), scala.Function1.toString, scala.Function1.compose, scala.Function1.andThen
Methods inherited from AnyRef
getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Method Details
abstract def unapply(x : B) : scala.Option[A]

def andThen[C](that : Injection[B, C]) : Injection[A, C]

def compose[C](that : Injection[C, A]) : Injection[C, B]


Copyright (c) 2005-8 The Scalax Project. All Rights Reserved.