| ILOG JRules User Guide > Customizing JRules > Tasks > Customizing Rule Scenario Manager > Type Precisions Used in Input and Output Parameter Tests |
Type Precisions Used in Input and Output Parameter Tests |
PREVIOUS NEXT |
The INPUT_PARAMETERS and OUTPUT_PARAMETERS tests provide results that take into account the type precision defined by the scenario's configuration.
For example, consider an input/output parameters test such as the following:
<input-parameters>
<entry>
<string>coucou</string>
<package.ObjectName>
<value type="double">10.356</value>
</package.ObjectName>
</entry>
</input-parameters>
CONTAINS
<input-parameters>
<entry>
<string>coucou</string>
<package.ObjectName>
<value type="double">10.357</value>
</package.ObjectName>
</entry>
</input-parameters>
The result of the test is TRUE using a double precision of 10E3 and FALSE using a double precision of 10E4.
Rule Scenario Manager takes into account the following precision of types in tests:
int, java.lang.Integer: for example, 0==-0
short, java.lang.Short: for example, 0==-0
long, java.lang.Long: for example, 0==-0
char, java.lang.Character: for example x==X using a string precision of 0 (NO_CASE_SENSITIVE) and x!=X using a string precision of 1 (CASE_SENSITIVE)
java.math.BigInteger: for example, 0==-0
java.math.BigDecimal: for example, 10.300==10.3, but also 10.3==10.4 using precision 10E1
float, java.lang.Float: for example, 10.300==10.3, but also 10.3==10.4 using precision 10E1
double, java.lang.Double: for example, 10.300==10.3, but also 10.3==10.4 using precision 10E1
date, java.util.date: for example,
ilog.rules.xml.types.IlrDateTime (the date type used in XML binding): for example,
java.sql.Timestamp: for example,
java.sql.Date, java.sql.Time: uses the comparator defined by the compareTo method of these objects
java.lang.String, java.lang.StringBuffer and all other objects serialized in the form of a string: compares the string taking into account the precision 0 (NO_CASE_SENSITIVE) or 1 (CASE_SENSITIVE)
| Copyright © 1987-2008 ILOG S.A. All rights reserved. Legal terms. Documentation homepage. | PREVIOUS NEXT |