timertests
Class DataSet<T>

java.lang.Object
  extended by timertests.DataSet<T>

 class DataSet<T>
extends java.lang.Object


Field Summary
protected  java.util.ArrayList<T> data
          the actual (city) data
protected  int size
          the actual size of the data set
protected  java.lang.String type
          sequential or random data organization
 
Constructor Summary
protected DataSet(int size, java.lang.String type)
          The constructor that reserves the desired space and records how the dataset will be constructed
protected DataSet(java.lang.String type, java.util.ArrayList<T> data)
          The constructor that uses for its data the given ArrayList and records how the dataset has been be constructed
 
Method Summary
protected  void add(T city)
          Add the given (city) data to this data set
protected  stresstests.interfaces.Traversal<T> getTraversal()
          Provide an iterator for this data set
static void main(java.lang.String[] argv)
          Self Test
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

size

protected int size
the actual size of the data set


type

protected java.lang.String type
sequential or random data organization


data

protected java.util.ArrayList<T> data
the actual (city) data

Constructor Detail

DataSet

protected DataSet(int size,
                  java.lang.String type)
The constructor that reserves the desired space and records how the dataset will be constructed

Parameters:
size - the designated size of the dataset
type - dataset organization: sequential or random

DataSet

protected DataSet(java.lang.String type,
                  java.util.ArrayList<T> data)
The constructor that uses for its data the given ArrayList and records how the dataset has been be constructed

Parameters:
type - dataset organization: sequential or random
data - the ArrayList that will be this dataset
Method Detail

add

protected void add(T city)
Add the given (city) data to this data set

Parameters:
city - the data to add

getTraversal

protected stresstests.interfaces.Traversal<T> getTraversal()
Provide an iterator for this data set

Returns:
Traversal for this dataset

main

public static void main(java.lang.String[] argv)
Self Test