edu.rice.cs.cunit.util
Class ILambda.Binary.Bind1st<R,P,Q>
java.lang.Object
edu.rice.cs.cunit.util.ILambda.Binary.Bind1st<R,P,Q>
- All Implemented Interfaces:
- ILambda<R,Q>
- Direct Known Subclasses:
- ILambda.Ternary.Bind1st2nd, ILambda.Ternary.Bind1st3rd
- Enclosing interface:
- ILambda.Binary<R,P,Q>
public static class ILambda.Binary.Bind1st<R,P,Q>
- extends java.lang.Object
- implements ILambda<R,Q>
Unary decorator for a binary lambda that binds a constant to its first parameter.
Nested classes/interfaces inherited from interface edu.rice.cs.cunit.util.ILambda |
ILambda.Binary<R,P,Q>, ILambda.Nary<R,P>, ILambda.NaryAdaptor<R,P>, ILambda.Ternary<R,P,Q,S> |
Method Summary |
R |
apply(Q param)
Apply the unary decorator, i.e. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_constant
private P _constant
- The constant first argument.
_decoree
private ILambda.Binary<R,P,Q> _decoree
- The binary lambda that is decorated.
ILambda.Binary.Bind1st
public ILambda.Binary.Bind1st(ILambda.Binary<R,P,Q> decoree,
P constant)
- Create a new unary decorator for a binary lambda, binding a constant to its first parameter.
- Parameters:
decoree
- binary lambdaconstant
- constant for the binary lambda's first parameter
apply
public R apply(Q param)
- Apply the unary decorator, i.e. apply the constant and the parameter to the binary lambda.
- Specified by:
apply
in interface ILambda<R,Q>
- Parameters:
param
- argument for the binary lambda's second parameter
- Returns:
- return value of the binary lambda