edu.cmu.minorthird.text
Class CharAnnotation

java.lang.Object
  extended by edu.cmu.minorthird.text.CharAnnotation

public class CharAnnotation
extends java.lang.Object

Represents a stand-off annotation by character ie offset, length, and type The stand-off annotation is generally immutable

Author:
ksteppe

Constructor Summary
CharAnnotation(int offset, int length, java.lang.String type)
          create the annotation
 
Method Summary
 int getLength()
           
 int getOffset()
           
 java.lang.String getType()
           
 void setLength(int length)
           
 void setOffset(int offset)
           
 void setType(java.lang.String type)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CharAnnotation

public CharAnnotation(int offset,
                      int length,
                      java.lang.String type)
create the annotation

Parameters:
offset - - start index in the string
length - - # of chars covered
type - - the name of the annotation applied
Method Detail

getLength

public int getLength()

setLength

public void setLength(int length)

getOffset

public int getOffset()

setOffset

public void setOffset(int offset)

getType

public java.lang.String getType()

setType

public void setType(java.lang.String type)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object