uk.org.skeet.jbench.tasks
Class ListTraverse

java.lang.Object
  |
  +--uk.org.skeet.jbench.tasks.SimpleTask
        |
        +--uk.org.skeet.jbench.tasks.ListTraverse
All Implemented Interfaces:
BenchTask

public class ListTraverse
extends SimpleTask


Constructor Summary
ListTraverse()
           
 
Method Summary
 void checkConfiguration()
          Checks that we have a positive size
 void checkResults()
          Simple no-op implementation of checkResults.
 java.lang.String getDescription()
          Default description which gives the name of the actual class and the number of iterations.
 void prepareTest()
          Simple no-op implementation of prepareTest.
 void runTest()
          Runs a test.
 void setIterate(boolean iterate)
          Sets the iterate field - if set to true, traverse the set by iteration.
 void setType(java.lang.Class listType)
          Sets the type of list to use, eg java.util.ArrayList
 
Methods inherited from class uk.org.skeet.jbench.tasks.SimpleTask
getSize, setSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListTraverse

public ListTraverse()
Method Detail

setType

public void setType(java.lang.Class listType)
Sets the type of list to use, eg java.util.ArrayList

runTest

public void runTest()
             throws TaskException
Description copied from interface: BenchTask
Runs a test. This is the method which is timed for result purposes. This should not include any preparation or result checking unless the time reported deliberately requires it.
See Also:
BenchTask.runTest()

checkResults

public void checkResults()
                  throws TaskException
Description copied from class: SimpleTask
Simple no-op implementation of checkResults.
Overrides:
checkResults in class SimpleTask
See Also:
SimpleTask.checkResults()

getDescription

public java.lang.String getDescription()
Description copied from class: SimpleTask
Default description which gives the name of the actual class and the number of iterations.
Overrides:
getDescription in class SimpleTask
See Also:
SimpleTask.getDescription()

prepareTest

public void prepareTest()
                 throws TaskException
Description copied from class: SimpleTask
Simple no-op implementation of prepareTest.
Overrides:
prepareTest in class SimpleTask
See Also:
SimpleTask.prepareTest()

checkConfiguration

public void checkConfiguration()
                        throws ConfigurationException
Description copied from class: SimpleTask
Checks that we have a positive size
Overrides:
checkConfiguration in class SimpleTask
See Also:
SimpleTask.checkConfiguration()

setIterate

public void setIterate(boolean iterate)
Sets the iterate field - if set to true, traverse the set by iteration. If set to false, traverse it by the get() operation.
Parameters:
interate - The interate to set