Class CharArrayIterator
A CharacterIterator used internally for use with ICU4N.Text.BreakIterator
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Inherited Members
Namespace: Lucene.Net.Analysis.Util
Assembly: Lucene.Net.ICU.dll
Syntax
public abstract class CharArrayIterator : CharacterIterator
Properties
BeginIndex
Gets the begin index. Returns the index of the first character of the iteration.
Declaration
public override int BeginIndex { get; }
Property Value
Type | Description |
---|---|
int |
Overrides
Current
Returns the character at the current index, or ICU4N.Support.Text.CharacterIterator.Done if the current index is past the beginning or end of the sequence.
Declaration
public override char Current { get; }
Property Value
Type | Description |
---|---|
char |
Overrides
EndIndex
Gets the end index. Returns the index one past the last character of the iteration.
Declaration
public override int EndIndex { get; }
Property Value
Type | Description |
---|---|
int |
Overrides
Index
Gets the current index.
Declaration
public override int Index { get; }
Property Value
Type | Description |
---|---|
int |
Overrides
Length
A CharacterIterator used internally for use with ICU4N.Text.BreakIterator
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Declaration
public virtual int Length { get; }
Property Value
Type | Description |
---|---|
int |
Start
A CharacterIterator used internally for use with ICU4N.Text.BreakIterator
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Declaration
public virtual int Start { get; }
Property Value
Type | Description |
---|---|
int |
Text
A CharacterIterator used internally for use with ICU4N.Text.BreakIterator
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Declaration
public virtual char[] Text { get; }
Property Value
Type | Description |
---|---|
char[] |
Methods
Clone()
Returns a new ICU4N.Support.Text.CharacterIterator with the same properties.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
object | A shallow copy of this character iterator. |
Overrides
First()
Sets the current position to the begin index and returns the character at the new position.
Declaration
public override char First()
Returns
Type | Description |
---|---|
char | The character at the begin index. |
Overrides
JreBugWorkaround(char)
A CharacterIterator used internally for use with ICU4N.Text.BreakIterator
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Declaration
protected abstract char JreBugWorkaround(char ch)
Parameters
Type | Name | Description |
---|---|---|
char | ch |
Returns
Type | Description |
---|---|
char |
Last()
Sets the current position to the end index - 1 and returns the character at the new position.
Declaration
public override char Last()
Returns
Type | Description |
---|---|
char | The character before the end index. |
Overrides
NewSentenceInstance()
Create a new CharArrayIterator that works around JRE bugs in a manner suitable for ICU4N.Text.BreakIterator.GetSentenceInstance().
Declaration
public static CharArrayIterator NewSentenceInstance()
Returns
Type | Description |
---|---|
CharArrayIterator |
NewWordInstance()
Create a new CharArrayIterator that works around JRE bugs in a manner suitable for ICU4N.Text.BreakIterator.GetWordInstance().
Declaration
public static CharArrayIterator NewWordInstance()
Returns
Type | Description |
---|---|
CharArrayIterator |
Next()
Increments the current index and returns the character at the new index.
Declaration
public override char Next()
Returns
Type | Description |
---|---|
char | The character at the next index, or ICU4N.Support.Text.CharacterIterator.Done if the next index would be past the end. |
Overrides
Previous()
Decrements the current index and returns the character at the new index.
Declaration
public override char Previous()
Returns
Type | Description |
---|---|
char | The character at the previous index, or ICU4N.Support.Text.CharacterIterator.Done if the previous index would be past the beginning. |
Overrides
SetIndex(int)
Sets the current index to a new position and returns the character at the new index.
Declaration
public override char SetIndex(int position)
Parameters
Type | Name | Description |
---|---|---|
int | position |
Returns
Type | Description |
---|---|
char | The character at the new index, or ICU4N.Support.Text.CharacterIterator.Done if the index is past the end. |
Overrides
Exceptions
Type | Condition |
---|---|
ArgumentException | If |
SetText(char[], int, int)
Set a new region of text to be examined by this iterator
Declaration
public virtual void SetText(char[] array, int start, int length)
Parameters
Type | Name | Description |
---|---|---|
char[] | array | text buffer to examine |
int | start | offset into buffer |
int | length | maximum length to examine |