1/* 2 * Copyright (c) 2016 Mockito contributors 3 * This program is made available under the terms of the MIT License. 4 */ 5package org.mockito.internal.invocation; 6 7import org.mockito.ArgumentMatcher; 8 9public interface ArgumentMatcherAction { 10 /** 11 * Implementations must apply the given matcher to the argument and return 12 * <code>true</code> if the operation was successful or <code>false</code> 13 * if not. In this case no more matchers and arguments will be passed by 14 * {@link MatcherApplicationStrategy#forEachMatcherAndArgument(ArgumentMatcherAction)} to this method. 15 * . 16 * 17 * @param matcher 18 * to process the argument, never <code>null</code> 19 * @param argument 20 * to be processed by the matcher, can be <code>null</code> 21 * @return 22 * <ul> 23 * <li><code>true</code> if the <b>matcher</b> was successfully 24 * applied to the <b>argument</b> and the next pair of matcher and 25 * argument should be passed 26 * <li><code>false</code> otherwise 27 * </ul> 28 * 29 * 30 */ 31 boolean apply(ArgumentMatcher<?> matcher, Object argument); 32} 33