org.apache.lucene.analysis.util
Class CharArrayIterator
java.lang.Object
  
org.apache.lucene.analysis.util.CharArrayIterator
- All Implemented Interfaces: 
 - Cloneable, CharacterIterator
 
public abstract class CharArrayIterator
- extends Object
- implements CharacterIterator
  
A CharacterIterator used internally for use with BreakIterator
- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
 
  
 
 
 
 
 
HAS_BUGGY_BREAKITERATORS
public static final boolean HAS_BUGGY_BREAKITERATORS
- True if this JRE has a buggy BreakIterator implementation
 
CharArrayIterator
public CharArrayIterator()
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 examinestart - offset into bufferlength - maximum length to examine
 
 
current
public char current()
- Specified by:
 current in interface CharacterIterator
 
 
jreBugWorkaround
protected abstract char jreBugWorkaround(char ch)
 
 
first
public char first()
- Specified by:
 first in interface CharacterIterator
 
 
getBeginIndex
public int getBeginIndex()
- Specified by:
 getBeginIndex in interface CharacterIterator
 
 
getEndIndex
public int getEndIndex()
- Specified by:
 getEndIndex in interface CharacterIterator
 
 
getIndex
public int getIndex()
- Specified by:
 getIndex in interface CharacterIterator
 
 
last
public char last()
- Specified by:
 last in interface CharacterIterator
 
 
next
public char next()
- Specified by:
 next in interface CharacterIterator
 
 
previous
public char previous()
- Specified by:
 previous in interface CharacterIterator
 
 
setIndex
public char setIndex(int position)
- Specified by:
 setIndex in interface CharacterIterator
 
 
clone
public Object clone()
- Specified by:
 clone in interface CharacterIterator- Overrides:
 clone in class Object
 
 
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()