共用方式為


IAttributedCharacterIterator Interface

Definition

An AttributedCharacterIterator allows iteration through both text and related attribute information.

[Android.Runtime.Register("java/text/AttributedCharacterIterator", "", "Java.Text.IAttributedCharacterIteratorInvoker")]
public interface IAttributedCharacterIterator : IDisposable, Java.Interop.IJavaPeerable, Java.Text.ICharacterIterator
[<Android.Runtime.Register("java/text/AttributedCharacterIterator", "", "Java.Text.IAttributedCharacterIteratorInvoker")>]
type IAttributedCharacterIterator = interface
    interface ICharacterIterator
    interface ICloneable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Attributes
Implements

Remarks

An AttributedCharacterIterator allows iteration through both text and related attribute information.

An attribute is a key/value pair, identified by the key. No two attributes on a given character can have the same key.

The values for an attribute are immutable, or must not be mutated by clients or storage. They are always passed by reference, and not cloned.

A <em>run with respect to an attribute</em> is a maximum text range for which: <ul> <li>the attribute is undefined or null for the entire range, or <li>the attribute value is defined and has the same non-null value for the entire range. </ul>

A <em>run with respect to a set of attributes</em> is a maximum text range for which this condition is met for each member attribute.

When getting a run with no explicit attributes specified (i.e., calling #getRunStart() and #getRunLimit()), any contiguous text segments having the same attributes (the same set of attribute/value pairs) are treated as separate runs if the attributes have been given to those text segments separately.

The returned indexes are limited to the range of the iterator.

The returned attribute information is limited to runs that contain the current character.

Attribute keys are instances of AttributedCharacterIterator.Attribute and its subclasses, such as java.awt.font.TextAttribute.

Added in 1.2.

Java documentation for java.text.AttributedCharacterIterator.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Fields

Done

Constant that is returned when the iterator has reached either the end or the beginning of the text.

(Inherited from ICharacterIterator)

Properties

AllAttributeKeys

Returns a set of attributes present in the AttributedCharacterIterator.

Attributes

Returns a map of all attributes of the current character.

BeginIndex

Returns the begin index.

(Inherited from ICharacterIterator)
EndIndex

Returns the end index.

(Inherited from ICharacterIterator)
Handle

Gets the JNI value of the underlying Android object.

(Inherited from IJavaObject)
Index

Returns the current index.

(Inherited from ICharacterIterator)
JniIdentityHashCode

Returns the value of java.lang.System.identityHashCode() for the wrapped instance.

(Inherited from IJavaPeerable)
JniManagedPeerState

State of the managed peer.

(Inherited from IJavaPeerable)
JniPeerMembers

Member access and invocation support.

(Inherited from IJavaPeerable)
PeerReference

Returns a JniObjectReference of the wrapped Java object instance.

(Inherited from IJavaPeerable)
RunLimit

Returns the index of the last character in the run having the same attributes as the current character.

RunStart

Returns the index of the first character in the run that has the same attributes as the current character.

Methods

Clone()

Create a copy of this iterator

(Inherited from ICharacterIterator)
Current()

Gets the character at the current position (as returned by getIndex()).

(Inherited from ICharacterIterator)
Disposed()

Called when the instance has been disposed.

(Inherited from IJavaPeerable)
DisposeUnlessReferenced()

If there are no outstanding references to this instance, then calls Dispose(); otherwise, does nothing.

(Inherited from IJavaPeerable)
Finalized()

Called when the instance has been finalized.

(Inherited from IJavaPeerable)
First()

Sets the position to getBeginIndex() and returns the character at that position.

(Inherited from ICharacterIterator)
GetAttribute(AttributedCharacterIteratorAttribute)

Returns the value of the named attribute for the current character.

GetRunLimit(AttributedCharacterIteratorAttribute)

Returns the index of the first character following the run with respect to all attributes containing the current character.

GetRunLimit(ICollection<AttributedCharacterIteratorAttribute>)

Returns the index of the first character following the run with respect to the given attributes containing the current character.

GetRunStart(AttributedCharacterIteratorAttribute)

Returns the index of the first character of the run with respect to all attributes containing the current character.

GetRunStart(ICollection<AttributedCharacterIteratorAttribute>)

Returns the index of the first character of the run with respect to the given attributes containing the current character.

Last()

Sets the position to getEndIndex()-1 (getEndIndex() if the text is empty) and returns the character at that position.

(Inherited from ICharacterIterator)
Next()

Increments the iterator's index by one and returns the character at the new index.

(Inherited from ICharacterIterator)
Previous()

Decrements the iterator's index by one and returns the character at the new index.

(Inherited from ICharacterIterator)
SetIndex(Int32)

Sets the position to the specified position in the text and returns that character.

(Inherited from ICharacterIterator)
SetJniIdentityHashCode(Int32)

Set the value returned by JniIdentityHashCode.

(Inherited from IJavaPeerable)
SetJniManagedPeerState(JniManagedPeerStates) (Inherited from IJavaPeerable)
SetPeerReference(JniObjectReference)

Set the value returned by PeerReference.

(Inherited from IJavaPeerable)
UnregisterFromRuntime()

Unregister this instance so that the runtime will not return it from future Java.Interop.JniRuntime+JniValueManager.PeekValue invocations.

(Inherited from IJavaPeerable)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to