org.arm4.arm40.metric
Class ArmMetricGroup

java.lang.Object
  extended by org.arm4.arm40.transaction.ArmInterface
      extended by org.arm4.arm40.metric.ArmMetricGroup
All Implemented Interfaces:
ArmMetricGroup, ArmInterface

public class ArmMetricGroup
extends ArmInterface
implements ArmMetricGroup

ArmMetricGroup is used to bind objects that implement a subclass of ArmMetric to an ArmTransactionWithMetrics or ArmTranReportWithMetrics object. Instances of ArmMetricGroup are created using the newArmMetricGroup() method of ArmMetricFactory.

Version:
$Revision$ $Date$
Author:
dcarter

Field Summary
protected  ArmMetricGroupDefinition m_definition
           
protected  ArmMetric[] m_metrics
           
protected  boolean[] m_metricValid
           
 
Fields inherited from class org.arm4.arm40.transaction.ArmInterface
m_errorCode, m_factory
 
Constructor Summary
ArmMetricGroup(ArmMetricGroupDefinition groupDefinition, ArmMetric[] metric_instances)
          Create ARM Metric Group.
 
Method Summary
 ArmMetricGroupDefinition getDefinition()
           
 ArmMetric getMetric(int index)
           
 boolean isMetricValid(int index)
           
 int setMetricValid(int index, boolean value)
          Indicates whether an ArmMetric subclass at this array index is valid.
 
Methods inherited from class org.arm4.arm40.transaction.ArmInterface
getErrorCode, getErrorMessage, getFactory, setErrorCode, setFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opengroup.arm40.transaction.ArmInterface
getErrorCode, getErrorMessage, setErrorCode
 

Field Detail

m_metrics

protected ArmMetric[] m_metrics

m_metricValid

protected boolean[] m_metricValid

m_definition

protected ArmMetricGroupDefinition m_definition
Constructor Detail

ArmMetricGroup

public ArmMetricGroup(ArmMetricGroupDefinition groupDefinition,
                      ArmMetric[] metric_instances)
Create ARM Metric Group.

Parameters:
groupDefinition -
metric_instances -
Method Detail

getDefinition

public ArmMetricGroupDefinition getDefinition()
Specified by:
getDefinition in interface ArmMetricGroup
Returns:
the metric group definition used to create this object.

getMetric

public ArmMetric getMetric(int index)
Specified by:
getMetric in interface ArmMetricGroup
Parameters:
index - the index into the ArmMetric array. See comment in the interface description above.
Returns:
the metric at the array index. This value may be null.

isMetricValid

public boolean isMetricValid(int index)
Specified by:
isMetricValid in interface ArmMetricGroup
Parameters:
index - the index into the ArmMetric array. See comment in the interface description above.
Returns:
whether an ArmMetric subclass at this array index is valid.

setMetricValid

public int setMetricValid(int index,
                          boolean value)
Description copied from interface: ArmMetricGroup
Indicates whether an ArmMetric subclass at this array index is valid. This applies when any of the following calls are made:

Specified by:
setMetricValid in interface ArmMetricGroup
Parameters:
index - index the index into the ArmMetric array. See comment in the interface description above.
value - If the valid flag is set then the metric value is processed.
Returns:
0 on sucess; otherwise, a non-zero error code is returned (as specified in ArmInterface).