18 #ifndef _DECAF_LANG_BYTE_H_ 19 #define _DECAF_LANG_BYTE_H_ 53 Byte(
unsigned char value);
63 Byte(
const std::string& value);
76 return this->value < c.value ? -1 : (this->value > c.value) ? 1 : 0;
85 return this->value == c.value;
95 return this->value < c.value;
107 return this->value < c ? -1 : (this->value > c) ? 1 : 0;
116 return this->value == c;
126 return this->value < c;
133 return this->value == c.value;
139 bool equals(
const unsigned char& c)
const {
140 return this->value == c;
146 std::string toString()
const;
153 return (
double) this->value;
161 return (
float) this->value;
177 return (
short) this->value;
185 return (
int) this->value;
193 return (
long long) this->value;
201 static std::string toString(
unsigned char value);
218 static Byte decode(
const std::string& value);
245 static unsigned char parseByte(
const std::string& s,
int radix);
258 static unsigned char parseByte(
const std::string& s);
279 static Byte valueOf(
const std::string& value);
294 static Byte valueOf(
const std::string& value,
int radix);
virtual bool operator==(const unsigned char &c) const
Compares equality between this object and the one passed.
Definition: Byte.h:115
virtual short shortValue() const
Answers the short value which the receiver represents.
Definition: Byte.h:176
unsigned char Byte
Definition: zconf.h:335
static const int SIZE
The size of the primitive character in bits.
Definition: Byte.h:46
virtual float floatValue() const
Answers the float value which the receiver represents.
Definition: Byte.h:160
virtual int compareTo(const Byte &c) const
Compares this Byte instance with another.
Definition: Byte.h:75
virtual unsigned char byteValue() const
Answers the byte value which the receiver represents.
Definition: Byte.h:168
static Byte valueOf(unsigned char value)
Returns a Character instance representing the specified char value.
Definition: Byte.h:265
virtual int compareTo(const unsigned char &c) const
Compares this Byte instance with a char type.
Definition: Byte.h:106
virtual long long longValue() const
Answers the long value which the receiver represents.
Definition: Byte.h:192
virtual bool operator<(const Byte &c) const
Compares this object to another and returns true if this object is considered to be less than the one...
Definition: Byte.h:94
virtual int intValue() const
Answers the int value which the receiver represents.
Definition: Byte.h:184
virtual bool operator<(const unsigned char &c) const
Compares this object to another and returns true if this object is considered to be less than the one...
Definition: Byte.h:125
The abstract class Number is the superclass of classes Byte, Double, Float, Integer, Long, and Short.
Definition: Number.h:35
static const unsigned char MAX_VALUE
The maximum value that a unsigned char can take on.
Definition: Byte.h:43
bool equals(const Byte &c) const
Definition: Byte.h:132
virtual ~Byte()
Definition: Byte.h:65
virtual bool operator==(const Byte &c) const
Compares equality between this object and the one passed.
Definition: Byte.h:84
virtual double doubleValue() const
Answers the double value which the receiver represents.
Definition: Byte.h:152
#define DECAF_API
Definition: Config.h:29
bool equals(const unsigned char &c) const
Definition: Byte.h:139
static const unsigned char MIN_VALUE
The minimum value that a unsigned char can take on.
Definition: Byte.h:40
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