| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| UnaryFunctor |
|
| 0.0;0 |
| 1 | /* | |
| 2 | Copyright 2004-2008 Paul R. Holser, Jr. All rights reserved. | |
| 3 | Licensed under the Academic Free License version 3.0 | |
| 4 | */ | |
| 5 | ||
| 6 | package jaggregate; | |
| 7 | ||
| 8 | /** | |
| 9 | * Interface for a functor that accepts one argument. | |
| 10 | * <p/> | |
| 11 | * This interface was extracted from {@link UnaryFunctor} and methods using it | |
| 12 | * retrofitted to use this interface, to allow BGGA-style closures to be converted to an | |
| 13 | * interface type representing the functor. | |
| 14 | * | |
| 15 | * @param <A> a constraint on the allowable types for the functor's argument | |
| 16 | * @param <R> a constraint on the allowable types for the functor's return value | |
| 17 | * @author <a href="mailto:pholser@alumni.rice.edu">Paul Holser</a> | |
| 18 | * @version $Id: UnaryFunctor.java,v 1.3 2008/05/12 00:23:14 pholser Exp $ | |
| 19 | * @since 3.3 | |
| 20 | */ | |
| 21 | public interface UnaryFunctor<A, R> { | |
| 22 | /** | |
| 23 | * Evaluates this functor against the given target. | |
| 24 | * | |
| 25 | * @param argument the argument to the functor | |
| 26 | * @return the result of the evaluation | |
| 27 | */ | |
| 28 | R evaluate( A argument ); | |
| 29 | } |