org.apache.regexp
Class StringCharacterIterator

java.lang.Object
  |
  +--org.apache.regexp.StringCharacterIterator
All Implemented Interfaces:
CharacterIterator

public final class StringCharacterIterator
extends java.lang.Object
implements CharacterIterator

Encapsulates String


Constructor Summary
StringCharacterIterator(java.lang.String src)
           
 
Method Summary
 char charAt(int pos)
           
 boolean isEnd(int pos)
           
 java.lang.String substring(int offset)
           
 java.lang.String substring(int offset, int length)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringCharacterIterator

public StringCharacterIterator(java.lang.String src)
Parameters:
src - - encapsulated String
Method Detail

substring

public java.lang.String substring(int offset,
                                  int length)
Specified by:
substring in interface CharacterIterator
Returns:
a substring

substring

public java.lang.String substring(int offset)
Specified by:
substring in interface CharacterIterator
Returns:
a substring

charAt

public char charAt(int pos)
Specified by:
charAt in interface CharacterIterator
Returns:
a character at the specified position.

isEnd

public boolean isEnd(int pos)
Specified by:
isEnd in interface CharacterIterator
Returns:
true iff if the specified index is after the end of the character stream