- This prevents the parameter from being reassigned but does not make it immutable
- It is mandatory to make the parameter available to anonymous inner classes
UnaryOperator bind ( final BinaryOperator binOp, final Object boundLeftArg) {See: http://c2.com/cgi/wiki?JavaFinalArguments
return new UnaryOperator() {
public Object apply(Object arg) {
return binOp.apply(boundleftArg, arg);
}
};
}
No comments:
Post a Comment