18#ifndef _DECAF_LANG_LONG_H_
19#define _DECAF_LANG_LONG_H_
85 return this->value == l.value;
94 return this->value == l.value;
104 return this->value < l.value;
122 return this->value == l;
131 return this->value == l;
141 return this->value < l;
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;
403 static std::string
toString(
long long value,
int radix);
507 static long long parse(
const String& value,
int offset,
int radix,
bool negative);
This interface imposes a total ordering on the objects of each class that implements it.
Definition Comparable.h:33
std::string toString() const
static int numberOfLeadingZeros(long long value)
Returns the number of zero bits preceding the highest-order ("leftmost") one-bit in the two's complem...
static const int SIZE
The size in bits of the primitive long long type.
Definition Long.h:41
static int numberOfTrailingZeros(long long value)
Returns the number of zero bits following the lowest-order ("rightmost") one-bit in the two's complem...
static long long reverse(long long value)
Returns the value obtained by reversing the order of the bits in the two's complement binary represen...
static Long valueOf(const String &value, int radix)
Returns a Long object holding the value extracted from the specified std::string when parsed with the...
static std::string toBinaryString(long long value)
Returns a string representation of the long long argument as an unsigned long long in base 2.
virtual int compareTo(const long long &l) const
Compares this Long instance with another.
static int signum(long long value)
Returns the signum function of the specified value.
virtual int compareTo(const Long &l) const
Compares this Long instance with another.
virtual float floatValue() const
Answers the float value which the receiver represents.
Definition Long.h:161
static long long highestOneBit(long long value)
Returns an long long value with at most a single one-bit, in the position of the highest-order ("left...
virtual long long longValue() const
Answers the long value which the receiver represents.
Definition Long.h:193
static const long long MIN_VALUE
The minimum value that the primitive type can hold.
Definition Long.h:47
Long(const String &value)
Constructs a new Long and attempts to convert the given string to an long long value,...
static long long rotateRight(long long value, int distance)
Returns the value obtained by rotating the two's complement binary representation of the specified va...
virtual bool operator==(const Long &l) const
Compares equality between this object and the one passed.
Definition Long.h:93
virtual short shortValue() const
Answers the short value which the receiver represents.
Definition Long.h:177
static long long lowestOneBit(long long value)
Returns an long long value with at most a single one-bit, in the position of the lowest-order ("right...
static long long parseLong(const String &value)
Parses the string argument as a signed decimal long.
static std::string toOctalString(long long value)
Returns a string representation of the long long argument as an unsigned long long in base 8.
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
static Long valueOf(const String &value)
Returns a Long object holding the value given by the specified std::string.
static Long decode(const String &value)
Decodes a String into a Long.
static long long reverseBytes(long long value)
Returns the value obtained by reversing the order of the bytes in the two's complement representation...
static long long parseLong(const String &value, int radix)
Returns a Long object holding the value extracted from the specified string when parsed with the radi...
bool equals(const long long &l) const
Definition Long.h:121
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 int intValue() const
Answers the int value which the receiver represents.
Definition Long.h:185
static std::string toString(long long value, int radix)
static std::string toHexString(long long value)
Returns a string representation of the integer argument as an unsigned integer in base 16.
static Long valueOf(long long value)
Returns a Long instance representing the specified int value.
Definition Long.h:468
static std::string toString(long long value)
Converts the long to a String representation.
static int bitCount(long long value)
Returns the number of one-bits in the two's complement binary representation of the specified int val...
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 equality between this object and the one passed.
Definition Long.h:130
virtual unsigned char byteValue() const
Answers the byte value which the receiver represents.
Definition Long.h:169
bool equals(const Long &l) const
Definition Long.h:84
static const long long MAX_VALUE
The maximum value that the primitive type can hold.
Definition Long.h:44
static long long rotateLeft(long long value, int distance)
Returns the value obtained by rotating the two's complement binary representation of the specified va...
The abstract class Number is the superclass of classes Byte, Double, Float, Integer,...
Definition Number.h:35
An immutable sequence of characters.
Definition String.h:57
#define DECAF_API
Definition Config.h:29
Definition ThreadingTypes.h:31
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition AprPool.h:25