Searched refs:width (Results 1 - 12 of 12) sorted by relevance

/libcore/ojluni/src/main/java/java/util/
H A DFormattable.java57 * public void formatTo(Formatter fmt, int f, int width, int precision) {
76 * // apply width and justification
78 * if (len < width)
79 * for (int i = 0; i < width - len; i++)
139 * @param width
142 * <tt>width</tt> then the output will be padded by
144 * equals width. The padding is at the beginning by default. If
146 * padding will be at the end. If <tt>width</tt> is <tt>-1</tt>
151 * The precision is applied before the width, thus the output will
153 * <tt>width</t
163 formatTo(Formatter formatter, int flags, int width, int precision) argument
[all...]
H A DFormatter.java97 * // locale-specific formatting of numbers. The precision and width can be
183 * %[argument_index$][flags][width][.precision]conversion
193 * <p> The optional <i>width</i> is a positive decimal integer indicating
208 * %[argument_index$][flags][width]conversion
211 * <p> The optional <i>argument_index</i>, <i>flags</i> and <i>width</i> are
224 * %[flags][width]conversion
227 * <p> The optional <i>flags</i> and <i>width</i> is defined as above.
620 * <p> The width is the minimum number of characters to be written to the
621 * output. For the line separator conversion, width is not applicable; if it
671 * <p> If the format specifier contains a width o
2576 private String width; field in class:Formatter.FormatSpecifierParser
2704 private int width; field in class:Formatter.FormatSpecifier
2739 private int width(String s) { method in class:Formatter.FormatSpecifier
2753 int width() { method in class:Formatter.FormatSpecifier
3907 adjustWidth(int width, Flags f, boolean neg) argument
4414 localizedMagnitude(StringBuilder sb, long value, Flags f, int width, Locale l) argument
4422 localizedMagnitude(StringBuilder sb, char[] value, Flags f, int width, Locale l) argument
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
H A DIllegalFormatWidthExceptionTest.java32 int width = Integer.MAX_VALUE;
34 width);
35 assertEquals(width, illegalFormatWidthException.getWidth());
43 int width = 12345;
45 width);
46 assertEquals(width, illegalFormatWidthException.getWidth());
54 int width = 12345;
56 width);
H A DFormatterTest.java79 public void formatTo(Formatter formatter, int flags, int width, argument
83 + width + " PRECISION: " + precision);
85 formatter.format("customized format function" + " width: "
86 + width + " precision: " + precision);
830 * java.util.Formatter#format(String, Object...) for width
1063 * spaces till the whole string is 4 chars width.
1072 * 4 chars width.
1111 // They are characters used as flags, width or conversions
1228 { new MockFormattable(), "%2.3s", "customized format function width: 2 precision: 3", },
1229 { new MockFormattable(), "%-6.4s", "customized format function width
[all...]
/libcore/ojluni/src/main/java/sun/util/calendar/
H A DCalendarUtils.java154 * Mimics sprintf(buf, "%0*d", decaimal, width).
156 public static final StringBuilder sprintf0d(StringBuilder sb, int value, int width) { argument
161 --width;
164 for (int i = 2; i < width; i++) {
167 for (int i = 1; i < width && d < n; i++) {
175 public static final StringBuffer sprintf0d(StringBuffer sb, int value, int width) { argument
180 --width;
183 for (int i = 2; i < width; i++) {
186 for (int i = 1; i < width && d < n; i++) {
/libcore/ojluni/src/main/java/sun/util/locale/provider/
H A DCalendarDataUtility.java162 int width = toWidth(style);
166 return symbols.getMonths(context, width);
168 switch (width) {
176 throw new UnsupportedOperationException("Unknown width: " + width);
179 return symbols.getWeekdays(context, width);
193 * Transform a {@link Calendar} style constant into an ICU width value.
/libcore/ojluni/src/test/java/time/test/java/time/format/
H A DTestReducedParser.java99 private DateTimeFormatter getFormatter0(TemporalField field, int width, int baseValue) { argument
100 return builder.appendValueReduced(field, width, width, baseValue).toFormatter(locale).withDecimalStyle(decimalStyle);
121 public void test_parse_error(TemporalField field, int width, int baseValue, String text, int pos, Class<?> expected) { argument
123 getFormatter0(field, width, baseValue).parseUnresolved(text, new ParsePosition(pos));
139 // The data is the ChronoField, width, baseValue, text, startPos, endPos, value
186 public void test_parseAllStrict(TemporalField field, int width, int baseValue, String input, int pos, int parseLen, Integer parseVal) { argument
189 TemporalAccessor parsed = getFormatter0(field, width, baseValue).parseUnresolved(input, ppos);
200 public void test_parseAllLenient(TemporalField field, int width, int baseValue, String input, int pos, int parseLen, Integer parseVal) { argument
203 TemporalAccessor parsed = getFormatter0(field, width, baseValu
[all...]
H A DTestReducedPrinter.java83 private DateTimeFormatter getFormatter0(TemporalField field, int width, int baseValue) { argument
84 return builder.appendValueReduced(field, width, width, baseValue).toFormatter(locale).withDecimalStyle(decimalStyle);
/libcore/luni/src/test/java/libcore/java/util/
H A DOldFormatterTest.java32 public void formatTo(Formatter formatter, int flags, int width, int precision) throws IllegalFormatException {
41 public void formatTo(Formatter formatter, int flags, int width, int precision) throws IllegalFormatException {
/libcore/ojluni/src/main/java/java/time/format/
H A DDateTimeFormatterBuilder.java182 * The width to pad the next field to.
190 * The index of the last variable width value parser.
382 * The parser for a variable width value such as this normally behaves greedily,
398 * width, zero-padded approach.
404 * means that it cannot be printed within the width then an exception is thrown.
408 * This technique solves the problem where a value, variable or fixed width, is followed by one or more
410 * steal the digits that are needed by the fixed width value parsers that follow the
411 * variable width one.
416 * call or calls on the same builder are for a fixed width value, then the parser will reserve
417 * space so that the fixed width value
444 appendValue(TemporalField field, int width) argument
546 appendValueReduced(TemporalField field, int width, int maxWidth, int baseValue) argument
606 appendValueReduced( TemporalField field, int width, int maxWidth, ChronoLocalDate baseDate) argument
[all...]
/libcore/ojluni/src/main/java/java/text/
H A DSimpleDateFormat.java2364 int width = pos.getIndex() - parseStart;
2365 final double divisor = Math.pow(10, width);
/libcore/benchmarks/src/benchmarks/regression/
H A DR.java2483 public static final int width = 0; field in class:R

Completed in 1835 milliseconds