Skip to content

Most visited

Recently visited

navigation
Added in API level 1

AttributedCharacterIterator.Attribute

public static class AttributedCharacterIterator.Attribute
extends Object implements Serializable

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


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.

Inherited methods

From class java.lang.Object

Fields

INPUT_METHOD_SEGMENT

Added in API level 1
AttributedCharacterIterator.Attribute INPUT_METHOD_SEGMENT

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.

LANGUAGE

Added in API level 1
AttributedCharacterIterator.Attribute LANGUAGE

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

READING

Added in API level 1
AttributedCharacterIterator.Attribute READING

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

AttributedCharacterIterator.Attribute

Added in API level 1
AttributedCharacterIterator.Attribute (String name)

The constructor for an Attribute with the name passed.

Parameters
name String: the name of the new Attribute.

Public methods

equals

Added in API level 1
boolean equals (Object object)

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 Object: the object to compare against.
Returns
boolean true if the object passed is equal to this instance; false otherwise.

hashCode

Added in API level 1
int hashCode ()

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

Returns
int the hash code for this instance of Attribute.

toString

Added in API level 1
String toString ()

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

Returns
String the string representing this instance.

Protected methods

getName

Added in API level 1
String getName ()

Returns the name of this attribute.

Returns
String the name of this attribute.

readResolve

Added in API level 1
Object readResolve ()

Resolves a deserialized instance to the correct constant attribute.

Returns
Object the Attribute this instance represents.
Throws
InvalidObjectException if this instance is not of type Attribute.class or if it is not a known Attribute.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.