br.com.oncast.dev.lobo.eval.bean
Class ProfileScenario

java.lang.Object
  extended by br.com.oncast.dev.lobo.eval.bean.ProfileScenario

public class ProfileScenario
extends java.lang.Object

A sub-tree of the reporting profile bean tree specific to a profile scenario.
Profile Scenarios are java methods inside a Profile Case.


Constructor Summary
ProfileScenario(java.lang.String scenarioMethod)
          Creates a new instance of ProfileScenario.
 
Method Summary
 void addMetric(ProfileMetric metric)
          Adds a ProfileMetric to the ProfileScenario.
 ProfileMetric getMetric(java.lang.String key)
          Returns a previously added metric given its key.
 java.util.Collection<ProfileMetric> getMetrics()
          Returns all the collected metrics.
It is guaranteed that the returned collection of ProfileMetrics while iterate over them in the insertion order.
 java.lang.String getScenarioMethod()
           
 void removeMetric(ProfileMetric metric)
          Removes a metric from the scenario.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProfileScenario

public ProfileScenario(java.lang.String scenarioMethod)
Creates a new instance of ProfileScenario.

Parameters:
scenarioMethod - the name of the method coding the scenario.
Method Detail

getScenarioMethod

public java.lang.String getScenarioMethod()
Returns:
the scenarioMethod.

addMetric

public void addMetric(ProfileMetric metric)
Adds a ProfileMetric to the ProfileScenario.


getMetric

public ProfileMetric getMetric(java.lang.String key)
Returns a previously added metric given its key.

Parameters:
key - the metric key.
Returns:
the metric for the key or null if it could not be found.

getMetrics

public java.util.Collection<ProfileMetric> getMetrics()
Returns all the collected metrics.
It is guaranteed that the returned collection of ProfileMetrics while iterate over them in the insertion order.

Returns:
all the collected metrics.

removeMetric

public void removeMetric(ProfileMetric metric)
Removes a metric from the scenario.

Parameters:
metric - the metric to be removed.