1/* Licensed to the Apache Software Foundation (ASF) under one or more
2 * contributor license agreements.  See the NOTICE file distributed with
3 * this work for additional information regarding copyright ownership.
4 * The ASF licenses this file to You under the Apache License, Version 2.0
5 * (the "License"); you may not use this file except in compliance with
6 * the License.  You may obtain a copy of 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,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package java.util;
17
18/**
19 * FormattableFlags are used as a parameter to
20 * {@link Formattable#formatTo(Formatter, int, int, int)} and change the output
21 * format in {@code Formattable}s. The validation and interpretation of the
22 * flags must be done by the implementations.
23 *
24 * @see Formattable
25 */
26public class FormattableFlags {
27
28    private FormattableFlags(){
29        //prevent this class from being instantiated
30    }
31
32    /**
33     * Denotes the output is to be left-justified. In order to fill the minimum
34     * width requirement, spaces('\u0020') will be appended at the end of the
35     * specified output element. If no such flag is set, the output is
36     * right-justified.
37     *
38     * The flag corresponds to '-' ('\u002d') in the format specifier.
39     */
40    public static final int LEFT_JUSTIFY = 1;
41
42    /**
43     * Denotes the output is to be converted to upper case in the way the locale
44     * parameter of Formatter.formatTo() requires. The output has the same
45     * effect as {@code String.toUpperCase(java.util.Locale)}.
46     *
47     * This flag corresponds to {@code '^' ('\u005e')} in the format specifier.
48     */
49    public static final int UPPERCASE = 2;
50
51    /**
52     * Denotes the output is to be formatted in an alternate form. The definition
53     * of the alternate form is determined by the {@code Formattable}.
54     *
55     * This flag corresponds to {@code '#' ('\u0023')} in the format specifier.
56     */
57    public static final int ALTERNATE = 4;
58}
59