edu.wpi.cs.dsrg.xmldb.xat.component.gui.utils
Class StatisticStorage

java.lang.Object
  |
  +--edu.wpi.cs.dsrg.xmldb.xat.component.gui.utils.StatisticStorage

public class StatisticStorage
extends java.lang.Object

The StatisticStorage class manages all of the statistics. The first HashMap's 'key' is the XATQueryObject representing a:

and the 'value' is another HashMap. This second HashMap's 'key' is the statistic name and 'value' is an ArrayList of statistic values.

Author:
Maylene Waltz

Constructor Summary
StatisticStorage(GUI gui)
          Initializes the StatisticStorage HashMap.
 
Method Summary
 java.lang.Object getStatistic(java.lang.Object key, java.lang.String statistic)
          Returns an ArrayList of statistic values for the given key and statistic.
 void initialize()
          Initializes the StatisticStorage HashMap keys to all of the trees, queues and operators and values to HashMaps.
 void update(java.lang.Object queryObject)
          Updates all of the statistic values for the given queryObject.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatisticStorage

public StatisticStorage(GUI gui)
Initializes the StatisticStorage HashMap.

Method Detail

getStatistic

public java.lang.Object getStatistic(java.lang.Object key,
                                     java.lang.String statistic)
Returns an ArrayList of statistic values for the given key and statistic.

Parameters:
key - - edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATQueryObject
statistic - - java.lang.String
Returns:
ArrayList - An ArrayList of statistic values.

initialize

public void initialize()
Initializes the StatisticStorage HashMap keys to all of the trees, queues and operators and values to HashMaps. The second HashMap's keys are the statistic names and values are empty ArrayLists to hold the statistic values.


update

public void update(java.lang.Object queryObject)
Updates all of the statistic values for the given queryObject.

Parameters:
queryObject - - edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATQueryObject