Package com.reportmill.base
Class RMRange
- java.lang.Object
- 
- com.reportmill.base.RMObject
- 
- com.reportmill.base.RMRange
 
 
- 
- All Implemented Interfaces:
- RMArchiver.Archiving,- java.lang.Cloneable
 
 public class RMRange extends RMObject This class represents a simple integer range (from start to end).I should probably convert this class to have _end instead of _length. 
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(int aLocation)Returns whether this range contains aLocation.intend()Returns the end of the range.booleanequals(java.lang.Object anObj)Standard equals implementation.voidintersect(RMRange aRange)Constricts this range to its start/end and given range's start/end.RMRangeintersectRange(RMRange aRange)Returns whether given range intersects this range.intlength()Returns the length of the range.voidset(int aStart, int anEnd)Sets the start and end of the range.voidset2(int aStart, int aLength)Sets the start and length of the range.voidsetLength(int aLength)Sets the length of the range.intstart()Returns the start of the range.java.lang.StringtoString()Returns a string representation of this range.- 
Methods inherited from class com.reportmill.base.RMObjectclone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
 
- 
 
- 
- 
- 
Constructor Detail- 
RMRangepublic RMRange() Creates and empty range (0,0).
 - 
RMRangepublic RMRange(int aStart, int anEnd)Creates a range with the given start and length.
 - 
RMRangepublic RMRange(RMRange aRange) Creates a range equal to the given range.
 
- 
 - 
Method Detail- 
startpublic int start() Returns the start of the range.
 - 
endpublic int end() Returns the end of the range.
 - 
lengthpublic int length() Returns the length of the range.
 - 
setpublic void set(int aStart, int anEnd)Sets the start and end of the range.
 - 
set2public void set2(int aStart, int aLength)Sets the start and length of the range.
 - 
setLengthpublic void setLength(int aLength) Sets the length of the range.
 - 
containspublic boolean contains(int aLocation) Returns whether this range contains aLocation.
 - 
equalspublic boolean equals(java.lang.Object anObj) Standard equals implementation.- Overrides:
- equalsin class- java.lang.Object
 
 - 
intersectRangepublic RMRange intersectRange(RMRange aRange) Returns whether given range intersects this range.
 - 
intersectpublic void intersect(RMRange aRange) Constricts this range to its start/end and given range's start/end.
 - 
toStringpublic java.lang.String toString() Returns a string representation of this range.- Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-