Developing Apama Applications > EPL Reference > Types > Primitive and string types > boolean
boolean
The boolean type has two possible values: true or false.
Operators
The table below lists the EPL operators that you can use with Boolean values.
Operator
Description
Result Type
=
Equal comparison
boolean
!=
Not equal comparison
boolean
or
Boolean (logical) or
boolean
and
Boolean (logical) and
boolean
xor
Boolean (logical) exclusive or
boolean
not
Boolean (logical) inverse
boolean
False sorts before true.
Methods
The following methods may be called on variables of boolean type:
*canParse() — returns true if the string argument can be successfully parsed.
*parse() — method that returns the boolean instance represented by the string argument. You can call this method on the boolean type or on an instance of a boolean type. The more typical use is to call parse() directly on the boolean type.
The parse() method takes a single string as its argument. This string must be the string form of a boolean object. The string must adhere to the format described in Event file format. For example:
boolean a;
a := boolean.parse("true");
You can specify the parse() method after an expression or type name. If the correlator is unable to parse the string, it is a runtime error and the monitor instance that the EPL is running in terminates.
*toString() – returns a string representation of the boolean. The return value is "true" if the referenced Boolean’s value is true. The return value is "false" if the referenced Boolean’s value is false.
Copyright © 2013-2015 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.