class GeneratorPriceIndexCurveInterpolatedAnchor extends GeneratorPriceIndexCurve {

  @Override
  public GeneratorPriceIndexCurve finalGenerator(final Object data) {
    ArgumentChecker.isTrue(data instanceof InstrumentDerivative[], "data should be an array of InstrumentDerivative");
    final InstrumentDerivative[] instruments = (InstrumentDerivative[]) data;
    final double[] node = new double[instruments.length];
    for (int loopins = 0; loopins < instruments.length; loopins++) {
      node[loopins] = instruments[loopins].accept(_nodeTimeCalculator);
    }
    return new GeneratorPriceIndexCurveInterpolatedAnchorNode(node, _interpolator, _anchorNode, _anchorValue);
  }

  public  GeneratorPriceIndexCurveInterpolatedAnchor(
      final InstrumentDerivativeVisitorAdapter<Object, Double> nodeTimeCalculator, final Interpolator1D interpolator,
      final double anchorNode, final double anchorValue);

}