com.agical.rmock.core.match.constraint
Class AbstractConstraint

java.lang.Object
  extended by com.agical.rmock.core.match.operator.AbstractExpression
      extended by com.agical.rmock.core.match.constraint.AbstractConstraint
All Implemented Interfaces:
Constraint, Expression
Direct Known Subclasses:
AnythingConstraint, ClassAssignableToConstraint, ClassIsAbstractConstraint, ClassNameConstraint, ContainsConstraint, EndsWithConstraint, EqualsConstraint, GreaterThanConstraint, GreaterThanOrEqualConstraint, InstanceOfConstraint, IsFalseConstraint, IsNullConstraint, IsTrueConstraint, LessThanConstraint, LessThanOrEqualConstraint, MethodNameConstraint, MethodParameterTypesConstraint, SameConstraint, StartsWithConstraint

public abstract class AbstractConstraint
extends AbstractExpression
implements Constraint

(c) Agical AB 2005

Author:
joakim.ohlrogge

Constructor Summary
AbstractConstraint(String name, Object reference)
           
 
Method Summary
 void describeWith(ExpressionDescriber constraintDescriber)
          Describes this expression with the given describer
 boolean equals(Object other)
           
 String getName()
          returns the name of this constraint
 Reference getReference()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class com.agical.rmock.core.match.operator.AbstractExpression
and, or, xor
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.agical.rmock.core.match.Expression
and, or, passes, xor
 

Constructor Detail

AbstractConstraint

public AbstractConstraint(String name,
                          Object reference)
Method Detail

getName

public String getName()
Description copied from interface: Constraint
returns the name of this constraint

Specified by:
getName in interface Constraint
See Also:
Constraint.getName()

getReference

public Reference getReference()
Specified by:
getReference in interface Constraint
Returns:
the object that this contraint uses as reference. Null if this constraint does not have a reference.
See Also:
Constraint.getReference()

describeWith

public void describeWith(ExpressionDescriber constraintDescriber)
                  throws IOException
Description copied from interface: Expression
Describes this expression with the given describer

Specified by:
describeWith in interface Expression
Parameters:
constraintDescriber - The describer to use
Throws:
IOException
See Also:
Constraint#describeTo(ExpressionDescriber)

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object other)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


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