< prev index next >
src/java.base/share/classes/java/lang/AbstractStringBuilder.java
Print this page
*** 23,33 ****
* questions.
*/
package java.lang;
! import jdk.internal.math.FloatingDecimal;
import java.util.Arrays;
import java.util.Spliterator;
import java.util.stream.IntStream;
import java.util.stream.StreamSupport;
--- 23,36 ----
* questions.
*/
package java.lang;
! import jdk.internal.math.DoubleToDecimal;
! import jdk.internal.math.FloatToDecimal;
!
! import java.io.IOException;
import java.util.Arrays;
import java.util.Spliterator;
import java.util.stream.IntStream;
import java.util.stream.StreamSupport;
*** 872,882 ****
*
* @param f a {@code float}.
* @return a reference to this object.
*/
public AbstractStringBuilder append(float f) {
! FloatingDecimal.appendTo(f,this);
return this;
}
/**
* Appends the string representation of the {@code double}
--- 875,889 ----
*
* @param f a {@code float}.
* @return a reference to this object.
*/
public AbstractStringBuilder append(float f) {
! try {
! FloatToDecimal.appendTo(f, this);
! } catch (IOException ignored) {
! assert false;
! }
return this;
}
/**
* Appends the string representation of the {@code double}
*** 889,899 ****
*
* @param d a {@code double}.
* @return a reference to this object.
*/
public AbstractStringBuilder append(double d) {
! FloatingDecimal.appendTo(d,this);
return this;
}
/**
* Removes the characters in a substring of this sequence.
--- 896,910 ----
*
* @param d a {@code double}.
* @return a reference to this object.
*/
public AbstractStringBuilder append(double d) {
! try {
! DoubleToDecimal.appendTo(d, this);
! } catch (IOException ignored) {
! assert false;
! }
return this;
}
/**
* Removes the characters in a substring of this sequence.
< prev index next >