|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.fife.ui.rsyntaxtextarea.DocumentRange
public class DocumentRange
A range of text in a document.
Constructor Summary | |
---|---|
DocumentRange(int startOffs,
int endOffs)
Constructor. |
Method Summary | |
---|---|
int |
compareTo(DocumentRange other)
Compares this document range to another. |
boolean |
equals(java.lang.Object other)
Returns whether this document range is equal to another one. |
int |
getEndOffset()
Gets the end offset of the range. |
int |
getStartOffset()
Gets the starting offset of the range. |
int |
hashCode()
Overridden simply as a best practice, since equals(Object) is
overridden. |
void |
set(int start,
int end)
Sets the document range. |
java.lang.String |
toString()
Returns a string representation of this object. |
DocumentRange |
translate(int amount)
Translates this document range by a given amount. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DocumentRange(int startOffs, int endOffs)
startOffs
- The starting offset in the document, inclusive.endOffs
- The ending offset in the document, exclusive.
java.lang.IllegalArgumentException
- If endOffs
is less than
startOffs
, or either argument is less than zero.Method Detail |
---|
public int compareTo(DocumentRange other)
compareTo
in interface java.lang.Comparable<DocumentRange>
other
- Another document range.
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- Another object, presumably a document range.
other
is also a document range, and equal
to this one.public int getEndOffset()
getStartOffset()
public int getStartOffset()
getEndOffset()
public int hashCode()
equals(Object)
is
overridden.
hashCode
in class java.lang.Object
public void set(int start, int end)
start
- The new start value, inclusive.end
- The new end value, exclusive.
java.lang.IllegalArgumentException
- If end
is less than
start
, or either argument is less than zero.public java.lang.String toString()
toString
in class java.lang.Object
public DocumentRange translate(int amount)
amount
- The amount to translate this range by.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |