Package org.apache.abdera.i18n.text
Class DelegatingCodepointIterator
- java.lang.Object
-
- org.apache.abdera.i18n.text.CodepointIterator
-
- org.apache.abdera.i18n.text.DelegatingCodepointIterator
-
- All Implemented Interfaces:
java.util.Iterator<Codepoint>
- Direct Known Subclasses:
CodepointIterator.RestrictedCodepointIterator
public abstract class DelegatingCodepointIterator extends CodepointIterator
Base implementation of a CodepointIterator that filters the output of another CodpointIterator
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.abdera.i18n.text.CodepointIterator
CodepointIterator.RestrictedCodepointIterator
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()True if there are codepoints remainingbooleanisHigh(int index)Returns true if the char at the specified index is a high surrogatebooleanisLow(int index)Returns true if the char at the specified index is a low surrogateintlimit()Return the iterator limitCodepointnext()Return the next codepointchar[]nextChars()Return the next chars.Codepointpeek()Peek the next codepointCodepointpeek(int index)Peek the specified codepointchar[]peekChars()Peek the next chars in the iterator.intposition()Get the iterator positionvoidposition(int position)Set the iterator positionintremaining()Return the remaining iterator size-
Methods inherited from class org.apache.abdera.i18n.text.CodepointIterator
forByteArray, forByteArray, forCharArray, forCharBuffer, forCharSequence, forInputStream, forInputStream, forReadableByteChannel, forReadableByteChannel, forReader, lastPosition, remove, restrict, restrict, restrict, restrict, restrict, restrict
-
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
Description copied from class:CodepointIteratorTrue if there are codepoints remaining- Specified by:
hasNextin interfacejava.util.Iterator<Codepoint>- Overrides:
hasNextin classCodepointIterator
-
isHigh
public boolean isHigh(int index)
Description copied from class:CodepointIteratorReturns true if the char at the specified index is a high surrogate- Overrides:
isHighin classCodepointIterator
-
isLow
public boolean isLow(int index)
Description copied from class:CodepointIteratorReturns true if the char at the specified index is a low surrogate- Overrides:
isLowin classCodepointIterator
-
limit
public int limit()
Description copied from class:CodepointIteratorReturn the iterator limit- Overrides:
limitin classCodepointIterator
-
next
public Codepoint next()
Description copied from class:CodepointIteratorReturn the next codepoint- Specified by:
nextin interfacejava.util.Iterator<Codepoint>- Overrides:
nextin classCodepointIterator
-
nextChars
public char[] nextChars()
Description copied from class:CodepointIteratorReturn the next chars. If the codepoint is not supplemental, the char array will have a single member. If the codepoint is supplemental, the char array will have two members, representing the high and low surrogate chars- Overrides:
nextCharsin classCodepointIterator
-
peek
public Codepoint peek()
Description copied from class:CodepointIteratorPeek the next codepoint- Overrides:
peekin classCodepointIterator
-
peek
public Codepoint peek(int index)
Description copied from class:CodepointIteratorPeek the specified codepoint- Overrides:
peekin classCodepointIterator
-
peekChars
public char[] peekChars()
Description copied from class:CodepointIteratorPeek the next chars in the iterator. If the codepoint is not supplemental, the char array will have a single member. If the codepoint is supplemental, the char array will have two members, representing the high and low surrogate chars- Overrides:
peekCharsin classCodepointIterator
-
position
public int position()
Description copied from class:CodepointIteratorGet the iterator position- Overrides:
positionin classCodepointIterator
-
remaining
public int remaining()
Description copied from class:CodepointIteratorReturn the remaining iterator size- Overrides:
remainingin classCodepointIterator
-
position
public void position(int position)
Description copied from class:CodepointIteratorSet the iterator position- Overrides:
positionin classCodepointIterator
-
-