Class N15_Extra_ArrayRandomAccessVersusSize.TaskIntArray

java.lang.Object
  extended by N15_Extra_ArrayRandomAccessVersusSize.TaskIntArray
All Implemented Interfaces:
Runnable
Enclosing class:
N15_Extra_ArrayRandomAccessVersusSize

protected static class N15_Extra_ArrayRandomAccessVersusSize.TaskIntArray
extends Object
implements Runnable

Identical to a combination of N08_Part2_DataStructureAccess.TaskAbstract and N08_Part2_DataStructureAccess.ArrayAccess except that is customized for random access of an int[] instead of arbitrary access of an Integer[] (the Programmer notes above explain why). All further javadocs have been stripped from the code below to eliminate duplication, so consult TaskAbstract and ArrayAccess if you need explanation.


Field Summary
protected  int[] array
           
protected  int index
           
 
Constructor Summary
protected N15_Extra_ArrayRandomAccessVersusSize.TaskIntArray(int size)
           
 
Method Summary
protected  void checkArray(int[] ints, int[] indices)
           
protected  int[] makeArray(int size)
           
protected  int[] makeIndices(int size)
           
 void run()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

array

protected final int[] array

index

protected int index
Constructor Detail

N15_Extra_ArrayRandomAccessVersusSize.TaskIntArray

protected N15_Extra_ArrayRandomAccessVersusSize.TaskIntArray(int size)
                                                      throws IllegalArgumentException
Throws:
IllegalArgumentException
Method Detail

makeArray

protected int[] makeArray(int size)

makeIndices

protected int[] makeIndices(int size)

checkArray

protected void checkArray(int[] ints,
                          int[] indices)
                   throws IllegalStateException
Throws:
IllegalStateException

run

public void run()
Specified by:
run in interface Runnable

toString

public String toString()
Overrides:
toString in class Object