scalax.rules

class InRule

[source: scalax/rules/InRule.scala]

class InRule[In, +Out, +A, +X](rule : Rule[In, Out, A, X])
extends AnyRef
A workaround for the difficulties of dealing with a contravariant 'In' parameter type...
Method Summary
def & : Rule[In, In, A, X]
Creates a rule that succeeds if the original rule succeeds, but returns the original input.
def mapRule [Out2, B, Y](f : (Result[Out, A, X]) => (In) => Result[Out2, B, Y]) : Rule[In, Out2, B, Y]
def orElse [Out2 >: Out, A2 >: A, X2 >: X](other : => Rule[In, Out2, A2, X2]) : Rule[In, Out2, A2, X2]
def unary_! : Rule[In, In, Unit, Nothing]
Creates a rule that suceeds only if the original rule would fail on the given context.
def | [Out2 >: Out, A2 >: A, X2 >: X](other : => Rule[In, Out2, A2, X2]) : Rule[In, Out2, A2, X2]
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Method Details
def mapRule[Out2, B, Y](f : (Result[Out, A, X]) => (In) => Result[Out2, B, Y]) : Rule[In, Out2, B, Y]

def orElse[Out2 >: Out, A2 >: A, X2 >: X](other : => Rule[In, Out2, A2, X2]) : Rule[In, Out2, A2, X2]

def |[Out2 >: Out, A2 >: A, X2 >: X](other : => Rule[In, Out2, A2, X2]) : Rule[In, Out2, A2, X2]

def unary_! : Rule[In, In, Unit, Nothing]
Creates a rule that suceeds only if the original rule would fail on the given context.

def & : Rule[In, In, A, X]
Creates a rule that succeeds if the original rule succeeds, but returns the original input.


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