class SpotRateScaling implements StructureManipulator<Double>, ImmutableBean {

  @Override
  public Double execute(Double spotRate, ValueSpecification valueSpecification, FunctionExecutionContext executionContext) {
    CurrencyPair currencyPair = SimulationUtils.getCurrencyPair(valueSpecification);

    if (_currencyPairs.contains(currencyPair)) {
      return applyScaling(spotRate);
    } else if (_currencyPairs.contains(currencyPair.inverse())) {
      double inverseRate = 1 / spotRate;
      double scaledRate = applyScaling(inverseRate);
      return 1 / scaledRate;
    } else {
      throw new IllegalArgumentException("Currency pair " + currencyPair + " shouldn't match " + _currencyPairs);
    }
  }

    SpotRateScaling(Number scalingFactor,
                                Number minRate,
                                Number maxRate,
                                CurrencyPair currencyPair);
    SpotRateScaling(Number scalingFactor, Set<CurrencyPair> currencyPairs);
  private  SpotRateScaling(
      Double scalingFactor,
      double minRate,
      double maxRate,
      Set<CurrencyPair> currencyPairs);

}