org.easymock.internal
Class AlwaysMatcher

java.lang.Object
  extended by org.easymock.AbstractMatcher
      extended by org.easymock.internal.AlwaysMatcher
All Implemented Interfaces:
java.io.Serializable, ArgumentsMatcher

public class AlwaysMatcher
extends AbstractMatcher

See Also:
Serialized Form

Constructor Summary
AlwaysMatcher()
           
 
Method Summary
protected  java.lang.String argumentToString(java.lang.Object argument)
          Converts an argument to a String, used by AbstractMatcher.toString(Object[]).
 boolean matches(java.lang.Object[] expected, java.lang.Object[] actual)
          Checks whether an expected argument array matches an actual argument array.
 
Methods inherited from class org.easymock.AbstractMatcher
argumentMatches, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlwaysMatcher

public AlwaysMatcher()
Method Detail

matches

public boolean matches(java.lang.Object[] expected,
                       java.lang.Object[] actual)
Description copied from class: AbstractMatcher
Checks whether an expected argument array matches an actual argument array. This convenience implementation uses argumentMatches(Object, Object) to check whether arguments pairs match. If all the arguments match, true is returned, otherwise false. In two cases, argumentMatches(Object, Object) is not called: If both argument arrays are null, they match; if one and only one is null, they do not match.

Specified by:
matches in interface ArgumentsMatcher
Overrides:
matches in class AbstractMatcher
Parameters:
expected - the expected arguments.
actual - the actual arguments.
Returns:
true if the arguments match, false otherwise.

argumentToString

protected java.lang.String argumentToString(java.lang.Object argument)
Description copied from class: AbstractMatcher
Converts an argument to a String, used by AbstractMatcher.toString(Object[]).

Overrides:
argumentToString in class AbstractMatcher
Parameters:
argument - the argument to convert to a String.
Returns:
a String representation of the argument.