FileDocCategorySizeDatePackage
CharacterArrayCharacterIterator.javaAPI DocJava SE 5 API3874Fri Aug 26 14:55:28 BST 2005com.sun.org.apache.regexp.internal

CharacterArrayCharacterIterator

public final class CharacterArrayCharacterIterator extends Object implements CharacterIterator
Encapsulates String
author
Ales Novak

Fields Summary
private final char[]
src
encapsulated
private final int
off
offset in the char array
private final int
len
used portion of the array
Constructors Summary
public CharacterArrayCharacterIterator(char[] src, int off, int len)

param
src - encapsulated String

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

return
a character at the specified position.

        return src[off + pos];
    
public booleanisEnd(int pos)

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

        return (pos >= len);
    
public java.lang.Stringsubstring(int offset, int length)

return
a substring

        return new String(src, off + offset, length);
    
public java.lang.Stringsubstring(int offset)

return
a substring

        return new String(src, off + offset, len);