March 2005
Intermediate to advanced
1254 pages
104h 21m
English
Annotation
This class is a wrapper for a the value
of a text attribute that represents an annotation. Annotations differ
from other types of text attributes in two ways. First, annotations
are linked to the text they are applied to, so changing the text
invalidates or corrupts the meaning of the annotation. Second,
annotations cannot be merged with adjacent annotations, even if they
have the same value. Putting an annotation value in an
Annotation wrapper serves to indicate these
special characteristics. Note that two of the attribute keys defined
by AttributedCharaterIterator.Attribute,
READING and
INPUT_METHOD_SEGMENT, must be used with
Annotation objects.
public class Annotation { // Public Constructors public Annotation(Object value); // Public Instance Methods public Object getValue( ); // Public Methods Overriding Object public String toString( ); }