|
| 1 | +/** |
| 2 | + * Copyright (c) 2012, 2014, Credit Suisse (Anatole Tresch), Werner Keil and others by the @author tag. |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| 5 | + * use this file except in compliance with the License. You may obtain a copy of |
| 6 | + * the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 12 | + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 13 | + * License for the specific language governing permissions and limitations under |
| 14 | + * the License. |
| 15 | + */ |
| 16 | +package org.javamoney.moneta.format; |
| 17 | + |
| 18 | +/** |
| 19 | + * Class holding constants for passing additional parameters to {@link javax.money.MonetaryAmountFactoryQuery} |
| 20 | + * instances for configuring {@link javax.money.format.MonetaryAmountFormat} instances to be accessed. |
| 21 | + */ |
| 22 | +public final class AmountFormatParams { |
| 23 | + |
| 24 | + /** |
| 25 | + * Non instantiatable class. |
| 26 | + */ |
| 27 | + private AmountFormatParams() { |
| 28 | + } |
| 29 | + |
| 30 | + /** |
| 31 | + * Allows to pass a pattern as defined by {@link java.text.DecimalFormat}. |
| 32 | + */ |
| 33 | + public static final String PATTERN = "pattern"; |
| 34 | + |
| 35 | + /** |
| 36 | + * Allows to define the grouping sizes of the number groups as {@code int[]}, hereby starting from the decimal point. |
| 37 | + * So {@code 2, 2, 3} will format the number {@code 1234567890} as {@code 123.456.78.90}, assuming '.' as the only |
| 38 | + * grouping char. The grouping chars used can be similarly adapted/combined, see #GROUPING_GROUPING_SEPARATORS. |
| 39 | + */ |
| 40 | + public static final String GROUPING_SIZES = "groupingSizes"; |
| 41 | + |
| 42 | + /** |
| 43 | + * Allows to define the grouping characters of a number groups as {@code char[]}, hereby starting from the decimal point. |
| 44 | + * So {@code '''',':','.'} will format the number {@code 1234567890} as {@code 1'234:567.890}, assuming 3 as the only |
| 45 | + * grouping size. The grouping sizes used can be similarly adapted/combined, see #GROUPING_SIZES. |
| 46 | + */ |
| 47 | + public static final String GROUPING_GROUPING_SEPARATORS = "groupingSeparators"; |
| 48 | +} |
0 commit comments