@Override protected String doBackward(Float value) { return value.toString(); }
@Override public Preferences putFloat (String key, float val) { properties.put(key, Float.toString(val)); return this; }
@Override public Preferences putFloat (String key, float val) { properties.put(key, Float.toString(val)); return this; }
@Override public Preferences putFloat (String key, float val) { properties.put(key, Float.toString(val)); return this; }
@Override public Preferences putFloat (String key, float val) { properties.put(key, Float.toString(val)); return this; }
@Override public Preferences putFloat (String key, float val) { properties.put(key, Float.toString(val)); return this; }
@Override public Preferences putFloat (String key, float val) { properties.put(key, Float.toString(val)); return this; }
public void arrayf(float... vargs) { s = ""; if (vargs != null) { s = ""; for (float v: vargs) { this.s += Float.toString(v); } } }
/** Appends the string representation of the specified {@code float} value. The {@code float} value is converted to a string * according to the rule defined by {@link String#valueOf(float)}. * * @param f the {@code float} value to append. * @return this builder. */ public StringBuilder append (float f) { append0(Float.toString(f)); return this; }
/** Appends the string representation of the specified {@code float} value. The {@code float} value is converted to a string * according to the rule defined by {@link String#valueOf(float)}. * * @param f the {@code float} value to append. * @return this builder. */ public StringBuilder append (float f) { append0(Float.toString(f)); return this; }
/** Inserts the string representation of the specified {@code float} value at the specified {@code offset}. The {@code float} * value is converted to a string according to the rule defined by {@link String#valueOf(float)}. * * @param offset the index to insert at. * @param f the {@code float} value to insert. * @return this builder. * @throws StringIndexOutOfBoundsException if {@code offset} is negative or greater than the current {@code length()}. * @see String#valueOf(float) */ public StringBuilder insert (int offset, float f) { insert0(offset, Float.toString(f)); return this; }
/** Inserts the string representation of the specified {@code float} value at the specified {@code offset}. The {@code float} * value is converted to a string according to the rule defined by {@link String#valueOf(float)}. * * @param offset the index to insert at. * @param f the {@code float} value to insert. * @return this builder. * @throws StringIndexOutOfBoundsException if {@code offset} is negative or greater than the current {@code length()}. * @see String#valueOf(float) */ public StringBuilder insert (int offset, float f) { insert0(offset, Float.toString(f)); return this; }
public Obj3(String s, Float f, int... ints) { StringBuilder b = new StringBuilder(); b.append(s); b.append(":"); b.append(Float.toString(f)); b.append(":"); for (int param: ints) { b.append(Integer.toString(param)); } output = b.toString(); } }
@Override public boolean visit(OracleBinaryFloatExpr x) { print0(x.getValue().toString()); print('F'); return false; }
public boolean visit(OracleBinaryFloatExpr x) { print0(x.getValue().toString()); print('F'); return false; }
@GwtIncompatible // Floats.tryParse public void testTryParseOfToStringIsOriginal() { for (float f : NUMBERS) { checkTryParse(f, Float.toString(f)); } }
@Test public void withUncheckedObjectValue() throws Exception { Float value = new Float("99.45"); this.tag.setPath("myFloat"); this.tag.setValue(value); int result = this.tag.doStartTag(); assertEquals(Tag.SKIP_BODY, result); String output = getOutput(); assertTagOpened(output); assertTagClosed(output); assertContainsAttribute(output, "name", "myFloat"); assertContainsAttribute(output, "type", "radio"); assertContainsAttribute(output, "value", value.toString()); assertAttributeNotPresent(output, "checked"); }
@Test public void withCheckedObjectValue() throws Exception { this.tag.setPath("myFloat"); this.tag.setValue(getFloat()); int result = this.tag.doStartTag(); assertEquals(Tag.SKIP_BODY, result); String output = getOutput(); assertTagOpened(output); assertTagClosed(output); assertContainsAttribute(output, "name", "myFloat"); assertContainsAttribute(output, "type", "radio"); assertContainsAttribute(output, "value", getFloat().toString()); assertContainsAttribute(output, "checked", "checked"); }