Added in API level 1

Attribute

open class Attribute : Serializable
kotlin.Any
   ↳ java.text.AttributedCharacterIterator.Attribute

Defines attribute keys that are used to identify text attributes. These keys are used in AttributedCharacterIterator and AttributedString.

Summary

Protected constructors
Attribute(name: String!)

Constructs an Attribute with the given name.

Public methods
Boolean
equals(other: Any?)

Compares two objects for equality.

Int

Returns a hash code value for the object.

open String

Returns a string representation of the object.

Protected methods
open String!

Returns the name of the attribute.

open Any!

Resolves instances being deserialized to the predefined constants.

Properties
static AttributedCharacterIterator.Attribute!

Attribute key for input method segments.

static AttributedCharacterIterator.Attribute!

Attribute key for the language of some text.

static AttributedCharacterIterator.Attribute!

Attribute key for the reading of some text.

Protected constructors

Attribute

Added in API level 1
protected Attribute(name: String!)

Constructs an Attribute with the given name.

Parameters
name String!: the name of Attribute

Public methods

equals

Added in API level 1
fun equals(other: Any?): Boolean

Compares two objects for equality. This version only returns true for x.equals(y) if x and y refer to the same object, and guarantees this for all subclasses.

Parameters
obj the reference object with which to compare.
Return
Boolean true if this object is the same as the obj argument; false otherwise.

hashCode

Added in API level 1
fun hashCode(): Int

Returns a hash code value for the object. This version is identical to the one in Object, but is also final.

Return
Int a hash code value for this object.

toString

Added in API level 1
open fun toString(): String

Returns a string representation of the object. This version returns the concatenation of class name, "(", a name identifying the attribute and ")".

Return
String a string representation of the object.

Protected methods

getName

Added in API level 1
protected open fun getName(): String!

Returns the name of the attribute.

Return
String! the name of Attribute

readResolve

Added in API level 1
protected open fun readResolve(): Any!

Resolves instances being deserialized to the predefined constants.

Return
Any! the resolved Attribute object
Exceptions
java.io.InvalidObjectException if the object to resolve is not an instance of Attribute

Properties

INPUT_METHOD_SEGMENT

Added in API level 1
static val INPUT_METHOD_SEGMENT: AttributedCharacterIterator.Attribute!

Attribute key for input method segments. Input methods often break up text into segments, which usually correspond to words.

Values are instances of Annotation holding a null reference.

LANGUAGE

Added in API level 1
static val LANGUAGE: AttributedCharacterIterator.Attribute!

Attribute key for the language of some text.

Values are instances of Locale.

See Also

READING

Added in API level 1
static val READING: AttributedCharacterIterator.Attribute!

Attribute key for the reading of some text. In languages where the written form and the pronunciation of a word are only loosely related (such as Japanese), it is often necessary to store the reading (pronunciation) along with the written form.

Values are instances of Annotation holding instances of String.