com.ibm.icu.text
public final class StringCharacterIterator extends Object implements CharacterIterator
Deprecated: ICU 2.4. Use java.text.StringCharacterIterator instead.
StringCharacterIterator implements the
CharacterIterater protocol for a String.
The StringCharacterIterator class iterates over the
entire String.
See Also: CharacterIterator
| Constructor Summary | |
|---|---|
| StringCharacterIterator(String text)
Constructs an iterator with an initial index of 0. | |
| StringCharacterIterator(String text, int pos)
Constructs an iterator with the specified initial index.
| |
| 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.
| |
| Method Summary | |
|---|---|
| Object | clone()
Creates a copy of this iterator. |
| char | current()
Implements CharacterIterator.current() for String. |
| boolean | equals(Object obj)
Compares the equality of two StringCharacterIterator objects. |
| char | first()
Implements CharacterIterator.first() for String. |
| int | getBeginIndex()
Implements CharacterIterator.getBeginIndex() for String. |
| int | getEndIndex()
Implements CharacterIterator.getEndIndex() for String. |
| int | getIndex()
Implements CharacterIterator.getIndex() for String. |
| int | hashCode()
Computes a hashcode for this iterator. |
| char | last()
Implements CharacterIterator.last() for String. |
| char | next()
Implements CharacterIterator.next() for String. |
| char | previous()
Implements CharacterIterator.previous() for String. |
| char | setIndex(int p)
Implements CharacterIterator.setIndex() for String. |
| void | setText(String text)
Reset this iterator to point to a new string. |
Deprecated: ICU 2.4. Use java.text.StringCharacterIterator instead.
Constructs an iterator with an initial index of 0.Deprecated: ICU 2.4. Use java.text.StringCharacterIterator instead.
Constructs an iterator with the specified initial index.Parameters: text The String to be iterated over pos Initial iterator position
Deprecated: ICU 2.4. Use java.text.StringCharacterIterator instead.
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
Deprecated: ICU 2.4. Use java.text.StringCharacterIterator instead.
Creates a copy of this iterator.Returns: A copy of this
Deprecated: ICU 2.4. Use java.text.StringCharacterIterator instead.
Implements CharacterIterator.current() for String.See Also: CharacterIterator#current
Deprecated: ICU 2.4. Use java.text.StringCharacterIterator instead.
Compares the equality of two StringCharacterIterator objects.Parameters: obj the StringCharacterIterator object to be compared with.
Returns: true if the given obj is the same as this StringCharacterIterator object; false otherwise.
Deprecated: ICU 2.4. Use java.text.StringCharacterIterator instead.
Implements CharacterIterator.first() for String.See Also: CharacterIterator#first
Deprecated: ICU 2.4. Use java.text.StringCharacterIterator instead.
Implements CharacterIterator.getBeginIndex() for String.See Also: CharacterIterator#getBeginIndex
Deprecated: ICU 2.4. Use java.text.StringCharacterIterator instead.
Implements CharacterIterator.getEndIndex() for String.See Also: CharacterIterator#getEndIndex
Deprecated: ICU 2.4. Use java.text.StringCharacterIterator instead.
Implements CharacterIterator.getIndex() for String.See Also: CharacterIterator#getIndex
Deprecated: ICU 2.4. Use java.text.StringCharacterIterator instead.
Computes a hashcode for this iterator.Returns: A hash code
Deprecated: ICU 2.4. Use java.text.StringCharacterIterator instead.
Implements CharacterIterator.last() for String.See Also: CharacterIterator#last
Deprecated: ICU 2.4. Use java.text.StringCharacterIterator instead.
Implements CharacterIterator.next() for String.See Also: CharacterIterator#next
Deprecated: ICU 2.4. Use java.text.StringCharacterIterator instead.
Implements CharacterIterator.previous() for String.See Also: CharacterIterator#previous
Deprecated: ICU 2.4. Use java.text.StringCharacterIterator instead.
Implements CharacterIterator.setIndex() for String.See Also: CharacterIterator#setIndex
Deprecated: ICU 2.4. Use java.text.StringCharacterIterator instead.
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.Parameters: text The String to be iterated over