001/**
002 * Copyright (c) 2012, 2015, Credit Suisse (Anatole Tresch), Werner Keil and others by the @author tag.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
005 * use this file except in compliance with the License. You may obtain a copy of
006 * the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
012 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
013 * License for the specific language governing permissions and limitations under
014 * the License.
015 */
016package org.javamoney.moneta.format;
017
018/**
019 * Class holding constants for passing additional parameters to {@link javax.money.MonetaryAmountFactoryQuery}
020 * instances for configuring {@link javax.money.format.MonetaryAmountFormat} instances to be accessed.
021 */
022public final class AmountFormatParams {
023
024    /**
025     * Non instantiatable class.
026     */
027    private AmountFormatParams() {
028    }
029
030    /**
031     * Allows to pass a pattern as defined by {@link java.text.DecimalFormat}.
032     */
033    public static final String PATTERN = "pattern";
034
035    /**
036     * Allows to define the grouping sizes of the number groups as {@code int[]}, hereby starting from the decimal point.
037     * So {@code 2, 2, 3} will format the number {@code 1234567890} as {@code 123.456.78.90}, assuming '.' as the only
038     * grouping char. The grouping chars used can be similarly adapted/combined, see #GROUPING_GROUPING_SEPARATORS.
039     */
040    public static final String GROUPING_SIZES = "groupingSizes";
041
042    /**
043     * Allows to define the grouping characters of a number groups as {@code char[]}, hereby starting from the decimal point.
044     * So {@code '''',':','.'} will format the number {@code 1234567890} as {@code 1'234:567.890}, assuming 3 as the only
045     * grouping size. The grouping sizes used can be similarly adapted/combined, see #GROUPING_SIZES.
046     */
047    public static final String GROUPING_GROUPING_SEPARATORS = "groupingSeparators";
048}