FreeHEP API
Version current

hep.aida.ref.pdf
Class Variable

java.lang.Object
  extended byhep.aida.ref.pdf.Variable
All Implemented Interfaces:
HasName, HasUnits, HasValue
Direct Known Subclasses:
Dependent, Function, Parameter

public abstract class Variable
extends Object
implements HasName, HasValue, HasUnits

The base class for a Variable object. Variables can be dependent, parameters and Functions.

Author:
The FreeHEP team @ SLAC.
Source Code:
Variable.java

Field Summary
static int DEPENDENT
           
static int FUNCTION
           
static int PARAMETER
           
 
Constructor Summary
Variable(String name, int type)
           
Variable(String name, int type, String units)
           
Variable(String name, int type, Units units)
           
 
Method Summary
 void addVariableListener(VariableListener listener)
           
 String name()
          Get the name.
 void removeVariableListener(VariableListener listener)
           
 void setName(String name)
          Set the name.
 void setUnits(Units units)
          Set the object's Units.
 void setValue(double value)
          Set the current value.
protected abstract  void setVariableValue(double value)
           
 int type()
           
 Units units()
          Get the Units of the object.
abstract  double value()
          Get the current value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FUNCTION

public static int FUNCTION

DEPENDENT

public static int DEPENDENT

PARAMETER

public static int PARAMETER
Constructor Detail

Variable

public Variable(String name,
                int type)

Variable

public Variable(String name,
                int type,
                String units)

Variable

public Variable(String name,
                int type,
                Units units)
Method Detail

addVariableListener

public void addVariableListener(VariableListener listener)

removeVariableListener

public void removeVariableListener(VariableListener listener)

type

public int type()

name

public String name()
Description copied from interface: HasName
Get the name.

Specified by:
name in interface HasName
Returns:
the name.

setName

public void setName(String name)
Description copied from interface: HasName
Set the name.

Specified by:
setName in interface HasName
Parameters:
name - The new name.

units

public Units units()
Description copied from interface: HasUnits
Get the Units of the object.

Specified by:
units in interface HasUnits
Returns:
The object's Units.

setUnits

public void setUnits(Units units)
Description copied from interface: HasUnits
Set the object's Units.

Specified by:
setUnits in interface HasUnits
Parameters:
units - The new Units.

value

public abstract double value()
Description copied from interface: HasValue
Get the current value.

Specified by:
value in interface HasValue
Returns:
The current value.

setValue

public void setValue(double value)
Description copied from interface: HasValue
Set the current value.

Specified by:
setValue in interface HasValue
Parameters:
value - The new value.

setVariableValue

protected abstract void setVariableValue(double value)

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.