javaprims.h: Updated.

* gcj/javaprims.h: Updated.
	* java/lang/String.java (String(StringBuilder)): New constructor.
	* java/lang/natStringBuilder.cc: New file.
	* java/lang/StringBuilder.java: New file.
	* Makefile.in: Rebuilt.
	* Makefile.am (core_java_source_files): Added StringBuilder.java.
	(nat_source_files): Added natStringBuilder.cc.

From-SVN: r99535
This commit is contained in:
Tom Tromey 2005-05-10 18:28:31 +00:00 committed by Tom Tromey
parent aeddae499f
commit 0cb757cc06
7 changed files with 1018 additions and 13 deletions

View file

@ -1,5 +1,5 @@
/* String.java -- immutable character sequences; the object of string literals
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -397,6 +397,18 @@ public final class String implements Serializable, Comparable, CharSequence
}
}
/**
* Creates a new String using the character sequence represented by
* the StringBuilder. Subsequent changes to buf do not affect the String.
*
* @param buffer StringBuilder to copy
* @throws NullPointerException if buffer is null
*/
public String(StringBuilder buffer)
{
this(buffer.value, 0, buffer.count);
}
/**
* Special constructor which can share an array when safe to do so.
*