Class StringCharacterIterator

  • All Implemented Interfaces:
    Cloneable, CharacterIterator

    @Deprecated
    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 Detail

      • StringCharacterIterator

        @Deprecated
        public StringCharacterIterator​(String text)
        Deprecated.
        ICU 2.4. Use java.text.StringCharacterIterator instead.
        Constructs an iterator with an initial index of 0.
      • StringCharacterIterator

        @Deprecated
        public StringCharacterIterator​(String text,
                                       int pos)
        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
      • StringCharacterIterator

        @Deprecated
        public StringCharacterIterator​(String text,
                                       int begin,
                                       int end,
                                       int pos)
        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
    • Method Detail

      • setText

        @Deprecated
        public void setText​(String text)
        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
      • first

        @Deprecated
        public char first()
        Deprecated.
        ICU 2.4. Use java.text.StringCharacterIterator instead.
        Implements CharacterIterator.first() for String.
        Specified by:
        first in interface CharacterIterator
        Returns:
        the character at the begin index.
        See Also:
        CharacterIterator.first()
      • last

        @Deprecated
        public char last()
        Deprecated.
        ICU 2.4. Use java.text.StringCharacterIterator instead.
        Implements CharacterIterator.last() for String.
        Specified by:
        last in interface CharacterIterator
        Returns:
        the character before the end index.
        See Also:
        CharacterIterator.last()
      • setIndex

        @Deprecated
        public char setIndex​(int p)
        Deprecated.
        ICU 2.4. Use java.text.StringCharacterIterator instead.
        Implements CharacterIterator.setIndex() for String.
        Specified by:
        setIndex in interface CharacterIterator
        Parameters:
        p - the new index that this character iterator is set to.
        Returns:
        the character at the new index, or DONE if the index is past the end.
        See Also:
        CharacterIterator.setIndex(int)
      • current

        @Deprecated
        public char current()
        Deprecated.
        ICU 2.4. Use java.text.StringCharacterIterator instead.
        Implements CharacterIterator.current() for String.
        Specified by:
        current in interface CharacterIterator
        Returns:
        the current character, or DONE if the current index is past the beginning or end of the sequence.
        See Also:
        CharacterIterator.current()
      • next

        @Deprecated
        public char next()
        Deprecated.
        ICU 2.4. Use java.text.StringCharacterIterator instead.
        Implements CharacterIterator.next() for String.
        Specified by:
        next in interface CharacterIterator
        Returns:
        the character at the next index, or DONE if the next index would be past the end.
        See Also:
        CharacterIterator.next()
      • previous

        @Deprecated
        public char previous()
        Deprecated.
        ICU 2.4. Use java.text.StringCharacterIterator instead.
        Implements CharacterIterator.previous() for String.
        Specified by:
        previous in interface CharacterIterator
        Returns:
        the character at the previous index, or DONE if the previous index would be past the beginning.
        See Also:
        CharacterIterator.previous()
      • equals

        @Deprecated
        public boolean equals​(Object obj)
        Deprecated.
        ICU 2.4. Use java.text.StringCharacterIterator instead.
        Compares the equality of two StringCharacterIterator objects.
        Overrides:
        equals in class Object
        Parameters:
        obj - the StringCharacterIterator object to be compared with.
        Returns:
        true if the given obj is the same as this StringCharacterIterator object; false otherwise.
        See Also:
        Object.hashCode()