org.gmetrics.metricset
Class ListMetricSet

java.lang.Object
  extended by org.gmetrics.metricset.ListMetricSet
All Implemented Interfaces:
groovy.lang.GroovyObject, MetricSet

public class ListMetricSet
extends java.lang.Object
implements groovy.lang.GroovyObject, MetricSet

A MetricSet implementation that returns a static List of Metrics passed into its constructor.

Version:
$Revision: 24 $ - $Date: 2009-12-10 21:17:05 -0500 (Thu, 10 Dec 2009) $
Author:
Chris Mair

Constructor Summary
ListMetricSet(java.util.List metrics)
          Construct a new instance from the specified List of metrics.
 
Method Summary
 groovy.lang.MetaClass getMetaClass()
           
 java.util.List getMetrics()
           
 java.lang.Object getProperty(java.lang.String name)
           
 java.lang.Object invokeMethod(java.lang.String name, java.lang.Object args)
           
 void setMetaClass(groovy.lang.MetaClass metaClass)
           
 void setProperty(java.lang.String name, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListMetricSet

public ListMetricSet(java.util.List metrics)
Construct a new instance from the specified List of metrics.

Parameters:
metrics - - the List of List of Metric objects; must not be null, but may be empty.
Method Detail

getMetrics

public java.util.List getMetrics()
Specified by:
getMetrics in interface MetricSet
Returns:
a List of Metric objects

getMetaClass

public groovy.lang.MetaClass getMetaClass()
Specified by:
getMetaClass in interface groovy.lang.GroovyObject

setMetaClass

public void setMetaClass(groovy.lang.MetaClass metaClass)
Specified by:
setMetaClass in interface groovy.lang.GroovyObject

invokeMethod

public java.lang.Object invokeMethod(java.lang.String name,
                                     java.lang.Object args)
Specified by:
invokeMethod in interface groovy.lang.GroovyObject

getProperty

public java.lang.Object getProperty(java.lang.String name)
Specified by:
getProperty in interface groovy.lang.GroovyObject

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
Specified by:
setProperty in interface groovy.lang.GroovyObject


Copyright © 2010. All Rights Reserved.