Class CharArrayIterator

  • All Implemented Interfaces:
    java.lang.Cloneable, java.text.CharacterIterator

    public abstract class CharArrayIterator
    extends java.lang.Object
    implements java.text.CharacterIterator
    A CharacterIterator used internally for use with BreakIterator
    • Field Detail

      • HAS_BUGGY_BREAKITERATORS

        public static final boolean HAS_BUGGY_BREAKITERATORS
        True if this JRE has a buggy BreakIterator implementation
    • Constructor Detail

      • CharArrayIterator

        public CharArrayIterator()
    • Method Detail

      • getText

        public char[] getText()
      • getStart

        public int getStart()
      • getLength

        public int getLength()
      • setText

        public void setText​(char[] array,
                            int start,
                            int length)
        Set a new region of text to be examined by this iterator
        Parameters:
        array - text buffer to examine
        start - offset into buffer
        length - maximum length to examine
      • current

        public char current()
        Specified by:
        current in interface java.text.CharacterIterator
      • first

        public char first()
        Specified by:
        first in interface java.text.CharacterIterator
      • getBeginIndex

        public int getBeginIndex()
        Specified by:
        getBeginIndex in interface java.text.CharacterIterator
      • getEndIndex

        public int getEndIndex()
        Specified by:
        getEndIndex in interface java.text.CharacterIterator
      • getIndex

        public int getIndex()
        Specified by:
        getIndex in interface java.text.CharacterIterator
      • last

        public char last()
        Specified by:
        last in interface java.text.CharacterIterator
      • next

        public char next()
        Specified by:
        next in interface java.text.CharacterIterator
      • previous

        public char previous()
        Specified by:
        previous in interface java.text.CharacterIterator
      • setIndex

        public char setIndex​(int position)
        Specified by:
        setIndex in interface java.text.CharacterIterator
      • clone

        public CharArrayIterator clone()
        Specified by:
        clone in interface java.text.CharacterIterator
      • newSentenceInstance

        public static CharArrayIterator newSentenceInstance()
        Create a new CharArrayIterator that works around JRE bugs in a manner suitable for BreakIterator.getSentenceInstance()
      • newWordInstance

        public static CharArrayIterator newWordInstance()
        Create a new CharArrayIterator that works around JRE bugs in a manner suitable for BreakIterator.getWordInstance()