edu.cmu.minorthird.text
Class TextToken

java.lang.Object
  extended by edu.cmu.minorthird.text.TextToken
All Implemented Interfaces:
Token, java.io.Serializable, java.lang.Comparable<TextToken>

public class TextToken
extends java.lang.Object
implements java.lang.Comparable<TextToken>, java.io.Serializable, Token

Identifies a particular substring of a particular document.

Author:
William Cohen
See Also:
Serialized Form

Constructor Summary
TextToken(Document document, int lo, int len)
           
 
Method Summary
 java.lang.String asString()
           
 int compareTo(TextToken other)
           
 boolean equals(java.lang.Object o)
           
 java.lang.String getDocument()
           
 java.lang.String getDocumentId()
           
 int getHi()
           
 int getLength()
           
 int getLo()
           
 java.lang.String getValue()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextToken

public TextToken(Document document,
                 int lo,
                 int len)
Method Detail

getDocumentId

public java.lang.String getDocumentId()

getDocument

public java.lang.String getDocument()

getLo

public int getLo()

getLength

public int getLength()

getHi

public int getHi()

getValue

public java.lang.String getValue()
Specified by:
getValue in interface Token

compareTo

public int compareTo(TextToken other)
Specified by:
compareTo in interface java.lang.Comparable<TextToken>

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

asString

public java.lang.String asString()

toString

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