AttributedCharacterIterator.Attribute
Stay organized with collections
Save and categorize content based on your preferences.
Known Direct Subclasses
Format.Field |
Defines constants that are used as attribute keys in the
AttributedCharacterIterator returned
from Format.formatToCharacterIterator and as
field identifiers in FieldPosition . |
TextAttribute |
The TextAttribute class defines attribute keys and
attribute values used for text rendering. |
|
Known Indirect Subclasses
DateFormat.Field |
Defines constants that are used as attribute keys in the
AttributedCharacterIterator returned
from DateFormat.formatToCharacterIterator and as
field identifiers in FieldPosition . |
MessageFormat.Field |
Defines constants that are used as attribute keys in the
AttributedCharacterIterator returned
from MessageFormat.formatToCharacterIterator . |
NumberFormat.Field |
Defines constants that are used as attribute keys in the
AttributedCharacterIterator returned
from NumberFormat.formatToCharacterIterator and as
field identifiers in FieldPosition . |
|
Defines attribute keys that are used to identify text attributes. These
keys are used in AttributedCharacterIterator
and AttributedString
.
Protected Constructor Summary
Public Method Summary
final
boolean
|
|
final
int
|
hashCode()
Returns a hash code value for the object.
|
String
|
toString()
Returns a string representation of the object.
|
Inherited Method Summary
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this Object .
|
boolean
|
equals( Object obj)
Compares this instance with the specified object and indicates if they
are equal.
|
void
|
finalize()
Invoked when the garbage collector has detected that this instance is no longer reachable.
|
final
Class<?>
|
getClass()
Returns the unique instance of Class that represents this
object's class.
|
int
|
hashCode()
Returns an integer hash code for this object.
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
final
void
|
wait(long timeout, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait(long timeout)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
Fields
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.
public
static
final
AttributedCharacterIterator.Attribute
LANGUAGE
Attribute key for the language of some text.
Values are instances of Locale
.
public
static
final
AttributedCharacterIterator.Attribute
READING
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
.
Protected Constructors
protected
Attribute
(String name)
Constructs an Attribute
with the given name.
Parameters
name |
the name of Attribute
|
Public Methods
public
final
boolean
equals
(Object obj)
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 object to compare this instance with. |
Returns
true
if the specified object is equal to this Object
; false
otherwise.
public
final
int
hashCode
()
Returns a hash code value for the object. This version is identical to
the one in Object
, but is also final.
public
String
toString
()
Returns a string representation of the object. This version returns the
concatenation of class name, "("
, a name identifying the attribute
and ")"
.
Returns
- a printable representation of this object.
Protected Methods
protected
String
getName
()
Returns the name of the attribute.
protected
Object
readResolve
()
Resolves instances being deserialized to the predefined constants.
Returns
- the resolved
Attribute
object
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["\u003cp\u003e\u003ccode\u003eAttributedCharacterIterator.Attribute\u003c/code\u003e defines keys for identifying text attributes used in \u003ccode\u003eAttributedCharacterIterator\u003c/code\u003e and \u003ccode\u003eAttributedString\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThese keys, like \u003ccode\u003eINPUT_METHOD_SEGMENT\u003c/code\u003e, \u003ccode\u003eLANGUAGE\u003c/code\u003e, and \u003ccode\u003eREADING\u003c/code\u003e, are associated with specific text properties.\u003c/p\u003e\n"],["\u003cp\u003eAttribute values provide more information about the attribute, such as language or reading pronunciation.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eAttributedCharacterIterator.Attribute\u003c/code\u003e includes methods for equality comparison, hash code retrieval, and string representation.\u003c/p\u003e\n"],["\u003cp\u003eIt is also serializable, allowing it to be saved and restored.\u003c/p\u003e\n"]]],["`AttributedCharacterIterator.Attribute` defines keys for identifying text attributes in `AttributedCharacterIterator` and `AttributedString`. Key actions include constructing attributes with a name and comparing objects for equality. The class provides methods for returning a hash code, a string representation, and the attribute's name. There are three predefined attribute keys: `INPUT_METHOD_SEGMENT`, `LANGUAGE`, and `READING`, which deal with input method segments, text language, and the pronunciation of words respectively. Subclasses provide constants for attribute keys and field identifiers.\n"],null,[]]