|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.abdera.i18n.text.CodepointIterator
public abstract class CodepointIterator
Provides an iterator over Unicode Codepoints
Nested Class Summary | |
---|---|
static class |
CodepointIterator.RestrictedCodepointIterator
|
Field Summary | |
---|---|
protected int |
limit
|
protected int |
position
|
Constructor Summary | |
---|---|
CodepointIterator()
|
Method Summary | |
---|---|
static CodepointIterator |
forByteArray(byte[] array)
Get a CodepointIterator for the specified byte array, using the default charset |
static CodepointIterator |
forByteArray(byte[] array,
String charset)
Get a CodepointIterator for the specified byte array, using the specified charset |
static CodepointIterator |
forCharArray(char[] array)
Get a CodepointIterator for the specified char array |
static CodepointIterator |
forCharBuffer(CharBuffer buffer)
Get a CodepointIterator for the specified CharBuffer |
static CodepointIterator |
forCharSequence(CharSequence seq)
Get a CodepointIterator for the specified CharSequence |
static CodepointIterator |
forInputStream(InputStream in)
Get a CodepointIterator for the specified InputStream |
static CodepointIterator |
forInputStream(InputStream in,
String charset)
Get a CodepointIterator for the specified InputStream using the specified charset |
static CodepointIterator |
forReadableByteChannel(ReadableByteChannel channel)
Get a CodepointIterator for the specified ReadableByteChannel |
static CodepointIterator |
forReadableByteChannel(ReadableByteChannel channel,
String charset)
Get a CodepointIterator for the specified ReadableByteChannel |
static CodepointIterator |
forReader(Reader in)
Get a CodepointIterator for the specified Reader |
protected abstract char |
get()
Get the next char |
protected abstract char |
get(int index)
Get the specified char |
boolean |
hasNext()
True if there are codepoints remaining |
boolean |
isHigh(int index)
Returns true if the char at the specified index is a high surrogate |
boolean |
isLow(int index)
Returns true if the char at the specified index is a low surrogate |
int |
lastPosition()
Return the final index position |
int |
limit()
Return the iterator limit |
Codepoint |
next()
Return the next codepoint |
char[] |
nextChars()
Return the next chars. |
Codepoint |
peek()
Peek the next codepoint |
Codepoint |
peek(int index)
Peek the specified codepoint |
char[] |
peekChars()
Peek the next chars in the iterator. |
int |
position()
Get the iterator position |
void |
position(int n)
Set the iterator position |
int |
remaining()
Return the remaining iterator size |
void |
remove()
|
static CodepointIterator |
restrict(CodepointIterator ci,
Filter filter)
|
static CodepointIterator |
restrict(CodepointIterator ci,
Filter filter,
boolean scanning)
|
static CodepointIterator |
restrict(CodepointIterator ci,
Filter filter,
boolean scanning,
boolean invert)
|
CodepointIterator |
restrict(Filter filter)
|
CodepointIterator |
restrict(Filter filter,
boolean scanning)
|
CodepointIterator |
restrict(Filter filter,
boolean scanning,
boolean invert)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int position
protected int limit
Constructor Detail |
---|
public CodepointIterator()
Method Detail |
---|
public static CodepointIterator forCharArray(char[] array)
public static CodepointIterator forCharSequence(CharSequence seq)
public static CodepointIterator forByteArray(byte[] array)
public static CodepointIterator forByteArray(byte[] array, String charset)
public static CodepointIterator forCharBuffer(CharBuffer buffer)
public static CodepointIterator forReadableByteChannel(ReadableByteChannel channel)
public static CodepointIterator forReadableByteChannel(ReadableByteChannel channel, String charset)
public static CodepointIterator forInputStream(InputStream in)
public static CodepointIterator forInputStream(InputStream in, String charset)
public static CodepointIterator forReader(Reader in)
public static CodepointIterator restrict(CodepointIterator ci, Filter filter)
public static CodepointIterator restrict(CodepointIterator ci, Filter filter, boolean scanning)
public static CodepointIterator restrict(CodepointIterator ci, Filter filter, boolean scanning, boolean invert)
public CodepointIterator restrict(Filter filter)
public CodepointIterator restrict(Filter filter, boolean scanning)
public CodepointIterator restrict(Filter filter, boolean scanning, boolean invert)
protected abstract char get()
protected abstract char get(int index)
public boolean hasNext()
hasNext
in interface Iterator<Codepoint>
public int lastPosition()
public char[] nextChars() throws InvalidCharacterException
InvalidCharacterException
public char[] peekChars() throws InvalidCharacterException
InvalidCharacterException
public Codepoint next() throws InvalidCharacterException
next
in interface Iterator<Codepoint>
InvalidCharacterException
public Codepoint peek() throws InvalidCharacterException
InvalidCharacterException
public Codepoint peek(int index) throws InvalidCharacterException
InvalidCharacterException
public void position(int n)
public int position()
public int limit()
public int remaining()
public boolean isHigh(int index)
public boolean isLow(int index)
public void remove()
remove
in interface Iterator<Codepoint>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |