|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jruby.util.string.UcharIterator
public class UcharIterator
UcharIterator - an Iterator on Unicode characters in a UTF-8 byte array.
A conventional Iterator, remove() is not supported, and there's an extra nextChar() method that returns a naked int as opposed to a wrapped Integer.
Ustr,
Serialized Form| Constructor Summary | |
|---|---|
UcharIterator(byte[] s,
int offset)
Creates a new UcharIterator starting at an offset in a buffer. |
|
| Method Summary | |
|---|---|
boolean |
hasNext()
Tests whether there are any more characters in the buffer. |
java.lang.Object |
next()
Retrieve the next Unicode character from a UTF-8 byte buffer, wrapped in an Integer object. |
int |
nextChar()
Retrieve the next Unicode character from a UTF-8 byte buffer and return it as an int. |
void |
remove()
Throws an UnsupportedOperationException. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UcharIterator(byte[] s,
int offset)
s - the byte array containing UTF-8-encoded Unicode characters.offset - how far into the array to start iterating.| Method Detail |
|---|
public boolean hasNext()
hasNext in interface java.util.Iteratorpublic java.lang.Object next()
next in interface java.util.IteratorNoSuchElementExceptionpublic int nextChar()
public void remove()
remove in interface java.util.Iteratorjava.lang.UnsupportedOperationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||