0N/A/*
3261N/A * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/Apackage java.util;
0N/A
0N/A/**
0N/A * FomattableFlags are passed to the {@link Formattable#formatTo
0N/A * Formattable.formatTo()} method and modify the output format for {@linkplain
0N/A * Formattable Formattables}. Implementations of {@link Formattable} are
0N/A * responsible for interpreting and validating any flags.
0N/A *
0N/A * @since 1.5
0N/A */
0N/Apublic class FormattableFlags {
0N/A
0N/A // Explicit instantiation of this class is prohibited.
0N/A private FormattableFlags() {}
0N/A
0N/A /**
0N/A * Left-justifies the output. Spaces (<tt>'&#92;u0020'</tt>) will be added
0N/A * at the end of the converted value as required to fill the minimum width
0N/A * of the field. If this flag is not set then the output will be
0N/A * right-justified.
0N/A *
0N/A * <p> This flag corresponds to <tt>'-'</tt> (<tt>'&#92;u002d'</tt>) in
0N/A * the format specifier.
0N/A */
0N/A public static final int LEFT_JUSTIFY = 1<<0; // '-'
0N/A
0N/A /**
0N/A * Converts the output to upper case according to the rules of the
0N/A * {@linkplain java.util.Locale locale} given during creation of the
0N/A * <tt>formatter</tt> argument of the {@link Formattable#formatTo
0N/A * formatTo()} method. The output should be equivalent the following
0N/A * invocation of {@link String#toUpperCase(java.util.Locale)}
0N/A *
0N/A * <pre>
0N/A * out.toUpperCase() </pre>
0N/A *
3228N/A * <p> This flag corresponds to <tt>'S'</tt> (<tt>'&#92;u0053'</tt>) in
0N/A * the format specifier.
0N/A */
3228N/A public static final int UPPERCASE = 1<<1; // 'S'
0N/A
0N/A /**
0N/A * Requires the output to use an alternate form. The definition of the
0N/A * form is specified by the <tt>Formattable</tt>.
0N/A *
0N/A * <p> This flag corresponds to <tt>'#'</tt> (<tt>'&#92;u0023'</tt>) in
0N/A * the format specifier.
0N/A */
0N/A public static final int ALTERNATE = 1<<2; // '#'
0N/A}