18 #ifndef _DECAF_LANG_LONG_H_ 19 #define _DECAF_LANG_LONG_H_ 53 Long(
long long value);
65 Long(
const std::string& value);
78 virtual int compareTo(
const Long& l)
const;
85 return this->value == l.value;
94 return this->value == l.value;
104 return this->value < l.value;
115 virtual int compareTo(
const long long& l)
const;
122 return this->value == l;
131 return this->value == l;
141 return this->value < l;
147 std::string toString()
const;
154 return (
double) this->value;
162 return (
float) this->value;
170 return (
unsigned char) this->value;
178 return (
short) this->value;
186 return (
int) this->value;
207 static int bitCount(
long long value);
224 static Long decode(
const std::string& value);
236 static long long highestOneBit(
long long value);
248 static long long lowestOneBit(
long long value);
267 static int numberOfLeadingZeros(
long long value);
279 static int numberOfTrailingZeros(
long long value);
294 static long long parseLong(
const std::string& value);
308 static long long parseLong(
const std::string& value,
int radix);
316 static long long reverseBytes(
long long value);
324 static long long reverse(
long long value);
343 static long long rotateLeft(
long long value,
int distance);
362 static long long rotateRight(
long long value,
int distance);
371 static int signum(
long long value);
378 static std::string toString(
long long value);
403 static std::string toString(
long long value,
int radix);
424 static std::string toHexString(
long long value);
444 static std::string toOctalString(
long long value);
461 static std::string toBinaryString(
long long value);
482 static Long valueOf(
const std::string& value);
496 static Long valueOf(
const std::string& value,
int radix);
500 static long long parse(
const std::string& value,
int offset,
int radix,
bool negative);
virtual float floatValue() const
Answers the float value which the receiver represents.
Definition: Long.h:161
static const long long MAX_VALUE
The maximum value that the primitive type can hold.
Definition: Long.h:43
bool equals(const Long &l) const
Definition: Long.h:84
virtual int intValue() const
Answers the int value which the receiver represents.
Definition: Long.h:185
bool equals(const long long &l) const
Definition: Long.h:121
virtual double doubleValue() const
Answers the double value which the receiver represents.
Definition: Long.h:153
virtual bool operator<(const long long &l) const
Compares this object to another and returns true if this object is considered to be less than the one...
Definition: Long.h:140
virtual long long longValue() const
Answers the long value which the receiver represents.
Definition: Long.h:193
virtual bool operator==(const long long &l) const
Compares equality between this object and the one passed.
Definition: Long.h:130
The abstract class Number is the superclass of classes Byte, Double, Float, Integer, Long, and Short.
Definition: Number.h:35
static const int SIZE
The size in bits of the primitive long long type.
Definition: Long.h:40
static Long valueOf(long long value)
Returns a Long instance representing the specified int value.
Definition: Long.h:468
#define DECAF_API
Definition: Config.h:29
virtual short shortValue() const
Answers the short value which the receiver represents.
Definition: Long.h:177
virtual bool operator==(const Long &l) const
Compares equality between this object and the one passed.
Definition: Long.h:93
virtual bool operator<(const Long &l) const
Compares this object to another and returns true if this object is considered to be less than the one...
Definition: Long.h:103
virtual unsigned char byteValue() const
Answers the byte value which the receiver represents.
Definition: Long.h:169
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
static const long long MIN_VALUE
The minimum value that the primitive type can hold.
Definition: Long.h:46
virtual ~Long()
Definition: Long.h:67