Home » openjdk-7 » java » text » [javadoc | source]
java.text
public final class: StringCharacterIterator [javadoc | source]
java.lang.Object
   java.text.StringCharacterIterator

All Implemented Interfaces:
    CharacterIterator

StringCharacterIterator implements the CharacterIterator protocol for a String. The StringCharacterIterator class iterates over the entire String.
Constructor:
 public StringCharacterIterator(String text) 
    Constructs an iterator with an initial index of 0.
 public StringCharacterIterator(String text,
    int pos) 
    Constructs an iterator with the specified initial index.
    Parameters:
    text - The String to be iterated over
    pos - Initial iterator position
 public StringCharacterIterator(String text,
    int begin,
    int end,
    int pos) 
    Constructs an iterator over the given range of the given string, with the index set at the specified position.
    Parameters:
    text - The String to be iterated over
    begin - Index of the first character
    end - Index of the character following the last character
    pos - Initial iterator position
Method from java.text.StringCharacterIterator Summary:
clone,   current,   equals,   first,   getBeginIndex,   getEndIndex,   getIndex,   hashCode,   last,   next,   previous,   setIndex,   setText
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.text.StringCharacterIterator Detail:
 public Object clone() 
    Creates a copy of this iterator.
 public char current() 
    Implements CharacterIterator.current() for String.
 public boolean equals(Object obj) 
    Compares the equality of two StringCharacterIterator objects.
 public char first() 
    Implements CharacterIterator.first() for String.
 public int getBeginIndex() 
    Implements CharacterIterator.getBeginIndex() for String.
 public int getEndIndex() 
    Implements CharacterIterator.getEndIndex() for String.
 public int getIndex() 
    Implements CharacterIterator.getIndex() for String.
 public int hashCode() 
    Computes a hashcode for this iterator.
 public char last() 
    Implements CharacterIterator.last() for String.
 public char next() 
    Implements CharacterIterator.next() for String.
 public char previous() 
    Implements CharacterIterator.previous() for String.
 public char setIndex(int p) 
    Implements CharacterIterator.setIndex() for String.
 public  void setText(String text) 
    Reset this iterator to point to a new string. This package-visible method is used by other java.text classes that want to avoid allocating new StringCharacterIterator objects every time their setText method is called.