18 #ifndef _DECAF_LANG_DOUBLE_H_ 19 #define _DECAF_LANG_DOUBLE_H_ 49 static const double NaN;
77 Double(
const std::string& value );
89 virtual int compareTo(
const Double& d )
const;
96 return this->value == d.value;
105 return this->value == d.value;
115 return this->value < d.value;
126 virtual int compareTo(
const double& d )
const;
133 return this->value == d;
142 return this->value == d;
152 return this->value < d;
158 std::string toString()
const;
173 return (
float)this->value;
181 return (
unsigned char)this->value;
189 return (
short)this->value;
197 return (
int)this->value;
205 return (
long long)this->value;
211 bool isInfinite()
const;
231 static int compare(
double d1,
double d2 );
255 static long long doubleToLongBits(
double value );
282 static long long doubleToRawLongBits(
double value );
288 static bool isInfinite(
double value );
294 static bool isNaN(
double value );
312 static double longBitsToDouble(
long long bits );
321 static double parseDouble(
const std::string value );
357 static std::string toHexString(
double value );
390 static std::string toString(
double value );
397 static Double valueOf(
double value );
406 static Double valueOf(
const std::string& value );
410 static const long long DOUBLE_SIGN_MASK = 0x8000000000000000LL;
411 static const long long DOUBLE_EXPONENT_MASK = 0x7FF0000000000000LL;
412 static const long long DOUBLE_MANTISSA_MASK = 0x000FFFFFFFFFFFFFLL;
413 static const long long DOUBLE_NAN_BITS =
414 DOUBLE_EXPONENT_MASK | 0x0008000000000000LL;
static const double NEGATIVE_INFINITY
Constant for Negative Infinitiy.
Definition: Double.h:55
virtual long long longValue() const
Answers the long value which the receiver represents.
Definition: Double.h:204
virtual int intValue() const
Answers the int value which the receiver represents.
Definition: Double.h:196
bool equals(const Double &d) const
Definition: Double.h:95
static const double MAX_VALUE
The maximum value that the primitive type can hold.
Definition: Double.h:43
virtual bool operator==(const double &d) const
Compares equality between this object and the one passed.
Definition: Double.h:141
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:151
virtual bool operator==(const Double &d) const
Compares equality between this object and the one passed.
Definition: Double.h:104
static const double MIN_VALUE
The minimum value that the primitive type can hold.
Definition: Double.h:46
static const double POSITIVE_INFINITY
Constant for Positive Infinity.
Definition: Double.h:52
The abstract class Number is the superclass of classes Byte, Double, Float, Integer, Long, and Short.
Definition: Number.h:35
virtual unsigned char byteValue() const
Answers the byte value which the receiver represents.
Definition: Double.h:180
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:114
virtual double doubleValue() const
Answers the double value which the receiver represents.
Definition: Double.h:164
#define DECAF_API
Definition: Config.h:29
static const double NaN
Constant for the Not a Number Value.
Definition: Double.h:49
bool equals(const double &d) const
Definition: Double.h:132
virtual float floatValue() const
Answers the float value which the receiver represents.
Definition: Double.h:172
virtual ~Double()
Definition: Double.h:79
static const int SIZE
The size in bits of the primitive int type.
Definition: Double.h:40
virtual short shortValue() const
Answers the short value which the receiver represents.
Definition: Double.h:188
This interface imposes a total ordering on the objects of each class that implements it...
Definition: Comparable.h:33
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: AprPool.h:25