SolarMetric Kodo JDO 3.0.3 generated on February 20 2004

com.solarmetric.manage
Class SimpleStatistic

java.lang.Object
  |
  +--com.solarmetric.manage.SimpleStatistic
All Implemented Interfaces:
Statistic

public class SimpleStatistic
extends Object
implements Statistic

A simple statistic implementation. Doesn't have any application specific state.


Fields inherited from interface com.solarmetric.manage.Statistic
DRAW_DISCRETE, DRAW_LINEAR, DRAW_SAMPLEHOLD
 
Constructor Summary
SimpleStatistic(String name, String description, String ordinateDescription, int drawStyle, Watchable watchable, boolean ignoreDuplicates)
          Construct a simple statistic.
SimpleStatistic(String name, String description, String ordinateDescription, Watchable watchable)
          Construct a simple statistic that throws out consecutive equal values settings.
 
Method Summary
 boolean addListener(StatisticListener listener)
          Add a listener.
 void clearListeners()
          Clear all listeners.
 String getDescription()
          Get a description of the statistic.
 int getDrawStyle()
          Get the preferred draw style.
 String getName()
          Get the name of the statistic.
 String getOrdinateDescription()
          Get the description of the ordinate.
 double getValue()
          Get the current value.
 Watchable getWatchable()
          Get the watchable pertaining to this statistic.
 boolean removeListener(StatisticListener listener)
          Remove a listener.
 void setValue(double value)
          Set the current value.
 void setValue(long time, double value)
          Set the current value and establish the time it was set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleStatistic

public SimpleStatistic(String name,
                       String description,
                       String ordinateDescription,
                       Watchable watchable)
Construct a simple statistic that throws out consecutive equal values settings.

SimpleStatistic

public SimpleStatistic(String name,
                       String description,
                       String ordinateDescription,
                       int drawStyle,
                       Watchable watchable,
                       boolean ignoreDuplicates)
Construct a simple statistic.
Method Detail

getName

public String getName()
Get the name of the statistic.
Specified by:
getName in interface Statistic

getDescription

public String getDescription()
Get a description of the statistic.
Specified by:
getDescription in interface Statistic

getOrdinateDescription

public String getOrdinateDescription()
Get the description of the ordinate.
Specified by:
getOrdinateDescription in interface Statistic

getDrawStyle

public int getDrawStyle()
Get the preferred draw style.
Specified by:
getDrawStyle in interface Statistic

getValue

public double getValue()
Get the current value.
Specified by:
getValue in interface Statistic

setValue

public void setValue(long time,
                     double value)
Set the current value and establish the time it was set.

setValue

public void setValue(double value)
Set the current value.

addListener

public boolean addListener(StatisticListener listener)
Add a listener.
Specified by:
addListener in interface Statistic

removeListener

public boolean removeListener(StatisticListener listener)
Remove a listener.
Specified by:
removeListener in interface Statistic

clearListeners

public void clearListeners()
Clear all listeners.
Specified by:
clearListeners in interface Statistic

getWatchable

public Watchable getWatchable()
Get the watchable pertaining to this statistic.
Specified by:
getWatchable in interface Statistic

SolarMetric Kodo JDO 3.0.3 generated on February 20 2004

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.