Developing Apama Applications > Apama EPL Reference > Types > Primitive and string data 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:
BooleanMethods
*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 Deploying and Managing Apama Applications, 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 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.