User Tools

Site Tools


doublevalueobject

This is an old revision of the document!


Double Value Object

com.ergotech.vib.valueobjects.DoubleValueObject

Description

The Double Value Object (“DVO”) is a type of Value Object which is used for decimal numbers (float or double types).

Many of the mathematical manipulators generate Double Value Objects. For example the Scaler will use any numeric input and generate a decimal output. See the documentation on each manipulator for specifics on its output type.

There are several sample data sources that can be used to generate Double Value Objects for testing. These are the Random Data (RandomData), Float Flux Server (FloatFluxServer), and the  Sine Server (SineServer).

JavaScript Notes

Example 1: Create a Double Value Object with value PI

var PI = Java.type("java.util.Math.PI");
var DoubleValueObject = Java.type("com.ergotech.vib.valueobjects.DoubleValueObject");
 
output = new DoubleValueObject(PI);

Example 2: Add two values from two data sources named “Value1” and “Value2”. One value is a decimal number and the other is non-decimal.

var DoubleValueObject = Java.type("com.ergotech.vib.valueobjects.DoubleValueObject");
 
value1 = Value1 -> getDoubleValue();
value2 = Value2 -> getLongValue();
DVO = new DoubleValueObject(value1+value2);
 
doublevalueobject.1634000516.txt.gz · Last modified: by wikiadmin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki