Libraries.Language.Types.Boolean Documentation

The Boolean class is the object representation of the primitive type boolean.

Example Code

class Main
   action Main
      boolean isTrue = true
      Boolean result = test(isTrue)
   end
   action test(Boolean bool) returns Boolean
        return bool
   end
e

Inherits from: Libraries.Language.Object

Summary

Actions Summary Table

ActionsDescription
Compare(Libraries.Language.Object object)This action compares two object values and returns an integer.
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their values(true or false).
GetHashCode()This action gets the hash code for an object.
GetText()This action gets the value from the boolean object and casts it to a text value.
GetValue()This action gets the value from the boolean object.
SetValue(boolean i)This action sets the value of the boolean object.

Actions Documentation

Compare(Libraries.Language.Object object)

This action compares two object values and returns an integer. The compare result is either larger if this hash code is larger than the object passed as a parameter, smaller, or equal.

Example Code

Boolean o
        Boolean t
        
        integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smalle

Parameters

Return

integer: The Comprare result, Smaller (-1), Equal (0), or Larger (1).

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their values(true or false).

Example Code

Boolean o
        Boolean t
        boolean result = o:Equals(

Parameters

Return

boolean: True if the values are equal and false if they are not equal.

GetHashCode()

This action gets the hash code for an object. In this case, GetHashCode is overriden to return the integer 1231 if the boolean is true and 1237 if the boolean is false.

Example Code

Object o
        integer hash = o:GetHashCode

Return

integer: The integer hash code of the object.

GetText()

This action gets the value from the boolean object and casts it to a text value.

Example Code

Boolean isTrue
        text result = isTrue:GetText

Return

text: The value of the object converted to text.

GetValue()

This action gets the value from the boolean object.

Example Code

Boolean isTrue
        boolean result = isTrue:GetValue

Return

boolean: The value of the object.

SetValue(boolean i)

This action sets the value of the boolean object.

Example Code

Boolean isTrue
        isTrue:SetValue(tru

Parameters