jcaas.script_nodes
Class IndexedList

java.lang.Object
  extended by jcaas.script_nodes.IndexedList
All Implemented Interfaces:
java.lang.Comparable

public class IndexedList
extends java.lang.Object
implements java.lang.Comparable

Author:
bradley An IndexedList contains two objects, an InstructionList and an index. The IndexedList allows for the the InstructionLists to be added in reverse order (largest index first) in order to maintain the original InstructionList's order.

Constructor Summary
IndexedList(org.apache.bcel.generic.InstructionList list, int index)
          IndexedList constructor
 
Method Summary
 int compareTo(java.lang.Object newList)
          The compareTo method, implemented for the Comparable interface.
 int getIndex()
          Returns the index
 org.apache.bcel.generic.InstructionList getInstructionList()
          Returns the InstructionList
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexedList

public IndexedList(org.apache.bcel.generic.InstructionList list,
                   int index)
IndexedList constructor

Parameters:
list - - the Instructionlist
index - - the index at which the InstructionList is to be added
Method Detail

getIndex

public int getIndex()
Returns the index

Returns:
- index at which the InstructionList is to be added

getInstructionList

public org.apache.bcel.generic.InstructionList getInstructionList()
Returns the InstructionList

Returns:
- InstructionList to be added

compareTo

public int compareTo(java.lang.Object newList)
The compareTo method, implemented for the Comparable interface. The method returns the comparing of two integers, the indicies of the two object being compared.

Specified by:
compareTo in interface java.lang.Comparable