Package org.apache.lucene.analysis.util
Class CharArrayIterator
- java.lang.Object
-
- org.apache.lucene.analysis.util.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 withBreakIterator
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
HAS_BUGGY_BREAKITERATORS
True if this JRE has a buggy BreakIterator implementation
-
Constructor Summary
Constructors Constructor Description CharArrayIterator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CharArrayIterator
clone()
char
current()
char
first()
int
getBeginIndex()
int
getEndIndex()
int
getIndex()
int
getLength()
int
getStart()
char[]
getText()
char
last()
static CharArrayIterator
newSentenceInstance()
Create a new CharArrayIterator that works around JRE bugs in a manner suitable forBreakIterator.getSentenceInstance()
static CharArrayIterator
newWordInstance()
Create a new CharArrayIterator that works around JRE bugs in a manner suitable forBreakIterator.getWordInstance()
char
next()
char
previous()
char
setIndex(int position)
void
setText(char[] array, int start, int length)
Set a new region of text to be examined by this iterator
-
-
-
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 examinestart
- offset into bufferlength
- maximum length to examine
-
current
public char current()
- Specified by:
current
in interfacejava.text.CharacterIterator
-
first
public char first()
- Specified by:
first
in interfacejava.text.CharacterIterator
-
getBeginIndex
public int getBeginIndex()
- Specified by:
getBeginIndex
in interfacejava.text.CharacterIterator
-
getEndIndex
public int getEndIndex()
- Specified by:
getEndIndex
in interfacejava.text.CharacterIterator
-
getIndex
public int getIndex()
- Specified by:
getIndex
in interfacejava.text.CharacterIterator
-
last
public char last()
- Specified by:
last
in interfacejava.text.CharacterIterator
-
next
public char next()
- Specified by:
next
in interfacejava.text.CharacterIterator
-
previous
public char previous()
- Specified by:
previous
in interfacejava.text.CharacterIterator
-
setIndex
public char setIndex(int position)
- Specified by:
setIndex
in interfacejava.text.CharacterIterator
-
clone
public CharArrayIterator clone()
- Specified by:
clone
in interfacejava.text.CharacterIterator
-
newSentenceInstance
public static CharArrayIterator newSentenceInstance()
Create a new CharArrayIterator that works around JRE bugs in a manner suitable forBreakIterator.getSentenceInstance()
-
newWordInstance
public static CharArrayIterator newWordInstance()
Create a new CharArrayIterator that works around JRE bugs in a manner suitable forBreakIterator.getWordInstance()
-
-