<Default Package>
Type boolean


Boolean type.

The boolean type has two possible values: true and false. The default value is false.

Booleans are routable in an event, they are acyclic, they can be parsed and they are comparable.

false sorts before true.

Booleans support the following operators:

=Compare two booleans for equality
!=Compare two booleans for inequality
orBoolean (logical) or
andBoolean (logical) and
xorBoolean (logical) xor
notBoolean (logical) not

Action summary
 booleanstatic canParse(string s)

Check if the string argument can be successfully parsed as a boolean.
 integerhash()

Get an integer hash representation of the underlying object.
 booleanstatic parse(string s)

Parse a string as a boolean.
 stringtoString()

Convert this boolean to a string.
 
Action detail

canParse

            boolean static canParse(string s)
        
Check if the string argument can be successfully parsed as a boolean.
Parameters:
s - The string to test for parseability.
Returns:
True if the string could be parsed as a boolean, false otherwise.
See Also:
boolean#parse() - See the parse method for how booleans are parsed.
string#toBoolean() - See the string type for an alternative way to convert strings to booleans.

hash

            integer hash()
        
Get an integer hash representation of the underlying object.

This function will return an integer evenly distributed over the whole range suitable for partitioning or indexing of that structure. Multiple different object can resolve to the same hash value.
Returns:
An integer respresentation of the underlying object.

parse

            boolean static parse(string s)
        
Parse a string as a boolean.

Valid arguments are either "true" or "false" in any capitalization.
Parameters:
s - The string to parse as a boolean.
Returns:
The boolean corresponding to the string.
Throws:
Throws ParseException if the argument cannot be parsed.

toString

            string toString()
        
Convert this boolean to a string.
Returns:
"true" if this boolean is true, otherwise "false".