Fork me on GitHub
  • API

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    CharacterIterator
    CharArrayIterator
    Inherited Members
    CharacterIterator.Done
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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
    ICU4N.Support.Text.CharacterIterator.BeginIndex

    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
    ICU4N.Support.Text.CharacterIterator.Current

    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
    ICU4N.Support.Text.CharacterIterator.EndIndex

    Index

    Gets the current index.

    Declaration
    public override int Index { get; }
    Property Value
    Type Description
    int
    Overrides
    ICU4N.Support.Text.CharacterIterator.Index

    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
    ICU4N.Support.Text.CharacterIterator.Clone()

    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
    ICU4N.Support.Text.CharacterIterator.First()

    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
    ICU4N.Support.Text.CharacterIterator.Last()

    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
    ICU4N.Support.Text.CharacterIterator.Next()

    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
    ICU4N.Support.Text.CharacterIterator.Previous()

    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
    CharacterIterator.SetIndex(int)
    Exceptions
    Type Condition
    ArgumentException

    If location is less than the begin index or greater than the end index.

    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

    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.