private final class AssetOrNothingPayoffVisitor implements Visitor<Payoff> {
@Override
public void visit(final Payoff o) {
final AssetOrNothingPayoff payoff = (AssetOrNothingPayoff)o;
black.beta = black.dBeta_dD2 = 0.0;
final Option.Type optionType = payoff.optionType();
if (optionType == Option.Type.Call) {
black.alpha = black.cum_d1;
black.dAlpha_dD1 = black.n_d1;
} else if (optionType == Option.Type.Put) {
black.alpha = 1.0 - black.cum_d1;