com.agical.rmock.core.match
Interface Expression

All Known Subinterfaces:
Constraint, Operator
All Known Implementing Classes:
AbstractBinaryOperator, AbstractConstraint, AbstractExpression, AndOperator, AnythingConstraint, ClassAssignableToConstraint, ClassIsAbstractConstraint, ClassNameConstraint, ContainsConstraint, EndsWithConstraint, EqualsConstraint, GreaterThanConstraint, GreaterThanOrEqualConstraint, InstanceOfConstraint, IsFalseConstraint, IsNullConstraint, IsTrueConstraint, LessThanConstraint, LessThanOrEqualConstraint, MethodNameConstraint, MethodParameterTypesConstraint, NotOperator, OrOperator, SameConstraint, StartsWithConstraint, XorOperator

public interface Expression

Represents an expression. Expressions return true if an object passes the expression. Expressions can be combined by logical operators like and, or, xor.

(c) 2005 Agical AB

Author:
joakim.ohlrogge

Method Summary
 Expression and(Expression right)
          Ands this expression with the right side expression
 void describeWith(ExpressionDescriber expressionDescriber)
          Describes this expression with the given describer
 Expression or(Expression right)
          Ors this expression with the right side expression
 boolean passes(java.lang.Object object)
           
 Expression xor(Expression right)
          Xors this expression with the right side expression
 

Method Detail

passes

boolean passes(java.lang.Object object)
Parameters:
object - The object to check
Returns:
true if the object passes this constraint, otherwise false.

describeWith

void describeWith(ExpressionDescriber expressionDescriber)
                  throws java.io.IOException
Describes this expression with the given describer

Parameters:
expressionDescriber - The describer to use
Throws:
java.io.IOException

and

Expression and(Expression right)
Ands this expression with the right side expression

Parameters:
right - The right side expression
Returns:
An expression equivalent to: this && right

or

Expression or(Expression right)
Ors this expression with the right side expression

Parameters:
right - The right side expression
Returns:
An expression equivalent to: this || right

xor

Expression xor(Expression right)
Xors this expression with the right side expression

Parameters:
right - The right side expression
Returns:
An expression equivalent to: this ^ right


Copyright © 2005-2009 Agical AB. All Rights Reserved.