/libcore/ojluni/src/main/java/java/util/ |
H A D | Formattable.java | 57 * public void formatTo(Formatter fmt, int f, int width, int precision) { 65 * boolean usesymbol = alternate || (precision != -1 && precision < 10); 68 * // apply precision 69 * if (precision == -1 || out.length() < precision) { 73 * sb.append(out.substring(0, precision - 1)).append('*'); 149 * @param precision 151 * The precision is applied before the width, thus the output will 152 * be truncated to <tt>precision</t 163 formatTo(Formatter formatter, int flags, int width, int precision) argument [all...] |
H A D | Formatter.java | 90 * // locale-specific formatting of numbers. The precision and width can be 176 * %[argument_index$][flags][width][.precision]conversion 189 * <p> The optional <i>precision</i> is a non-negative decimal integer usually 335 * decimal format, depending on the precision and the value after rounding. 617 * <p> For general argument types, the precision is the maximum number of 621 * {@code 'f'} the precision is the number of digits after the decimal 623 * precision is the total number of digits in the resulting magnitude after 625 * precision must not be specified. 628 * and line separator conversions, the precision is not applicable; if a 629 * precision i 2544 private String precision; field in class:Formatter.FormatSpecifierParser 2658 private int precision; field in class:Formatter.FormatSpecifier 2708 private int precision(String s) { method in class:Formatter.FormatSpecifier 2722 int precision() { method in class:Formatter.FormatSpecifier 3292 print(StringBuilder sb, double value, Locale l, Flags f, char c, int precision, boolean neg) argument 3610 print(StringBuilder sb, BigDecimal value, Locale l, Flags f, char c, int precision, boolean neg) argument [all...] |
/libcore/luni/src/main/java/java/math/ |
H A D | MathContext.java | 27 * precision for the numerical operations provided by class {@link BigDecimal}. 34 * decimal precision format: 34 digit precision and 41 * precision format: 7 digit precision and {@link RoundingMode#HALF_EVEN} 48 * precision format: 16 digit precision and {@link RoundingMode#HALF_EVEN} 54 * A {@code MathContext} for unlimited precision with 61 * this precision. 63 private final int precision; field in class:MathContext 82 MathContext(int precision) argument 101 MathContext(int precision, RoundingMode roundingMode) argument [all...] |
H A D | BigDecimal.java | 28 * An immutable arbitrary-precision signed decimal. 30 * <p>A value is represented by an arbitrary-precision "unscaled value" and a signed 32-bit "scale", 212 * The arbitrary precision integer (unscaled value) in the internal 228 * precision is calculated the first time, and used in the following calls 229 * of method <code>precision()</code>. Note that some call to the private 232 * @see #precision() 235 private transient int precision = 0; field in class:BigDecimal 363 * rounding mode and precision for the result of this operation. 369 * if {@code mc.precision > 0} and {@code mc.roundingMode == 371 * within the given precision withou 1783 public int precision() { method in class:BigDecimal [all...] |
/libcore/ojluni/src/main/java/javax/sql/ |
H A D | RowSetMetaData.java | 180 * @param precision the total number of decimal digits 183 void setPrecision(int columnIndex, int precision) throws SQLException; argument
|
/libcore/ojluni/src/main/java/sun/misc/ |
H A D | FormattedFloatingDecimal.java | 45 int precision; // number of digits to the right of decimal field in class:FormattedFloatingDecimal 51 private FormattedFloatingDecimal( boolean negSign, int decExponent, char []digits, int n, boolean e, int precision, Form form ) argument 58 this.precision = precision; 423 // rounds at a particular precision. 434 // only one digit (0 or 1) is returned because the precision 472 public FormattedFloatingDecimal( double d, int precision, Form form ) argument 479 this.precision = precision; 539 public FormattedFloatingDecimal( float f, int precision, For argument [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
H A D | FormatterTest.java | 80 int precision) throws IllegalFormatException { 83 + width + " PRECISION: " + precision); 86 + width + " precision: " + precision); 852 * java.util.Formatter#format(String, Object...) for precision 1120 // If i is '.', s can also be interpreted as an illegal precision. 1228 { new MockFormattable(), "%2.3s", "customized format function width: 2 precision: 3", }, 1229 { new MockFormattable(), "%-6.4s", "customized format function width: 6 precision: 4", }, 1230 { new MockFormattable(), "%.5s", "customized format function width: -1 precision: 5", }, 1335 "customized format function width: -1 precision 79 formatTo(Formatter formatter, int flags, int width, int precision) argument [all...] |