// ------------------------------------------------------------------------- @Override public ResolvedFxSingleBarrierOption resolve(ReferenceData refData) { if (rebate != null) { return ResolvedFxSingleBarrierOption.of(underlyingOption.resolve(refData), barrier, rebate); } return ResolvedFxSingleBarrierOption.of(underlyingOption.resolve(refData), barrier); }
// ------------------------------------------------------------------------- @ImmutableValidator private void validate() { if (rebate != null) { ArgChecker.isTrue(rebate.getAmount() > 0d, "rebate must be positive"); ArgChecker.isTrue( underlyingOption.getUnderlying().getCurrencyPair().contains(rebate.getCurrency()), "The rebate currency must be one of underlying currency pair"); } }
/** * Gets currency pair of the base currency and counter currency. * * <p>This currency pair is conventional, thus indifferent to the direction of FX. * * @return the currency pair */ public CurrencyPair getCurrencyPair() { return underlyingOption.getCurrencyPair(); }