code: public Collection<Class<? extends MonetaryAmount>> getAmountTypes(MonetaryAmountFactoryQuery query) {
          Collection<MonetaryAmountFactory<? extends MonetaryAmount>> factories = getAmountFactories(query);
          Set<Class<? extends MonetaryAmount>> result = new HashSet<>();
          for(MonetaryAmountFactory f:factories){
              //noinspection unchecked
              result.add(f.getAmountType());
          }
          return result;
      }
docs: Executes the query and returns the {@link javax.money.MonetaryAmount} implementation types found.
  
  @param query the factory query, not null.
  @return the type found, or null.