org.jcpsim.plot
Class RbResultParameter

java.lang.Object
  extended by org.jcpsim.plot.ResultParameter
      extended by org.jcpsim.plot.RbResultParameter

public class RbResultParameter
extends ResultParameter


Constructor Summary
RbResultParameter(java.lang.String name, java.lang.String type, java.lang.String unit, double min, double max)
           
 
Method Summary
 double get()
          Gets the actual element.
 double get(int i)
          Retrieves a value from the buffer.
 int getLength()
           
 boolean isEmpty()
           
 void put(double item)
          Writes a value to the buffer.
 void reset(int length)
           
 int size()
           
 
Methods inherited from class org.jcpsim.plot.ResultParameter
getMax, getMin, getName, getTrimmed, getType, getTypeWithUnit, getUnit, trim
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RbResultParameter

public RbResultParameter(java.lang.String name,
                         java.lang.String type,
                         java.lang.String unit,
                         double min,
                         double max)
Method Detail

reset

public void reset(int length)

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in class ResultParameter

size

public int size()
Specified by:
size in class ResultParameter

getLength

public int getLength()

put

public void put(double item)
Writes a value to the buffer.

Specified by:
put in class ResultParameter
Parameters:
item - the value

get

public double get()
Gets the actual element. Does not check if the buffer is empty (for sake of speed).

Specified by:
get in class ResultParameter
Returns:
the newest (= actual) element

get

public double get(int i)
Retrieves a value from the buffer. To read all values:
for (int i=0; i.

Specified by:
get in class ResultParameter
Parameters:
i - 0: the newest value in the buffer; 1: the newest but one value; size()-1: the oldest value
Returns:
the value


jCpSim (Java CardioPulmonary SIMulations), v0.2.01
Dr. Frank Fischer, frank@jcpsim.org, http://www.jcpsim.org