x10.lang
Class Boolean

x10.lang.Boolean
All Implemented Interfaces:
Any

public struct class Boolean
implements Any, Comparable<Boolean>, Any

Boolean is a logical data type, with two values: 'true' and 'false'. All of the normal logical operations are defined on Boolean. There are also static methods that define conversions to and from String, as well as some Boolean constants.


Field Summary
static Boolean TRUE
          Field Type: x10.lang.Boolean{self==true} A constant holding the Boolean value 'true'.
static Boolean FALSE
          Field Type: x10.lang.Boolean{self==false} A constant holding the Boolean value 'false'.
 
Constructor Summary
Boolean()
          
 
Method Summary
 Boolean operator!()
          A logical complement operator.
 Boolean operator&(Boolean x)
          A logical and operator (not short-circuiting).
 Boolean operator|(Boolean x)
          A logical or operator (not short-circuiting).
 Boolean operator^(Boolean x)
          A logical xor operator.
 String toString()
          Returns a String representation of this Boolean.
static Boolean parseBoolean(String s)
          Deprecated. use parse(String) instead
static Boolean parse(String s)
          Parses the String argument as a Boolean.
 Boolean equals(Any x)
          Return true if the given entity is a Boolean, and this Boolean is equal to the given entity.
 Boolean equals(Boolean x)
          Returns true if this Boolean is equal to the given Boolean.
 Int compareTo(Boolean x)
          Returns a negative Int, zero, or a positive Int if this Boolean is less than, equal to, or greater than the given Boolean.
 String typeName()
          
 Boolean _struct_equals(Any other)
          
 Boolean _struct_equals(Boolean other)
          
 Boolean x10$lang$Boolean$$x10$lang$Boolean$this()
          Declaration: x10$lang$Boolean$$x10$lang$Boolean$this(): x10.lang.Boolean{self==this(:x10.lang.Boolean)}. Boolean is a logical data type, with two values: 'true' and 'false'.
 
Methods inherited from interface x10.lang.Comparable
compareTo
 
Methods inherited from interface x10.lang.Any
toString, typeName, equals, hashCode
 

Field Detail

TRUE

public static final Boolean TRUE
Field Type: x10.lang.Boolean{self==true}
A constant holding the Boolean value 'true'.


FALSE

public static final Boolean FALSE
Field Type: x10.lang.Boolean{self==false}
A constant holding the Boolean value 'false'.

Constructor Detail

Boolean

public Boolean()

Method Detail

operator!

public final Boolean operator!()
A logical complement operator. Computes a logical complement of this Boolean.

Returns:
the logical complement of this Boolean.

operator&

public final Boolean operator&(Boolean x)
A logical and operator (not short-circuiting). Computes a logical AND of this Boolean and the other Boolean. Evaluates both arguments.

Parameters:
x - the other Boolean
Returns:
the logical AND of this Boolean and the other Boolean.

operator|

public final Boolean operator|(Boolean x)
A logical or operator (not short-circuiting). Computes a logical OR of this Boolean and the other Boolean. Evaluates both arguments.

Parameters:
x - the other Boolean
Returns:
the logical OR of this Boolean and the other Boolean.

operator^

public final Boolean operator^(Boolean x)
A logical xor operator. Computes a logical XOR of this Boolean and the other Boolean.

Parameters:
x - the other Boolean
Returns:
the logical XOR of this Boolean and the other Boolean.

toString

public final String toString()
Returns a String representation of this Boolean.

Returns:
a string representation of this Boolean.

parseBoolean

public static final Boolean parseBoolean(String s)
Deprecated. use parse(String) instead


parse

public static final Boolean parse(String s)
Parses the String argument as a Boolean. The Boolean returned represents the value 'true' if the String argument is not null and is equal, ignoring case, to the string "true".

Parameters:
s - the String containing the Boolean representation to be parsed
Returns:
the Boolean represented by the String argument.

equals

public final Boolean equals(Any x)
Return true if the given entity is a Boolean, and this Boolean is equal to the given entity.

Parameters:
x - the given entity
Returns:
true if this Boolean is equal to the given entity.

equals

public final Boolean equals(Boolean x)
Returns true if this Boolean is equal to the given Boolean.

Parameters:
x - the given Boolean
Returns:
true if this Boolean is equal to the given Boolean.

compareTo

public final Int compareTo(Boolean x)
Returns a negative Int, zero, or a positive Int if this Boolean is less than, equal to, or greater than the given Boolean.

Parameters:
x - the given Boolean
Returns:
a negative Int, zero, or a positive Int if this Boolean is less than, equal to, or greater than the given Boolean.

typeName

public final String typeName()


_struct_equals

public final Boolean _struct_equals(Any other)


_struct_equals

public final Boolean _struct_equals(Boolean other)


x10$lang$Boolean$$x10$lang$Boolean$this

public final Boolean x10$lang$Boolean$$x10$lang$Boolean$this()
Declaration: x10$lang$Boolean$$x10$lang$Boolean$this(): x10.lang.Boolean{self==this(:x10.lang.Boolean)}.
Boolean is a logical data type, with two values: 'true' and 'false'.
All of the normal logical operations are defined on Boolean.
There are also static methods that define conversions to and from String,
as well as some Boolean constants.