Literals

Listed below are literals support by the Advantage application and can be used as part of the expression provided in the Validation field on the Configurable Validation table.

Item

Description

Array Literal

Use square brackets with one or more values separated by a comma.

Example:

[ 1, 2, 3 ]

Note: It is always recommended to use all the entries in the array of same class for correct comparisons.

Big Decimal Literals

Use 1 or more digits from 0 to 9, followed by a decimal point and then one or more digits from 0 to 9 suffixed with b or B.

Example:

442.0b

42.0B

Big Integer Literals

Use 1 or more digits from 0 to 9 suffixed with h or H.

Examples:

42h or 42H

Boolean Literals

Use the word true or false.

Examples:

ACTIVE_FL == true or ACTIVE_FL == false

Double Literals

Use 1 or more digits from 0 to 9, followed by a decimal point and then one or more digits from 0 to 9 suffixed with d or D.

Examples:

42.0d

42.0D

Float Literals

Use 1 or more digits from 0 to 9, followed by a decimal point and then one or more digits from 0 to 9, optionally followed by f or F.

Examples:

42.0

42.0f

Integer Literals

 

Use 1 or more digits from 0 to 9.

Examples:

42

100

Long Literals

 

Use 1 or more digits from 0 to 9 suffixed with l or L.

Examples:

42l

42L

Map Literal

Use curly brackets ({ }) with one or more sets of key: value pairs separated by a comma (,).

Example:

{ "one" : 1, "two" : 2, "three" : 3, "more": 4 }

Note: It is always recommended to use all the values in the map of same class for correct comparisons.

Null Literal

 

Use the word null.

Example:

MY_COLUMN == null

Real literals - exponent support

Use standard Java exponent notation (that is, suffix the number with e or E followed by the sign + or - followed by one or more decimal digits).

Examples:

42.0E-1D

42.0E+3B

Set Literal

 

Use curly brackets ({ }) with one or more values separated by a comma (,).

Example:

{ "one" , “two”, "three"}

Note: It is always recommended to use all the entries in the set of same class for correct comparisons.

String Literals

 

Use either the single quote (') or double quotes (").

For example: "Advantage" and 'Advantage' are equivalent.