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 | |
---|---|
Constructs an |
Public methods | |
---|---|
Boolean |
Compares two objects for equality. |
Int |
hashCode() Returns a hash code value for the object. |
open String |
toString() Returns a string representation of the object. |
Protected methods | |
---|---|
open String! |
getName() 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
protected Attribute(name: String!)
Constructs an Attribute
with the given name.
Parameters | |
---|---|
name |
String!: the name of Attribute |
Public methods
equals
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
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
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
protected open fun getName(): String!
Returns the name of the attribute.
Return | |
---|---|
String! |
the name of Attribute |
readResolve
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
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.
See Also
LANGUAGE
static val LANGUAGE: AttributedCharacterIterator.Attribute!
Attribute key for the language of some text.
Values are instances of Locale
.
See Also
READING
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
.
See Also