metricsOverlay.model.metrics
Class DerivedMetric
java.lang.Object
metricsOverlay.model.metrics.Metric
metricsOverlay.model.metrics.DerivedMetric
- All Implemented Interfaces:
- java.lang.Comparable<Metric>, IEditable, INameable
public class DerivedMetric
- extends Metric
This class represents a derived form of metric to allow displays to use the
same metric sections.
Note: It has been decided to only allow composition from ActualMetric
objects. This is because the process of wrapping adds no
additional functionality.
- Version:
- 15/8/2009
- Author:
- Matthew Harward
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DerivedMetric
public DerivedMetric(java.lang.String name,
ActualMetric met)
- Reduced constructor. Sets up a default integer range.
- Parameters:
name
- the unique name of this metric.met
- the metric object that this one is derived from.
DerivedMetric
public DerivedMetric(java.lang.String name,
Range range,
ActualMetric met)
- Main constructor.
- Parameters:
name
- the unique name of the metricrange
- the range to be usedmet
- the metric from whence this metric's data is derived.
getMetricSections
public java.util.Set<MetricSection> getMetricSections()
- Specified by:
getMetricSections
in class Metric
- Returns:
- An unmodifiable set of MetricSections
numSections
public int numSections()
- Returns:
- The number of MetricSections associated with this mapping
derivedFrom
public java.lang.String derivedFrom()
- Returns:
- The name of the metric this is derived from.
canChangeEditableStatus
public boolean canChangeEditableStatus()
- Returns:
- A value to determine if the editable status may be changed.
canEdit
public boolean canEdit()
- Returns:
- A boolean value that determines if you are allowed to edit this
class.
setEditable
public void setEditable(boolean editable)
- Description copied from interface:
IEditable
- If allowed, this sets the new editable status.
- Parameters:
editable
- the new status.