jaggregate
Class BinaryFunction<A1,A2,R>
java.lang.Object
jaggregate.BinaryFunction<A1,A2,R>
- Type Parameters:
A1
- a constraint on the allowable types for the functor's first argumentA2
- a constraint on the allowable types for the functor's second argumentR
- a constraint on the allowable types for the functor's return value
- All Implemented Interfaces:
- BinaryFunctor<A1,A2,R>
public abstract class BinaryFunction<A1,A2,R>
- extends Object
- implements BinaryFunctor<A1,A2,R>
A functor that accepts two arguments.
- Version:
- $Id: BinaryFunction.java,v 1.5 2008/10/03 19:01:23 pholser Exp $
- Author:
- Paul Holser
Method Summary |
UnaryFunction<A2,R> |
bindFirst(A1 boundArgument)
Answers a functor of one argument that evaluates in the same manner as this
functor would if evaluated using a fixed first argument and another argument. |
UnaryFunction<A1,R> |
bindSecond(A2 boundArgument)
Answers a functor of one argument that evaluates in the same manner as this
functor would if evaluated using a fixed second argument and another argument. |
bindFirst
public final UnaryFunction<A2,R> bindFirst(A1 boundArgument)
- Answers a functor of one argument that evaluates in the same manner as this
functor would if evaluated using a fixed first argument and another argument.
- Parameters:
boundArgument
- the fixed argument used as the first argument to this
functor's evaluate
method
- Returns:
- a functor that accepts one argument, of the same type as this functor's
second argument type, that behaves as this functor would if always evaluated
using
boundArgument
as the first argument
bindSecond
public final UnaryFunction<A1,R> bindSecond(A2 boundArgument)
- Answers a functor of one argument that evaluates in the same manner as this
functor would if evaluated using a fixed second argument and another argument.
- Parameters:
boundArgument
- the fixed argument used as the second argument to this
functor's evaluate
method
- Returns:
- a functor that accepts one argument, of the same type as this functor's
first argument type, that behaves as this functor would if always evaluated
using
boundArgument
as the second argument
© Copyright 2004-2008 Paul R. Holser, Jr. All rights reserved.
Licensed under the Academic Free License version 3.0.
pholser@alumni.rice.edu