Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public static class

AttributedCharacterIterator.Attribute

extends Object
implements Serializable
java.lang.Object
   ↳ java.text.AttributedCharacterIterator.Attribute
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Defines keys for text attributes.

Summary

Fields
public static final AttributedCharacterIterator.Attribute INPUT_METHOD_SEGMENT This attribute marks segments from an input method.
public static final AttributedCharacterIterator.Attribute LANGUAGE The attribute describing the language of a character.
public static final AttributedCharacterIterator.Attribute READING For languages that have different reading directions of text (like Japanese), this attribute allows to define which reading should be used.
Protected Constructors
AttributedCharacterIterator.Attribute ( String name)
The constructor for an Attribute with the name passed.
Public Methods
final boolean equals ( Object object)
Compares this attribute with the specified object.
final int hashCode ()
Calculates the hash code for objects of type Attribute .
String toString ()
Returns the name of the class followed by a "(", the name of the attribute, and a ")".
Protected Methods
String getName ()
Returns the name of this attribute.
Object readResolve ()
Resolves a deserialized instance to the correct constant attribute.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static final AttributedCharacterIterator.Attribute INPUT_METHOD_SEGMENT

Added in API level 1

This attribute marks segments from an input method. Most input methods create these segments for words. The value objects are of the type Annotation which contain null .

public static final AttributedCharacterIterator.Attribute LANGUAGE

Added in API level 1

The attribute describing the language of a character. The value objects are of type Locale or a subtype of it.

public static final AttributedCharacterIterator.Attribute READING

Added in API level 1

For languages that have different reading directions of text (like Japanese), this attribute allows to define which reading should be used. The value objects are of type Annotation which contain a String .

Protected Constructors

protected AttributedCharacterIterator.Attribute ( String name)

Added in API level 1

The constructor for an Attribute with the name passed.

Parameters
name the name of the new Attribute .

Public Methods

public final boolean equals ( Object object)

Added in API level 1

Compares this attribute with the specified object. Checks if both objects are the same instance. It is defined final so all subclasses have the same behavior for this method.

Parameters
object the object to compare against.
Returns
  • true if the object passed is equal to this instance; false otherwise.

public final int hashCode ()

Added in API level 1

Calculates the hash code for objects of type Attribute . It is defined final so all sub types calculate their hash code identically.

Returns
  • the hash code for this instance of Attribute .

public String toString ()

Added in API level 1

Returns the name of the class followed by a "(", the name of the attribute, and a ")".

Returns
  • the string representing this instance.

Protected Methods

protected String getName ()

Added in API level 1

Returns the name of this attribute.

Returns
  • the name of this attribute.

protected Object readResolve ()

Added in API level 1

Resolves a deserialized instance to the correct constant attribute.

Returns
  • the Attribute this instance represents.
Throws
InvalidObjectException if this instance is not of type Attribute.class or if it is not a known Attribute .