org.apache.abdera.i18n.text
Class DelegatingCodepointIterator

java.lang.Object
  extended by org.apache.abdera.i18n.text.CodepointIterator
      extended by org.apache.abdera.i18n.text.DelegatingCodepointIterator
All Implemented Interfaces:
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
 
Field Summary
 
Fields inherited from class org.apache.abdera.i18n.text.CodepointIterator
limit, position
 
Constructor Summary
protected DelegatingCodepointIterator(CodepointIterator internal)
           
 
Method Summary
protected  char get()
          Get the next char
protected  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 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 position)
          Set the iterator position
 int remaining()
          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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingCodepointIterator

protected DelegatingCodepointIterator(CodepointIterator internal)
Method Detail

get

protected char get()
Description copied from class: CodepointIterator
Get the next char

Specified by:
get in class CodepointIterator

get

protected char get(int index)
Description copied from class: CodepointIterator
Get the specified char

Specified by:
get in class CodepointIterator

hasNext

public boolean hasNext()
Description copied from class: CodepointIterator
True if there are codepoints remaining

Specified by:
hasNext in interface Iterator<Codepoint>
Overrides:
hasNext in class CodepointIterator

isHigh

public boolean isHigh(int index)
Description copied from class: CodepointIterator
Returns true if the char at the specified index is a high surrogate

Overrides:
isHigh in class CodepointIterator

isLow

public boolean isLow(int index)
Description copied from class: CodepointIterator
Returns true if the char at the specified index is a low surrogate

Overrides:
isLow in class CodepointIterator

limit

public int limit()
Description copied from class: CodepointIterator
Return the iterator limit

Overrides:
limit in class CodepointIterator

next

public Codepoint next()
Description copied from class: CodepointIterator
Return the next codepoint

Specified by:
next in interface Iterator<Codepoint>
Overrides:
next in class CodepointIterator

nextChars

public char[] nextChars()
Description copied from class: CodepointIterator
Return 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:
nextChars in class CodepointIterator

peek

public Codepoint peek()
Description copied from class: CodepointIterator
Peek the next codepoint

Overrides:
peek in class CodepointIterator

peek

public Codepoint peek(int index)
Description copied from class: CodepointIterator
Peek the specified codepoint

Overrides:
peek in class CodepointIterator

peekChars

public char[] peekChars()
Description copied from class: CodepointIterator
Peek 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:
peekChars in class CodepointIterator

position

public int position()
Description copied from class: CodepointIterator
Get the iterator position

Overrides:
position in class CodepointIterator

remaining

public int remaining()
Description copied from class: CodepointIterator
Return the remaining iterator size

Overrides:
remaining in class CodepointIterator

position

public void position(int position)
Description copied from class: CodepointIterator
Set the iterator position

Overrides:
position in class CodepointIterator


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.