@Override public boolean canApplyTo( final FunctionCompilationContext context, final ComputationTarget target) { final UnorderedCurrencyPair ccy = (UnorderedCurrencyPair) target.getValue(); String currencyPair = ccy.getFirstCurrency().getCode() + ccy.getSecondCurrency().getCode(); if (getAllCurrencyPairs().contains(currencyPair)) { return true; } currencyPair = ccy.getSecondCurrency().getCode() + ccy.getFirstCurrency().getCode(); return getAllCurrencyPairs().contains(currencyPair); }