mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-16 13:01:21 +08:00
2004-01-23 Michael Koch <konqueror@gmx.de>
* java/text/CollationElementIterator.java: (setText): New method. From-SVN: r76423
This commit is contained in:
parent
9719e37cec
commit
f0bf056e74
@ -1,3 +1,8 @@
|
||||
2004-01-23 Michael Koch <konqueror@gmx.de>
|
||||
|
||||
* java/text/CollationElementIterator.java:
|
||||
(setText): New method.
|
||||
|
||||
2004-01-23 Michael Koch <konqueror@gmx.de>
|
||||
|
||||
* gnu/java/nio/FileLockImpl.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.
|
||||
|
||||
@ -180,6 +180,27 @@ public final class CollationElementIterator
|
||||
this.lookahead = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user