class CurrencyPairs implements Bean, UniqueIdentifiable, MutableUniqueIdentifiable {

  public CurrencyPair getCurrencyPair(final Currency currency1, final Currency currency2) {
    ArgumentChecker.notNull(currency1, "currency1");
    ArgumentChecker.notNull(currency2, "currency2");
    final CurrencyPair pair = CurrencyPair.of(currency1, currency2);
    if (_pairs.contains(pair)) {
      return pair;
    }
    final CurrencyPair inverse = pair.inverse();
    if (_pairs.contains(inverse)) {
      return inverse;
    }
    return null;
  }

  private  CurrencyPairs();
  private  CurrencyPairs(final Set<CurrencyPair> pairs);

}