code: public Set<CurrencyUnit> getCurrencies(CurrencyQuery currencyQuery){
          Set<CurrencyUnit> result = new HashSet<>();
          if(!currencyQuery.getCurrencyCodes().isEmpty()) {
              for (String code : currencyQuery.getCurrencyCodes()) {
                  CurrencyUnit cu = CACHED.get(code);
                  if (cu != null) {
                      result.add(cu);
                  }
              }
              return result;
          }
          if(!currencyQuery.getCountries().isEmpty()) {
              for (Locale country : currencyQuery.getCountries()) {
                  CurrencyUnit cu = getCurrencyUnit(country);
                  if (cu != null) {
                      result.add(cu);
                  }
              }
              return result;
          }
          if(!currencyQuery.getNumericCodes().isEmpty()) {
              for (Integer numCode : currencyQuery.getNumericCodes()) {
                  List<CurrencyUnit> cus = getCurrencyUnits(numCode);
                  result.addAll(cus);
              }
              return result;
          }
          // No constraints defined, return all.
          result.addAll(CACHED.values());
          return result;
      }
docs: Return a {@link CurrencyUnit} instances matching the given
  {@link javax.money.CurrencyContext}.
  
  @param currencyQuery the {@link javax.money.CurrencyContext} containing the parameters determining the query. not null.
  @return the corresponding {@link CurrencyUnit}, or null, if no such unit
  is provided by this provider.