com.agical.rmock.core.match
Interface Multiplicity

All Superinterfaces:
java.lang.Cloneable
All Known Implementing Classes:
MultiplicityFactory.LimitableMultiplicity, MultiplicityImpl

public interface Multiplicity
extends java.lang.Cloneable

(c) Agical AB 2005

Author:
joakim.ohlrogge restricts ability to match based on multiplicity

Method Summary
 boolean canMatch()
          Called to check if this constraint can match given its current state
 java.lang.Object clone()
           
 int getMatchCount()
           
 int getMax()
           
 int getMin()
           
 boolean isSatisfied()
          Indicates if this constraint has been satisfied.
 void match()
          Called to notify the constraint that it has been matched.
 

Method Detail

canMatch

boolean canMatch()
Called to check if this constraint can match given its current state

Returns:
true if this constraint can match

match

void match()
Called to notify the constraint that it has been matched. Even if a multiplicity constraint returns true from its @see Multiplicity#canMatch() method � other constraints may prevent the match from actually being made.


isSatisfied

boolean isSatisfied()
Indicates if this constraint has been satisfied. If a constraint is satisfied at the end of a test no assertion failure will be thrown.

Returns:
true if this constraint is satisfied.

getMin

int getMin()
Returns:
The minimum number of times this constraint has to be matched.

getMax

int getMax()
Returns:
The maximum number of times this constraint has to be matched.

getMatchCount

int getMatchCount()
Returns:
The minimum number of times this constraint has been matched.

clone

java.lang.Object clone()


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