public static BitfinexCurrencyPair register ( final String currency , final String profitCurrency , final double minimalOrderSize ) { final String key = buildCacheKey ( currency , profitCurrency ) ; final BitfinexCurrencyPair newCurrency = new BitfinexCurrencyPair ( currency , profitCurrency , minimalOrderSize ) ; final BitfinexCurrencyPair oldCurrency = instances . putIfAbsent ( key , newCurrency ) ; // The currency was already registered if ( oldCurrency != null ) { throw new IllegalArgumentException ( "The currency " + key + " is already known" ) ; } return newCurrency ; }
Registers currency pair for use within library