doublevalueobject
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| doublevalueobject [2021/10/11 21:01] – created wikiadmin | doublevalueobject [2021/10/11 21:49] (current) – [JavaScript Notes] wikiadmin | ||
|---|---|---|---|
| Line 10: | Line 10: | ||
| There are several sample data sources that can be used to generate Double Value Objects for testing. These are the Random Data (RandomData), | There are several sample data sources that can be used to generate Double Value Objects for testing. These are the Random Data (RandomData), | ||
| - | + | ||
| + | ===Notes=== | ||
| + | |||
| + | Internally the DoubleValueObject will store the value as a java double type. If the java type used to create this value object is a float, the internal type will set as " | ||
| + | |||
| + | If you send a DoubleValueObject to a Manipulator which generates Strings, the value will be stored as a String with three decimal places. | ||
| ===JavaScript Notes=== | ===JavaScript Notes=== | ||
| + | |||
| + | Data will be converted when possible. | ||
| + | |||
| + | <code javascript> | ||
| + | var DoubleValueObject = Java.type(" | ||
| + | var StringValueObject = Java.type(" | ||
| + | var LongValueObject = Java.type(" | ||
| + | |||
| + | test1 = new StringValueObject(new DoubleValueObject(55.654124)); | ||
| + | vo = new LongValueObject(23); | ||
| + | test1 = new DoubleValueObject(vo.getIntValue()); | ||
| + | </ | ||
| Example 1: Create a Double Value Object with value PI | Example 1: Create a Double Value Object with value PI | ||
| Line 34: | Line 52: | ||
| DVO = new DoubleValueObject(value1+value2); | DVO = new DoubleValueObject(value1+value2); | ||
| + | </ | ||
| + | |||
| + | Example 3. Get the float value of an incoming value object | ||
| + | |||
| + | <code javascript> | ||
| + | |||
| + | floatValue = incomingValue.getFloatValue(); | ||
| + | |||
| + | </ | ||
| + | |||
| + | Example 4. Get the Boolean value of the incoming DoubleValueObject | ||
| + | |||
| + | <code javascript> | ||
| + | boolValue = incomingValue.getBoolValue(); | ||
| </ | </ | ||
doublevalueobject.1634000516.txt.gz · Last modified: by wikiadmin
