StringBuilder.java (appendCodePoint): New method.

* java/lang/StringBuilder.java (appendCodePoint): New method.
	(insert): New overloads.
	* java/lang/StringBuffer.java (StringBuffer): New constructor.
	(charAt): Remerged javadoc.
	(codePointAt, codePointBefore): New methods.
	(appendCodePoint): New method.
	(append): New overloads.
	(insert): Likewise.
	(trimToSize, codePointCount, offsetByCodePoints): New methods.
	* java/lang/Float.java (SIZE): New field.
	(valueOf): New method.
	* java/lang/natDouble.cc (initIDs): Removed.
	* java/lang/Double.java (static initializer): Removed.
	(SIZE): New field.
	(valueOf): New method.
	(initIDs): Removed.

From-SVN: r109497
This commit is contained in:
Tom Tromey 2006-01-09 06:42:19 +00:00 committed by Tom Tromey
parent 5109f57e37
commit a79cb46cf4
6 changed files with 391 additions and 31 deletions

View file

@ -1,5 +1,5 @@
/* Float.java -- object wrapper for float
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006
Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -93,6 +93,12 @@ public final class Float extends Number implements Comparable
*/
public static final Class TYPE = VMClassLoader.getPrimitiveClass('F');
/**
* The number of bits needed to represent a <code>float</code>.
* @since 1.5
*/
public static final int SIZE = 32;
/**
* The immutable value of this Float.
*
@ -191,6 +197,22 @@ public final class Float extends Number implements Comparable
return new Float(parseFloat(s));
}
/**
* Returns a <code>Float</code> object wrapping the value.
* In contrast to the <code>Float</code> constructor, this method
* may cache some values. It is used by boxing conversion.
*
* @param val the value to wrap
* @return the <code>Float</code>
*
* @since 1.5
*/
public static Float valueOf(float val)
{
// We don't actually cache, but we could.
return new Float(val);
}
/**
* Parse the specified <code>String</code> as a <code>float</code>. The
* extended BNF grammar is as follows:<br>