/** * Creates an hamcrest matcher that is evalued to true if the value of the given argument satisfies * the condition defined by the passed matcher. * @param argument The argument defined using the {@link Lambda#on(Class)} method that has to be matched * @param matcher The matcher against which the value of the given argument has to be compared * @return The hamcrest matcher that is evalued to true if the value of the passed argument matches the given matcher */ public static <T, A> HasArgumentWithValue<T, A> having(A argument, Matcher<?> matcher) { return havingValue(argument, matcher); }
/** * Creates an hamcrest matcher that is evalued to true accordingly to the value of the passed argument * @param argument The boolean argument defined using the {@link Lambda#on(Class)} method that has to be matched * @return The hamcrest matcher that is evalued to true accordingly to the value of the passed argument */ public static <T> HasArgumentWithValue<T, Boolean> having(Boolean argument) { return havingValue(argument); }
/** * Creates an hamcrest matcher that is evalued to true accordingly to the value of the passed argument * @param argument The boolean argument defined using the {@link ch.lambdaj.Lambda#on(Class)} method that has to be matched * @return The hamcrest matcher that is evalued to true accordingly to the value of the passed argument */ @Factory public static <T> HasArgumentWithValue<T, Boolean> havingValue(Boolean argument) { return havingValue(argument, BOOLEAN_MATCHER); }