java.text
Class Annotation

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.text.Annotation

public class Annotation
extends Object sample code for java.lang.Object definition code for java.lang.Object

An Annotation object is used as a wrapper for a text attribute value if the attribute has annotation characteristics. These characteristics are:

An example is grammatical information attached to a sentence: For the previous sentence, you can say that "an example" is the subject, but you cannot say the same about "an", "example", or "exam". When the text is changed, the grammatical information typically becomes invalid. Another example is Japanese reading information (yomi).

Wrapping the attribute value into an Annotation object guarantees that adjacent text runs don't get merged even if the attribute values are equal, and indicates to text containers that the attribute should be discarded if the underlying text is modified.

Since:
1.2
See Also:
AttributedCharacterIterator sample code for java.text.AttributedCharacterIterator definition code for java.text.AttributedCharacterIterator

Constructor Summary
Annotation sample code for java.text.Annotation.Annotation(java.lang.Object) definition code for java.text.Annotation.Annotation(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  value)
          Constructs an annotation record with the given value, which may be null.
 
Method Summary
 Object sample code for java.lang.Object definition code for java.lang.Object getValue sample code for java.text.Annotation.getValue() definition code for java.text.Annotation.getValue() ()
          Returns the value of the attribute, which may be null.
 String sample code for java.lang.String definition code for java.lang.String toString sample code for java.text.Annotation.toString() definition code for java.text.Annotation.toString() ()
          Returns the String representation of this Annotation.
 
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() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , 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() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , 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)
 

Constructor Detail

Annotation sample code for java.text.Annotation(java.lang.Object) definition code for java.text.Annotation(java.lang.Object)

public Annotation(Object sample code for java.lang.Object definition code for java.lang.Object  value)
Constructs an annotation record with the given value, which may be null.

Parameters:
value - The value of the attribute
Method Detail

getValue sample code for java.text.Annotation.getValue() definition code for java.text.Annotation.getValue()

public Object sample code for java.lang.Object definition code for java.lang.Object  getValue()
Returns the value of the attribute, which may be null.


toString sample code for java.text.Annotation.toString() definition code for java.text.Annotation.toString()

public String sample code for java.lang.String definition code for java.lang.String  toString()
Returns the String representation of this Annotation.

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.