|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.wordhoard.model.text.TextRange
public class TextRange
A text range.
Constructor Summary | |
---|---|
TextRange()
Creates a new empty range. |
|
TextRange(TextLocation loc)
Creates a new text range containing a single location. |
|
TextRange(TextLocation start,
TextLocation end)
Creates a new text range. |
Method Summary | |
---|---|
boolean |
contains(TextLocation loc)
Returns true if this range contains a location. |
boolean |
equals(java.lang.Object o)
Returns true if this range equals another range. |
TextLocation |
getEnd()
Gets the end of the range. |
TextLocation |
getStart()
Gets the start of the range. |
boolean |
isEmpty()
Returns true if the range is empty. |
void |
setEnd(TextLocation end)
Sets the end of the range. |
void |
setStart(TextLocation start)
Sets the start of the range. |
java.lang.String |
toString()
Returns a string representation of the range. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TextRange()
public TextRange(TextLocation start, TextLocation end)
start
- Start of range.end
- End of range. public TextRange(TextLocation loc)
loc
- Start and end location. Method Detail |
---|
public TextLocation getStart()
public void setStart(TextLocation start)
start
- Start of range. public TextLocation getEnd()
public void setEnd(TextLocation end)
end
- End of range. public boolean isEmpty()
The range is empty if the start location is greater than or equal to the end location.
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- The other range.
public boolean contains(TextLocation loc)
loc
- Location.
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |