All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class BIT.highBIT.InstructionArray

java.lang.Object
   |
   +----BIT.highBIT.InstructionArray

public class InstructionArray
extends Object
Represents an array to hold instructions. The reason for creating this class to represent instructions array is that we want to hide as much as we can about the implementation to the user. Also, walking through an array should be faster than walking through a Vector.

See Also:
Instruction

Constructor Index

 o InstructionArray(int, Instruction[])
Create a new array given a Java array of instructions.

Method Index

 o elementAt(int)
Returns the instruction at ith index.
 o elements()
Returns an enumerator for the elements in this array class.
 o firstElement()
return the first instruction.
 o getInstructions()
returns the actual array of instructions if user needs it.
 o size()
returns the size of this array.
 o updateModifiedIndex(int, int)
Modifies the index of instructions in this array to reflect the changes that resulted from adding instructions to another array.

Constructors

 o InstructionArray
 public InstructionArray(int size_,
                         Instruction instructions_[])
Create a new array given a Java array of instructions.

Parameters:
array - size
array - of instructions

Methods

 o elements
 public final synchronized Enumeration elements()
Returns an enumerator for the elements in this array class.

Returns:
new enumeration for the elements in this array
See Also:
Enumeration
 o elementAt
 public Instruction elementAt(int i)
Returns the instruction at ith index.

Parameters:
index - of the wanted instruction
Returns:
the instruction at that index
See Also:
Instruction
 o getInstructions
 public Instruction[] getInstructions()
returns the actual array of instructions if user needs it.

Returns:
array of instructions
See Also:
Instruction
 o size
 public int size()
returns the size of this array.

Returns:
an integer representing the size of this array.
 o firstElement
 public Instruction firstElement()
return the first instruction.

Returns:
the first element in the instructions array
See Also:
Instruction
 o updateModifiedIndex
 public void updateModifiedIndex(int start_instr,
                                 int increment)
Modifies the index of instructions in this array to reflect the changes that resulted from adding instructions to another array. For use by BIT internally.


All Packages  Class Hierarchy  This Package  Previous  Next  Index