Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

java::lang::Boolean Class Reference

The Boolean class wraps a value of the primitive type boolean in an object. More...

#include <java_lang_Boolean.h>

Inheritance diagram for java::lang::Boolean:

Inheritance graph
[legend]
Collaboration diagram for java::lang::Boolean:

Collaboration graph
[legend]
List of all members.

Public Types

enum  {
  xmogDefaultFlags = xmog_base::GLOBAL, xmogMajorVersion = 3, xmogMinorVersion = 2, xmogPatchVersion = 9,
  xmogBuildNumber = 2047
}
typedef ::xmog_java_array_template<
::java::lang::Boolean
array1D
typedef ::xmog_java_array_template<
::xmog_java_array_template<
::java::lang::Boolean > > 
array2D

Public Member Functions

 Boolean (const ::java::lang::String &s,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Allocates a Boolean object representing the value true if the string argument is not null and is equal, ignoring case, to the string "true".
 Boolean (bool value,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Allocates a Boolean object representing the value argument.
bool booleanValue (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Returns the value of this Boolean object as a boolean primitive.
bool equals (const ::java::lang::Object &obj,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Returns true if and only if the argument is not null and is a Boolean object that represents the same boolean value as this object.
jint hashCode (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Returns a hash code for this Boolean object.
::java::lang::String toString (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Returns a String object representing this Boolean's value.

Static Public Member Functions

static bool getBoolean (const ::java::lang::String &name,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Returns true if and only if the system property named by the argument exists and is equal to the string "true".
::java::lang::String toString (bool b,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Returns a String object representing the specified boolean.
::java::lang::Boolean valueOf (const ::java::lang::String &s,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Returns a Boolean with a value represented by the specified String.
::java::lang::Boolean valueOf (bool b,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Returns a Boolean instance representing the specified boolean value.

Static Public Attributes

::java::lang::Boolean _FALSE
 The Boolean object corresponding to the primitive value false.
::java::lang::Boolean _TRUE
 The Boolean object corresponding to the primitive value true.
::java::lang::Class TYPE
 The Class object representing the primitive type boolean.

Detailed Description

The Boolean class wraps a value of the primitive type boolean in an object.

An object of type Boolean contains a single field whose type is boolean.

In addition, this class provides many methods for converting a boolean to a String and a String to a boolean, as well as other constants and methods useful when dealing with a boolean.

Author:
Arthur van Hoff


Constructor & Destructor Documentation

java::lang::Boolean::Boolean bool  value,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
 

Allocates a Boolean object representing the value argument.

Note: It is rarely appropriate to use this constructor. Unless a new instance is required, the static factory is generally a better choice. It is likely to yield significantly better space and time performance.

Parameters:
value the value of the Boolean.
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.

java::lang::Boolean::Boolean const ::java::lang::String s,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
 

Allocates a Boolean object representing the value true if the string argument is not null and is equal, ignoring case, to the string "true".

Otherwise, allocate a Boolean object representing the value false. Examples:

new Boolean("True") produces a Boolean object that represents true.
new Boolean("yes") produces a Boolean object that represents false.

Parameters:
s the string to be converted to a Boolean.
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.


Member Function Documentation

bool java::lang::Boolean::booleanValue ::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
 

Returns the value of this Boolean object as a boolean primitive.

Parameters:
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the primitive boolean value of this object.

bool java::lang::Boolean::equals const ::java::lang::Object obj,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[virtual]
 

Returns true if and only if the argument is not null and is a Boolean object that represents the same boolean value as this object.

Parameters:
obj the object to compare with.
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
true if the Boolean objects represent the same value; false otherwise.

Reimplemented from java::lang::Object.

static bool java::lang::Boolean::getBoolean const ::java::lang::String name,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[static]
 

Returns true if and only if the system property named by the argument exists and is equal to the string "true".

(Beginning with version 1.0.2 of the Java<font size="-2">TM</font> platform, the test of this string is case insensitive.) A system property is accessible through getProperty, a method defined by the System class.

If there is no property with the specified name, or if the specified name is empty or null, then false is returned.

Parameters:
name the system property name.
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the boolean value of the system property.

jint java::lang::Boolean::hashCode ::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[virtual]
 

Returns a hash code for this Boolean object.

Parameters:
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the integer 1231 if this object represents true; returns the integer 1237 if this object represents false.

Reimplemented from java::lang::Object.

::java::lang::String java::lang::Boolean::toString bool  b,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[static]
 

Returns a String object representing the specified boolean.

If the specified boolean is true, then the string "true" will be returned, otherwise the string "false" will be returned.

Parameters:
b the boolean to be converted
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the string representation of the specified boolean

::java::lang::String java::lang::Boolean::toString ::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
 

Returns a String object representing this Boolean's value.

If this object represents the value true, a string equal to "true" is returned. Otherwise, a string equal to "false" is returned.

Parameters:
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
a string representation of this object.

Reimplemented from java::lang::Object.

::java::lang::Boolean java::lang::Boolean::valueOf const ::java::lang::String s,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[static]
 

Returns a Boolean with a value represented by the specified String.

The Boolean returned represents the value true if the string argument is not null and is equal, ignoring case, to the string "true".

Example: Boolean.valueOf("True") returns true.
Example: Boolean.valueOf("yes") returns false.

Parameters:
s a string.
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the Boolean value represented by the string.

::java::lang::Boolean java::lang::Boolean::valueOf bool  b,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[static]
 

Returns a Boolean instance representing the specified boolean value.

If the specified boolean value is true, this method returns Boolean.TRUE; if it is false, this method returns Boolean.FALSE. If a new Boolean instance is not required, this method should generally be used in preference to the constructor , as this method is likely to to yield significantly better space and time performance.

Parameters:
b a boolean value.
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
a Boolean instance representing b.


The documentation for this class was generated from the following file:
Generated on Fri Jun 16 10:19:19 2006 for JMS Courier for C++ by  doxygen 1.4.1