java.text
Class AttributedCharacterIterator.Attribute

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.text.AttributedCharacterIterator.Attribute
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable
Direct Known Subclasses:
Format.Field sample code for java.text.Format.Field definition code for java.text.Format.Field , TextAttribute sample code for java.awt.font.TextAttribute definition code for java.awt.font.TextAttribute
Enclosing interface:
AttributedCharacterIterator sample code for java.text.AttributedCharacterIterator definition code for java.text.AttributedCharacterIterator

public static class AttributedCharacterIterator.Attribute
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements Serializable sample code for java.io.Serializable definition code for java.io.Serializable

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

Since:
1.2
See Also:
AttributedCharacterIterator sample code for java.text.AttributedCharacterIterator definition code for java.text.AttributedCharacterIterator , AttributedString sample code for java.text.AttributedString definition code for java.text.AttributedString , Serialized Form

Field Summary
static AttributedCharacterIterator.Attribute sample code for java.text.AttributedCharacterIterator.Attribute definition code for java.text.AttributedCharacterIterator.Attribute INPUT_METHOD_SEGMENT sample code for java.text.AttributedCharacterIterator.Attribute.INPUT_METHOD_SEGMENT definition code for java.text.AttributedCharacterIterator.Attribute.INPUT_METHOD_SEGMENT
          Attribute key for input method segments.
static AttributedCharacterIterator.Attribute sample code for java.text.AttributedCharacterIterator.Attribute definition code for java.text.AttributedCharacterIterator.Attribute LANGUAGE sample code for java.text.AttributedCharacterIterator.Attribute.LANGUAGE definition code for java.text.AttributedCharacterIterator.Attribute.LANGUAGE
          Attribute key for the language of some text.
static AttributedCharacterIterator.Attribute sample code for java.text.AttributedCharacterIterator.Attribute definition code for java.text.AttributedCharacterIterator.Attribute READING sample code for java.text.AttributedCharacterIterator.Attribute.READING definition code for java.text.AttributedCharacterIterator.Attribute.READING
          Attribute key for the reading of some text.
 
Constructor Summary
protected AttributedCharacterIterator.Attribute sample code for java.text.AttributedCharacterIterator.Attribute.AttributedCharacterIterator.Attribute(java.lang.String) definition code for java.text.AttributedCharacterIterator.Attribute.AttributedCharacterIterator.Attribute(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  name)
          Constructs an Attribute with the given name.
 
Method Summary
 boolean equals sample code for java.text.AttributedCharacterIterator.Attribute.equals(java.lang.Object) definition code for java.text.AttributedCharacterIterator.Attribute.equals(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  obj)
          Compares two objects for equality.
protected  String sample code for java.lang.String definition code for java.lang.String getName sample code for java.text.AttributedCharacterIterator.Attribute.getName() definition code for java.text.AttributedCharacterIterator.Attribute.getName() ()
          Returns the name of the attribute.
 int hashCode sample code for java.text.AttributedCharacterIterator.Attribute.hashCode() definition code for java.text.AttributedCharacterIterator.Attribute.hashCode() ()
          Returns a hash code value for the object.
protected  Object sample code for java.lang.Object definition code for java.lang.Object readResolve sample code for java.text.AttributedCharacterIterator.Attribute.readResolve() definition code for java.text.AttributedCharacterIterator.Attribute.readResolve() ()
          Resolves instances being deserialized to the predefined constants.
 String sample code for java.lang.String definition code for java.lang.String toString sample code for java.text.AttributedCharacterIterator.Attribute.toString() definition code for java.text.AttributedCharacterIterator.Attribute.toString() ()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

LANGUAGE sample code for java.text.AttributedCharacterIterator.Attribute.LANGUAGE

public static final AttributedCharacterIterator.Attribute sample code for java.text.AttributedCharacterIterator.Attribute definition code for java.text.AttributedCharacterIterator.Attribute  LANGUAGE
Attribute key for the language of some text.

Values are instances of Locale.

See Also:
Locale sample code for java.util.Locale definition code for java.util.Locale

READING sample code for java.text.AttributedCharacterIterator.Attribute.READING

public static final AttributedCharacterIterator.Attribute sample code for java.text.AttributedCharacterIterator.Attribute definition code for java.text.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.

See Also:
Annotation sample code for java.text.Annotation definition code for java.text.Annotation , String sample code for java.lang.String definition code for java.lang.String

INPUT_METHOD_SEGMENT sample code for java.text.AttributedCharacterIterator.Attribute.INPUT_METHOD_SEGMENT

public static final AttributedCharacterIterator.Attribute sample code for java.text.AttributedCharacterIterator.Attribute definition code for java.text.AttributedCharacterIterator.Attribute  INPUT_METHOD_SEGMENT
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:
Annotation sample code for java.text.Annotation definition code for java.text.Annotation
Constructor Detail

AttributedCharacterIterator.Attribute sample code for java.text.AttributedCharacterIterator.Attribute(java.lang.String) definition code for java.text.AttributedCharacterIterator.Attribute(java.lang.String)

protected AttributedCharacterIterator.Attribute(String sample code for java.lang.String definition code for java.lang.String  name)
Constructs an Attribute with the given name.

Method Detail

equals sample code for java.text.AttributedCharacterIterator.Attribute.equals(java.lang.Object) definition code for java.text.AttributedCharacterIterator.Attribute.equals(java.lang.Object)

public final boolean equals(Object sample code for java.lang.Object definition code for java.lang.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.

Overrides:
equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) in class Object sample code for java.lang.Object definition code for java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Object.hashCode() sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable

hashCode sample code for java.text.AttributedCharacterIterator.Attribute.hashCode() definition code for java.text.AttributedCharacterIterator.Attribute.hashCode()

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.

Overrides:
hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() in class Object sample code for java.lang.Object definition code for java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object) sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable

toString sample code for java.text.AttributedCharacterIterator.Attribute.toString() definition code for java.text.AttributedCharacterIterator.Attribute.toString()

public String sample code for java.lang.String definition code for java.lang.String  toString()
Returns a string representation of the object. This version returns the concatenation of class name, "(", a name identifying the attribute and ")".

Overrides:
toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() in class Object sample code for java.lang.Object definition code for java.lang.Object
Returns:
a string representation of the object.

getName sample code for java.text.AttributedCharacterIterator.Attribute.getName() definition code for java.text.AttributedCharacterIterator.Attribute.getName()

protected String sample code for java.lang.String definition code for java.lang.String  getName()
Returns the name of the attribute.


readResolve sample code for java.text.AttributedCharacterIterator.Attribute.readResolve() definition code for java.text.AttributedCharacterIterator.Attribute.readResolve()

protected Object sample code for java.lang.Object definition code for java.lang.Object  readResolve()
                      throws InvalidObjectException sample code for java.io.InvalidObjectException definition code for java.io.InvalidObjectException 
Resolves instances being deserialized to the predefined constants.

Throws:
InvalidObjectException sample code for java.io.InvalidObjectException definition code for java.io.InvalidObjectException