Package jminusminus
Class NRange
java.lang.Object
jminusminus.NRange
- All Implemented Interfaces:
- Comparable<NRange>
Representation of a liveness range for an interval.
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionNRange(int start, int stop) Constructs a liveness range extending from start to stop (positions in the code).
- 
Method SummaryModifier and TypeMethodDescriptionintReturns a comparison of this range and other by their start positions.booleanrangeOverlaps(NRange other) Returns true if this range overlaps with other, and false otherwise.splitRange(int newStart, int newStop) Truncates the current range to newStop and returns the remainder as a new range.toString()Returns a string representation of this range.
- 
Field Details- 
startpublic int startThe range's start position.
- 
stoppublic int stopThe range's stop position.
 
- 
- 
Constructor Details- 
NRangepublic NRange(int start, int stop) Constructs a liveness range extending from start to stop (positions in the code).- Parameters:
- start- start position.
- stop- stop position.
 
 
- 
- 
Method Details- 
splitRangeTruncates the current range to newStop and returns the remainder as a new range.- Parameters:
- newStart- the new start position.
- newStop- the split position.
- Returns:
- the remainder of this range starting at newStart and ending at its old stop position.
 
- 
rangeOverlapsReturns true if this range overlaps with other, and false otherwise.- Parameters:
- other- the other range.
- Returns:
- true if this range overlaps with other, and false otherwise.
 
- 
compareToReturns a comparison of this range and other by their start positions.- Specified by:
- compareToin interface- Comparable<NRange>
- Parameters:
- other- the other range.
- Returns:
- a comparison of this range and other by their start positions.
 
- 
toStringReturns a string representation of this range.
 
-