activemq-cpp-3.9.5
decaf::lang::Boolean Class Reference

#include <src/main/decaf/lang/Boolean.h>

Inheritance diagram for decaf::lang::Boolean:

Public Member Functions

 Boolean (bool value)
 
 Boolean (const String &value)
 
virtual ~Boolean ()
 
bool booleanValue () const
 
std::string toString () const
 
virtual int compareTo (const Boolean &b) const
 Compares this Boolean instance with another.
 
virtual bool operator== (const Boolean &value) const
 Compares equality between this object and the one passed.
 
virtual bool operator< (const Boolean &value) const
 Compares this object to another and returns true if this object is considered to be less than the one passed.
 
bool equals (const Boolean &b) const
 
virtual int compareTo (const bool &b) const
 Compares this Boolean instance with another.
 
virtual bool operator== (const bool &value) const
 Compares equality between this object and the one passed.
 
virtual bool operator< (const bool &value) const
 Compares this object to another and returns true if this object is considered to be less than the one passed.
 
bool equals (const bool &b) const
 
- Public Member Functions inherited from decaf::lang::Comparable< Boolean >
virtual ~Comparable ()
 
- Public Member Functions inherited from decaf::lang::Comparable< bool >
virtual ~Comparable ()
 

Static Public Member Functions

static Boolean valueOf (bool value)
 
static Boolean valueOf (const String &value)
 
static bool parseBoolean (const String &value)
 Parses the String passed and extracts an bool.
 
static std::string toString (bool value)
 Converts the bool to a String representation.
 

Static Public Attributes

static const Boolean _FALSE
 The Class object representing the primitive false boolean.
 
static const Boolean _TRUE
 The Class object representing the primitive type boolean.
 

Constructor & Destructor Documentation

◆ Boolean() [1/2]

decaf::lang::Boolean::Boolean ( bool value)
Parameters
value- primitive boolean to wrap.

Referenced by compareTo(), equals(), operator<(), operator==(), valueOf(), and valueOf().

◆ Boolean() [2/2]

decaf::lang::Boolean::Boolean ( const String & value)
Parameters
value- String value to convert to a boolean.

◆ ~Boolean()

virtual decaf::lang::Boolean::~Boolean ( )
inlinevirtual

Member Function Documentation

◆ booleanValue()

bool decaf::lang::Boolean::booleanValue ( ) const
inline
Returns
the primitive boolean value of this object

◆ compareTo() [1/2]

virtual int decaf::lang::Boolean::compareTo ( const bool & b) const
virtual

Compares this Boolean instance with another.

Parameters
b- the Boolean instance to be compared
Returns
zero if this object represents the same boolean value as the argument; a positive value if this object represents true and the argument represents false; and a negative value if this object represents false and the argument represents true

Implements decaf::lang::Comparable< bool >.

◆ compareTo() [2/2]

virtual int decaf::lang::Boolean::compareTo ( const Boolean & b) const
virtual

Compares this Boolean instance with another.

Parameters
b- the Boolean instance to be compared
Returns
zero if this object represents the same boolean value as the argument; a positive value if this object represents true and the argument represents false; and a negative value if this object represents false and the argument represents true

Implements decaf::lang::Comparable< Boolean >.

References Boolean().

◆ equals() [1/2]

bool decaf::lang::Boolean::equals ( const bool & b) const
inlinevirtual
Returns
true if the two Boolean Objects have the same value.

Implements decaf::lang::Comparable< bool >.

◆ equals() [2/2]

bool decaf::lang::Boolean::equals ( const Boolean & b) const
inlinevirtual
Returns
true if the two Boolean Objects have the same value.

Implements decaf::lang::Comparable< Boolean >.

References Boolean().

◆ operator<() [1/2]

virtual bool decaf::lang::Boolean::operator< ( const bool & value) const
virtual

Compares this object to another and returns true if this object is considered to be less than the one passed.

This

Parameters
value- the value to be compared to this one.
Returns
true if this object is equal to the one passed.

Implements decaf::lang::Comparable< bool >.

◆ operator<() [2/2]

virtual bool decaf::lang::Boolean::operator< ( const Boolean & value) const
virtual

Compares this object to another and returns true if this object is considered to be less than the one passed.

This

Parameters
value- the value to be compared to this one.
Returns
true if this object is equal to the one passed.

Implements decaf::lang::Comparable< Boolean >.

References Boolean().

◆ operator==() [1/2]

virtual bool decaf::lang::Boolean::operator== ( const bool & value) const
virtual

Compares equality between this object and the one passed.

Parameters
value- the value to be compared to this one.
Returns
true if this object is equal to the one passed.

Implements decaf::lang::Comparable< bool >.

◆ operator==() [2/2]

virtual bool decaf::lang::Boolean::operator== ( const Boolean & value) const
virtual

Compares equality between this object and the one passed.

Parameters
value- the value to be compared to this one.
Returns
true if this object is equal to the one passed.

Implements decaf::lang::Comparable< Boolean >.

References Boolean().

◆ parseBoolean()

static bool decaf::lang::Boolean::parseBoolean ( const String & value)
static

Parses the String passed and extracts an bool.

Parameters
valueThe std::string value to parse
Returns
bool value

◆ toString() [1/2]

std::string decaf::lang::Boolean::toString ( ) const
Returns
the string representation of this Booleans value.

◆ toString() [2/2]

static std::string decaf::lang::Boolean::toString ( bool value)
static

Converts the bool to a String representation.

Parameters
valueThe bool value to convert.
Returns
std::string representation of the bool value passed.

◆ valueOf() [1/2]

static Boolean decaf::lang::Boolean::valueOf ( bool value)
static
Parameters
valueThe bool value to convert to a Boolean instance.
Returns
a Boolean instance of the primitive boolean value

References Boolean().

◆ valueOf() [2/2]

static Boolean decaf::lang::Boolean::valueOf ( const String & value)
static
Parameters
valueThe std::string value to convert to a Boolean instance.
Returns
a Boolean instance of the string value

References Boolean().

Field Documentation

◆ _FALSE

const Boolean decaf::lang::Boolean::_FALSE
static

The Class object representing the primitive false boolean.

◆ _TRUE

const Boolean decaf::lang::Boolean::_TRUE
static

The Class object representing the primitive type boolean.


The documentation for this class was generated from the following file: