edu.cmu.minorthird.text
Class TextToken
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
TextToken
public TextToken(Document document,
int lo,
int len)
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