/libcore/ojluni/src/main/java/java/util/ |
H A D | Formattable.java | 57 * 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 D | Formatter.java | 97 * // 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/ojluni/src/main/java/sun/util/calendar/ |
H A D | CalendarUtils.java | 154 * 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/test/java/time/test/java/time/format/ |
H A D | TestReducedPrinter.java | 83 private DateTimeFormatter getFormatter0(TemporalField field, int width, int baseValue) { argument 84 return builder.appendValueReduced(field, width, width, baseValue).toFormatter(locale).withDecimalStyle(decimalStyle);
|
H A D | TestReducedParser.java | 99 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...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
H A D | FormatterTest.java | 80 public void formatTo(Formatter formatter, int flags, int width, argument 84 + width + " PRECISION: " + precision); 86 formatter.format("customized format function" + " width: " 87 + width + " precision: " + precision); 831 * java.util.Formatter#format(String, Object...) for width 1064 * spaces till the whole string is 4 chars width. 1073 * 4 chars width. 1112 // They are characters used as flags, width or conversions 1229 { new MockFormattable(), "%2.3s", "customized format function width: 2 precision: 3", }, 1230 { new MockFormattable(), "%-6.4s", "customized format function width [all...] |
/libcore/ojluni/src/main/java/java/time/format/ |
H A D | DateTimeFormatterBuilder.java | 182 * 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/benchmarks/src/benchmarks/regression/ |
H A D | R.java | 2483 public static final int width = 0; field in class:R
|