code: public MonetaryRounding getRounding(RoundingQuery query) {
          Collection<MonetaryRounding> roundings = getRoundings(query);
          if (roundings.isEmpty()) {
              return null;
          }
          return roundings.iterator().next();
      }
docs: Query a specific rounding with the given query. If multiple roundings match the query the first one is
  selected, since the query allows to determine the providers and their ordering by setting {@link
  javax.money.RoundingQuery#getProviderNames()}.
  
  @param query the rounding query, not null.
  @return the rounding found, or null, if no rounding matches the query.