cin.aquario
Class SetupRandom

java.lang.Object
  extended byorg.simulare.Named
      extended byorg.simulare.AbstractTask
          extended bycin.aquario.SetupRandom
All Implemented Interfaces:
Name, Task

public class SetupRandom
extends AbstractTask

Sets up an attribute with a value in the range of min up to max. By now, this classe only set up attributes of tipe "int" or "double".


Field Summary
 
Fields inherited from class org.simulare.AbstractTask
tevent
 
Constructor Summary
SetupRandom()
           
SetupRandom(java.lang.String attribute, double min, double max)
           
 
Method Summary
 void execute(Item item)
          Executes atask over an item.
 java.lang.String getAttribute()
           
 double getMax()
           
 double getMin()
           
 void setAttribute(java.lang.String attribute)
           
 void setMax(double max)
           
 void setMin(double min)
           
 
Methods inherited from class org.simulare.AbstractTask
addTaskListener, fireTask, fireTaskExecuted, removeTaskListener
 
Methods inherited from class org.simulare.Named
addNameListener, fireName, fireNameChanged, getName, removeNameListener, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.simulare.Name
addNameListener, getName, removeNameListener, setName
 

Constructor Detail

SetupRandom

public SetupRandom()

SetupRandom

public SetupRandom(java.lang.String attribute,
                   double min,
                   double max)
Method Detail

getAttribute

public java.lang.String getAttribute()

setAttribute

public void setAttribute(java.lang.String attribute)

getMin

public double getMin()

setMin

public void setMin(double min)

getMax

public double getMax()

setMax

public void setMax(double max)

execute

public void execute(Item item)
Description copied from interface: Task
Executes atask over an item. And must notify the listeners.

Parameters:
item - The item to execute a task over.