net.sourceforge.sqlunit
Interface IMatcher

All Known Implementing Classes:
AllOrNothingMatcher, ExpressionMatcher, ForgivingNullMatcher, PercentageRangeMatcher, RangeMatcher, SignificantDigitsMatcher, TypelessMatcher, TypelessPercentageMatcher

public interface IMatcher

The IMatcher interface specifies the contract that all Matcher objects must fulfil. Classes implementing the IMatcher interface provide the functionality to determine if one object matches the other in some way. Note that all classes implementing the IMatcher interface should have a default no-args constructor.

Version:
$Revision: 1.4 $
Author:
Sujit Pal (spal@users.sourceforge.net)

Method Summary
 boolean isEqual(java.lang.String source, java.lang.String target, java.util.Map args)
          The isEqual method returns a true or false depending on whether the Matcher object determines that the source String matches the target String.
 

Method Detail

isEqual

boolean isEqual(java.lang.String source,
                java.lang.String target,
                java.util.Map args)
                throws SQLUnitException
The isEqual method returns a true or false depending on whether the Matcher object determines that the source String matches the target String. The Matcher uses a map of named arguments supplied to it in the Map args. Each Matcher class may make use of different name value pairs to do this and must document these name-value pairs in the JavaDocs since there is no other place for users of these classes to determine this information other than by looking at the source code. Note that there is no way to enforce that all name value pairs needed by a Matcher are going to be available at runtime, so the Matcher classes should be able to gracefully handle these situations.

Parameters:
source - the String representing the source to be matched.
target - the String representing the target to be matched.
args - a Map of name value pairs of arguments passed in.
Returns:
true if the source and target are equal according to the Matcher.
Throws:
SQLUnitException - if there was a problem.