18 #ifndef _DECAF_LANG_DOUBLE_H_
19 #define _DECAF_LANG_DOUBLE_H_
50 static const double NaN;
90 virtual int compareTo(
const Double& d)
const;
97 return this->value == d.value;
106 return this->value == d.value;
116 return this->value < d.value;
127 virtual int compareTo(
const double& d)
const;
134 return this->value == d;
143 return this->value == d;
153 return this->value < d;
159 std::string toString()
const;
174 return (
float) this->value;
182 return (
unsigned char) this->value;
190 return (
short) this->value;
198 return (
int) this->value;
206 return (
long long) this->value;
212 bool isInfinite()
const;
232 static int compare(
double d1,
double d2);
256 static long long doubleToLongBits(
double value);
283 static long long doubleToRawLongBits(
double value);
289 static bool isInfinite(
double value);
295 static bool isNaN(
double value);
313 static double longBitsToDouble(
long long bits);
326 static double parseDouble(
const String& value);
362 static std::string toHexString(
double value);
395 static std::string toString(
double value);
405 static Double valueOf(
double value);
422 static const long long DOUBLE_SIGN_MASK;
423 static const long long DOUBLE_EXPONENT_MASK;
424 static const long long DOUBLE_MANTISSA_MASK;
425 static const long long DOUBLE_NAN_BITS;
virtual unsigned char byteValue() const
Answers the byte value which the receiver represents.
Definition: Double.h:181
static const double NEGATIVE_INFINITY
Constant for Negative Infinitiy.
Definition: Double.h:56
virtual bool operator<(const Double &d) const
Compares this object to another and returns true if this object is considered to be less than the one...
Definition: Double.h:115
static const double MAX_VALUE
The maximum value that the primitive type can hold.
Definition: Double.h:44
bool equals(const Double &d) const
Definition: Double.h:96
static const double MIN_VALUE
The minimum value that the primitive type can hold.
Definition: Double.h:47
static const double POSITIVE_INFINITY
Constant for Positive Infinity.
Definition: Double.h:53
virtual short shortValue() const
Answers the short value which the receiver represents.
Definition: Double.h:189
The abstract class Number is the superclass of classes Byte, Double, Float, Integer, Long, and Short.
Definition: Number.h:35
bool equals(const double &d) const
Definition: Double.h:133
virtual bool operator==(const double &d) const
Compares equality between this object and the one passed.
Definition: Double.h:142
virtual double doubleValue() const
Answers the double value which the receiver represents.
Definition: Double.h:165
virtual int intValue() const
Answers the int value which the receiver represents.
Definition: Double.h:197
An immutable sequence of characters.
Definition: String.h:57
#define DECAF_API
Definition: Config.h:29
virtual bool operator==(const Double &d) const
Compares equality between this object and the one passed.
Definition: Double.h:105
static const double NaN
Constant for the Not a Number Value.
Definition: Double.h:50
virtual bool operator<(const double &d) const
Compares this object to another and returns true if this object is considered to be less than the one...
Definition: Double.h:152
virtual ~Double()
Definition: Double.h:80
static const int SIZE
The size in bits of the primitive int type.
Definition: Double.h:41
This interface imposes a total ordering on the objects of each class that implements it...
Definition: Comparable.h:33
virtual long long longValue() const
Answers the long value which the receiver represents.
Definition: Double.h:205
virtual float floatValue() const
Answers the float value which the receiver represents.
Definition: Double.h:173