18 #ifndef _DECAF_LANG_SHORT_H_
19 #define _DECAF_LANG_SHORT_H_
75 virtual int compareTo(
const Short& s)
const;
81 return this->value == s.value;
90 return this->value == s.value;
100 return this->value < s.value;
111 virtual int compareTo(
const short& s)
const;
117 return this->value == s;
126 return this->value == s;
136 return this->value < s;
142 std::string toString()
const;
149 return (
double) this->value;
157 return (
float) this->value;
165 return (
unsigned char) this->value;
181 return (
int) this->value;
189 return (
long long) this->value;
197 static std::string toString(
short value);
222 static short reverseBytes(
short value);
251 static short parseShort(
const String& s,
int radix);
268 static short parseShort(
const String& s);
275 static Short valueOf(
short value);
310 static Short valueOf(
const String& value,
int radix);
virtual bool operator==(const short &s) const
Compares equality between this object and the one passed.
Definition: Short.h:125
virtual bool operator<(const Short &s) const
Compares this object to another and returns true if this object is considered to be less than the one...
Definition: Short.h:99
virtual long long longValue() const
Answers the long value which the receiver represents.
Definition: Short.h:188
virtual bool operator==(const Short &s) const
Compares equality between this object and the one passed.
Definition: Short.h:89
virtual double doubleValue() const
Answers the double value which the receiver represents.
Definition: Short.h:148
virtual unsigned char byteValue() const
Answers the byte value which the receiver represents.
Definition: Short.h:164
The abstract class Number is the superclass of classes Byte, Double, Float, Integer, Long, and Short.
Definition: Number.h:35
virtual float floatValue() const
Answers the float value which the receiver represents.
Definition: Short.h:156
static const int SIZE
Size of this objects primitive type in bits.
Definition: Short.h:42
virtual int intValue() const
Answers the int value which the receiver represents.
Definition: Short.h:180
static const short MIN_VALUE
Max Value for this Object's primitive type.
Definition: Short.h:48
An immutable sequence of characters.
Definition: String.h:57
bool equals(const Short &s) const
Definition: Short.h:80
#define DECAF_API
Definition: Config.h:29
static const short MAX_VALUE
Max Value for this Object's primitive type.
Definition: Short.h:45
virtual bool operator<(const short &s) const
Compares this object to another and returns true if this object is considered to be less than the one...
Definition: Short.h:135
virtual short shortValue() const
Answers the short value which the receiver represents.
Definition: Short.h:172
bool equals(const short &s) const
Definition: Short.h:116
This interface imposes a total ordering on the objects of each class that implements it...
Definition: Comparable.h:33