Exactly what determines a match is defined by the implementations of this class, some will require exact matches, others will be more lenient.
172173174175176177178179180181182
// Assume that all the actual value matched. boolean matched = true; for (int i = 0; i < expectedValues.length; i++) { ExpectedValue expectedValue = expectedValues[i]; Object actualValue = actualValues[i]; if (!expectedValue.matches(actualValue)) { matched = false; } } if (!matched) {
2930313233343536373839
// fail to match then this method fails immediately, otherwise this // method will succeed. if (values != null) { for (Iterator i = values.iterator(); i.hasNext();) { ExpectedValue value = (ExpectedValue) i.next(); if (value.matches(object)) { return true; } } }
// fail to match then this method fails immediately, otherwise this // method will succeed. if (values != null) { for (Iterator i = values.iterator(); i.hasNext();) { ExpectedValue value = (ExpectedValue) i.next(); if (!value.matches(object)) { return false; } } }