public class RMRange extends RMObject
I should probably convert this class to have _end instead of _length.
Constructor and Description |
---|
RMRange()
Creates and empty range (0,0).
|
RMRange(int aStart,
int anEnd)
Creates a range with the given start and length.
|
RMRange(RMRange aRange)
Creates a range equal to the given range.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(int aLocation)
Returns whether this range contains aLocation.
|
int |
end()
Returns the end of the range.
|
boolean |
equals(java.lang.Object anObj)
Standard equals implementation.
|
void |
intersect(RMRange aRange)
Constricts this range to its start/end and given range's start/end.
|
RMRange |
intersectRange(RMRange aRange)
Returns whether given range intersects this range.
|
int |
length()
Returns the length of the range.
|
void |
set(int aStart,
int anEnd)
Sets the start and end of the range.
|
void |
set2(int aStart,
int aLength)
Sets the start and length of the range.
|
void |
setLength(int aLength)
Sets the length of the range.
|
int |
start()
Returns the start of the range.
|
java.lang.String |
toString()
Returns a string representation of this range.
|
clone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
public RMRange()
public RMRange(int aStart, int anEnd)
public RMRange(RMRange aRange)
public int start()
public int end()
public int length()
public void set(int aStart, int anEnd)
public void set2(int aStart, int aLength)
public void setLength(int aLength)
public boolean contains(int aLocation)
public boolean equals(java.lang.Object anObj)
equals
in class java.lang.Object
public RMRange intersectRange(RMRange aRange)
public void intersect(RMRange aRange)
public java.lang.String toString()
toString
in class java.lang.Object