|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJet.Tipster.Span
A portion of a document, represented by its starting and ending character positions, and a pointer to the document.
Constructor Summary | |
Span(int s,
int e)
Creates a span from position s up to position e, with a null document pointer. |
Method Summary | |
int |
compareTo(java.lang.Object o)
compares this Span to Object o, which must be a Span. |
Document |
document()
Returns the Document associated with a Span. |
int |
end()
Returns the end of the span. |
int |
endNoWS(Document doc)
Returns the end of the span, after trimming any white space at the end of the span. |
boolean |
equals(Span s)
Returns true if the start and end of the spans are both equal. |
void |
setDocument(Document doc)
Sets the Document associated with a Span. |
void |
setEnd(int e)
sets the end of the span to 's'. |
void |
setStart(int s)
sets the start of the span to 's'. |
int |
start()
Returns the start of the span. |
java.lang.String |
toString()
Returns a printable form of the span, "[start-end]". |
boolean |
within(Span s)
Returns true if Span 's' contains the span. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Span(int s, int e)
Method Detail |
public int start()
public int end()
public void setStart(int s)
public void setEnd(int e)
public int endNoWS(Document doc)
public void setDocument(Document doc)
public Document document()
public boolean equals(Span s)
public boolean within(Span s)
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |