01: /* Licensed to the Apache Software Foundation (ASF) under one or more
02: * contributor license agreements. See the NOTICE file distributed with
03: * this work for additional information regarding copyright ownership.
04: * The ASF licenses this file to You under the Apache License, Version 2.0
05: * (the "License"); you may not use this file except in compliance with
06: * the License. You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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: */
16: package java.util;
17:
18: /**
19: * FormattableFlags are used as a parameter to method Formattable.formatTo() and
20: * instruct the output format in Formattables. The validation and interpretation
21: * are fulfilled by the implementation of Formattable.
22: */
23:
24: public class FormattableFlags {
25:
26: private FormattableFlags() {
27: //prevent this class from being instantiated
28: }
29:
30: /**
31: * Denotes the output to be left-justified. In order to fill the minimum
32: * width requirement, spaces('\u0020') will be appended at the end of the
33: * specified output element. If no such flag is set, the output is
34: * right-justified.
35: *
36: * The flag corresponds to '-' ('\u002d') in the format specifier.
37: */
38: public static final int LEFT_JUSTIFY = 1;
39:
40: /**
41: * Denotes the output to be converted to upper case in the way the locale
42: * parameter of Formatter.formatTo() requires. The output has the same
43: * effect as String.toUpperCase(java.util.Locale).
44: *
45: * This flag corresponds to '^' ('\u005e') in the format specifier.
46: */
47: public static final int UPPERCASE = 2;
48:
49: /**
50: * Denotes the output to be formatted in an alternate form. The definition
51: * of the alternate form is given out by Formattable.
52: *
53: * This flag corresponds to '#' ('\u0023') in the format specifier.
54: */
55: public static final int ALTERNATE = 4;
56: }
|