spiglet.translate.graph
Class Liveness.LiveRange

java.lang.Object
  extended by spiglet.translate.graph.Liveness.LiveRange
All Implemented Interfaces:
java.lang.Comparable<Liveness.LiveRange>
Enclosing class:
Liveness<T>

public class Liveness.LiveRange
extends java.lang.Object
implements java.lang.Comparable<Liveness.LiveRange>

Defines the data structure for a live range of a variable, with the natural ordering based on start point.


Method Summary
 int compareTo(Liveness.LiveRange o)
          The natural ordering of a live range is by its start point (ascending).
 int getEnd()
          Returns the end number of the live range.
 int getStart()
          Returns the start number of the live range.
 T getVar()
          Returns the variable of this range.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getVar

public T getVar()
Returns the variable of this range.

Returns:
the associated variable

getStart

public int getStart()
Returns the start number of the live range.

Returns:
the start of the live range

getEnd

public int getEnd()
Returns the end number of the live range.

Returns:
the end of the live range

compareTo

public int compareTo(Liveness.LiveRange o)
The natural ordering of a live range is by its start point (ascending).

Specified by:
compareTo in interface java.lang.Comparable<Liveness.LiveRange>
Parameters:
o - the compared live range
Returns:
positive if this live range's start point is smaller than o. Negative is larger, and zero otherwise.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object