diff options
author | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-23 15:15:31 +0000 |
---|---|---|
committer | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-23 15:15:31 +0000 |
commit | b98cbaacb885e851d5b7a6399a9b587d53e305f2 (patch) | |
tree | cb47d9752483a2a43b51163643826283038896ec /libjava/java | |
parent | c75d2847fb297e714ce596b2a5bdb59fb3b1bb11 (diff) | |
download | ppe42-gcc-b98cbaacb885e851d5b7a6399a9b587d53e305f2.tar.gz ppe42-gcc-b98cbaacb885e851d5b7a6399a9b587d53e305f2.zip |
2004-01-23 Michael Koch <konqueror@gmx.de>
* java/text/CollationElementIterator.java:
(setText): New method.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76423 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java')
-rw-r--r-- | libjava/java/text/CollationElementIterator.java | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/libjava/java/text/CollationElementIterator.java b/libjava/java/text/CollationElementIterator.java index ecc95231d30..691d943d21b 100644 --- a/libjava/java/text/CollationElementIterator.java +++ b/libjava/java/text/CollationElementIterator.java @@ -1,5 +1,5 @@ /* CollationElementIterator.java -- Walks through collation elements - Copyright (C) 1998, 1999, 2001, 2002, 2003 Free Software Foundation + Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004 Free Software Foundation This file is part of GNU Classpath. @@ -181,6 +181,27 @@ public final class CollationElementIterator } /** + * This method sets the <code>String</code> that it is iterating over + * to the <code>String</code> represented by the specified + * <code>CharacterIterator</code>. + * + * @param source The <code>CharacterIterator</code> containing the new + * <code>String</code> to iterate over. + */ + public void setText(CharacterIterator source) + { + StringBuffer expand = new StringBuffer(); + + // For now assume we read from the beginning of the string. + for (char c = source.first(); + c != CharacterIterator.DONE; + c = source.next()) + expand.append(c); + + setText(expand.toString()); + } + + /** * This method returns the current offset into the <code>String</code> * that is being iterated over. * |