FileDocCategorySizeDatePackage
StringCharacterIterator.javaAPI DocJava SE 6 API1749Tue Jun 10 00:22:24 BST 2008com.sun.org.apache.regexp.internal

StringCharacterIterator

public final class StringCharacterIterator extends Object implements CharacterIterator
Encapsulates String as CharacterIterator.
author
Ales Novak
version
CVS $Id: StringCharacterIterator.java,v 1.1.2.1 2005/08/01 00:03:00 jeffsuttor Exp $

Fields Summary
private final String
src
encapsulated
Constructors Summary
public StringCharacterIterator(String src)

param
src - encapsulated String

        this.src = src;
    
Methods Summary
public charcharAt(int pos)

return
a character at the specified position.

        return src.charAt(pos);
    
public booleanisEnd(int pos)

return
true iff if the specified index is after the end of the character stream

        return (pos >= src.length());
    
public java.lang.Stringsubstring(int beginIndex, int endIndex)

return
a substring

        return src.substring(beginIndex, endIndex);
    
public java.lang.Stringsubstring(int beginIndex)

return
a substring

        return src.substring(beginIndex);