edu.rice.cs.cunit.util
Class ILambda.Binary.Bind2nd<R,P,Q>
java.lang.Object
edu.rice.cs.cunit.util.ILambda.Binary.Bind2nd<R,P,Q>
- All Implemented Interfaces:
- ILambda<R,P>
- Direct Known Subclasses:
- ILambda.Ternary.Bind2nd3rd
- Enclosing interface:
- ILambda.Binary<R,P,Q>
public static class ILambda.Binary.Bind2nd<R,P,Q>
- extends java.lang.Object
- implements ILambda<R,P>
Unary decorator for a binary lambda that binds a constant to its second 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(P 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 Q _constant
- The constant second argument.
_decoree
private ILambda.Binary<R,P,Q> _decoree
- The binary lambda that is decorated.
ILambda.Binary.Bind2nd
public ILambda.Binary.Bind2nd(ILambda.Binary<R,P,Q> decoree,
Q constant)
- Create a new unary decorator for a binary lambda, binding a constant to its second parameter.
- Parameters:
decoree
- binary lambdaconstant
- constant for the binary lambda's second parameter
apply
public R apply(P param)
- Apply the unary decorator, i.e. apply the parameter and the constant to the binary lambda.
- Specified by:
apply
in interface ILambda<R,P>
- Parameters:
param
- argument for the binary lambda's first parameter
- Returns:
- return value of the binary lambda