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
-
InstructionArray(int, Instruction[])
- Create a new array given a Java array of instructions.
-
elementAt(int)
- Returns the instruction at ith index.
-
elements()
-
Returns an enumerator for the elements in this array class.
-
firstElement()
- return the first instruction.
-
getInstructions()
- returns the actual array of instructions if user needs it.
-
size()
- returns the size of this array.
-
updateModifiedIndex(int, int)
- Modifies the index of instructions in this array to reflect the
changes that resulted from adding instructions to another array.
InstructionArray
public InstructionArray(int size_,
Instruction instructions_[])
- Create a new array given a Java array of instructions.
- Parameters:
- array - size
- array - of instructions
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
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
getInstructions
public Instruction[] getInstructions()
- returns the actual array of instructions if user needs it.
- Returns:
- array of instructions
- See Also:
- Instruction
size
public int size()
- returns the size of this array.
- Returns:
- an integer representing the size of this array.
firstElement
public Instruction firstElement()
- return the first instruction.
- Returns:
- the first element in the instructions array
- See Also:
- Instruction
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