|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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(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. |
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.
IllegalArgumentException - If endOffs is less than
startOffs, or either argument is less than zero.| Method Detail |
|---|
public int compareTo(DocumentRange other)
compareTo in interface Comparable<DocumentRange>other - Another document range.
public boolean equals(Object other)
equals in class Objectother - 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 Object
public void set(int start,
int end)
start - The new start value, inclusive.end - The new end value, exclusive.
IllegalArgumentException - If end is less than
start, or either argument is less than zero.public String toString()
toString in class Objectpublic 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 | |||||||||