@Override protected String doBackward(Double value) { return value.toString(); }
/** * Create a new {@code MediaType} for the given type, subtype, and quality value. * @param type the primary type * @param subtype the subtype * @param qualityValue the quality value * @throws IllegalArgumentException if any of the parameters contain illegal characters */ public MediaType(String type, String subtype, double qualityValue) { this(type, subtype, Collections.singletonMap(PARAM_QUALITY_FACTOR, Double.toString(qualityValue))); }
/** * Returns the String representation of the current value. * * @return the String representation of the current value */ public String toString() { return Double.toString(get()); }
public void arrayd(double... vargs) { s = ""; if (vargs != null) { s = ""; for (double v: vargs) { this.s += Double.toString(v); } } }
public String printDouble(Double d) { return d.toString(); }
/** Appends the string representation of the specified {@code double} value. The {@code double} value is converted to a string * according to the rule defined by {@link String#valueOf(double)}. * * @param d the {@code double} value to append. * @return this builder. * @see String#valueOf(double) */ public StringBuilder append (double d) { append0(Double.toString(d)); return this; }
/** Inserts the string representation of the specified {@code double} value at the specified {@code offset}. The {@code double} * value is converted to a String according to the rule defined by {@link String#valueOf(double)}. * * @param offset the index to insert at. * @param d the {@code double} value to insert. * @return this builder. * @throws StringIndexOutOfBoundsException if {@code offset} is negative or greater than the current {@code length()}. * @see String#valueOf(double) */ public StringBuilder insert (int offset, double d) { insert0(offset, Double.toString(d)); return this; }
/** Appends the string representation of the specified {@code double} value. The {@code double} value is converted to a string * according to the rule defined by {@link String#valueOf(double)}. * * @param d the {@code double} value to append. * @return this builder. * @see String#valueOf(double) */ public StringBuilder append (double d) { append0(Double.toString(d)); return this; }
/** Inserts the string representation of the specified {@code double} value at the specified {@code offset}. The {@code double} * value is converted to a String according to the rule defined by {@link String#valueOf(double)}. * * @param offset the index to insert at. * @param d the {@code double} value to insert. * @return this builder. * @throws StringIndexOutOfBoundsException if {@code offset} is negative or greater than the current {@code length()}. * @see String#valueOf(double) */ public StringBuilder insert (int offset, double d) { insert0(offset, Double.toString(d)); return this; }
/** * Returns the String representation of the current value. * * @return the String representation of the current value */ public String toString() { return Double.toString(get()); }
@Override State next(int ch) { _value = 256 * _value + (ch & 0xff); if (++_length == 8) { Double value = Double.longBitsToDouble(_value); if (_next.isShift(value)) return _next.shift(value); else { printObject(value.toString()); return _next; } } else return this; } }
@Override State next(int ch) { if (_isFirst) _value = (byte) ch; else _value = 256 * _value + (ch & 0xff); _isFirst = false; if (++_length == 4) { Double value = new Double(_value); if (_next.isShift(value)) return _next.shift(value); else { printObject(value.toString()); return _next; } } else return this; } }
@Override public boolean visit(OracleBinaryDoubleExpr x) { print0(x.getValue().toString()); print('D'); return false; }
public boolean visit(OracleBinaryDoubleExpr x) { print0(x.getValue().toString()); print('D'); return false; }
@Override State next(int ch) { _value = 256 * _value + (ch & 0xff); if (++_length == 4) { Double value = 0.001 * _value; if (_next.isShift(value)) return _next.shift(value); else { printObject(value.toString()); return _next; } } else return this; } }
@Override public void setDouble(int parameterIndex, double x) throws SQLException { checkOpen(); setParameter(parameterIndex, formatLiteral("DOUBLE", Double.toString(x))); }
@GwtIncompatible // Doubles.tryParse public void testTryParseOfToStringIsOriginal() { for (double d : NUMBERS) { checkTryParse(d, Double.toString(d)); } }
@ScalarFunction @SqlType("varchar(41)") public static Slice render(@SqlType(StandardTypes.DOUBLE) double value, @SqlType(ColorType.NAME) long color) { return render(utf8Slice(Double.toString(value)), color); }
@Override public Result apply(SampleNode sample, Captures captures, Context context) { return Result.ofPlanNode(new FilterNode( sample.getId(), sample.getSource(), new ComparisonExpression( ComparisonExpression.Operator.LESS_THAN, new FunctionCall(QualifiedName.of("rand"), ImmutableList.of()), new DoubleLiteral(Double.toString(sample.getSampleRatio()))))); } }
/** toString returns current value */ public void testToString() { AtomicDouble at = new AtomicDouble(); assertEquals("0.0", at.toString()); for (double x : VALUES) { at.set(x); assertEquals(Double.toString(x), at.toString()); } }