Utility Functions and C Language Reference > Utility Functions: Java (lr.) > Alphabetical Listing > lr.value_check

lr.value_check

Example: lr.value_check Informational Functions

Checks the value of a parameter.

Java Language

Syntax 1

Boolean lr.value_check ( <type> variable, <type> value, expression );

Syntax 2

Boolean lr.value_check ( Object obj, String value, expression );

Arguments

Name Comments
variable The unknown value to evaluate. Can be String, int, byte, char, double, float, long, short, or Boolean.
obj Serializable object to evaluate.
value The value or string for comparison. The type must be the same as the variable type.
expression An expression: lr.EQUALS or lr.NOT_EQUALS.

The lr.value_check function checks the actual value of the parameter, variable, or a member of an object, obj, against the value that you pass to the function, value. Use expression to form the comparison clause, either equal or not equal. If the clause is not true, an exception occurs and an error message is issued to the Output window.

The Object Parameter

When passing an object, obj, to evaluate, lr.value_check will not compare the entire object. Only members specified in the value argument will be validated. value include the member type, name and value, in the following format:

"member_type name = value"

To search and compare multiple members within the same lr.value_check method, the following format for value is used:

"member_type name = value + member_type2 name2 = value2"

Note: Members of type java.lang.String must use a '#' delimiter in the following format:
"java.lang.String myString = #myValue# + int myInteger = 4"

Multiple lr.value_check methods can be used for advanced verification. Where applicable, package and imports are not considered and full specification of the member type is required.

Return Values

Returns a Boolean value.

Parameterization

Standard parameterization is not available for this function.