18#ifndef _DECAF_LANG_BYTE_H_
19#define _DECAF_LANG_BYTE_H_
77 return this->value < c.value ? -1 : (this->value > c.value) ? 1 : 0;
86 return this->value == c.value;
96 return this->value < c.value;
108 return this->value < c ? -1 : (this->value > c) ? 1 : 0;
117 return this->value == c;
127 return this->value < c;
134 return this->value == c.value;
140 bool equals(
const unsigned char& c)
const {
141 return this->value == c;
154 return (
double) this->value;
162 return (
float) this->value;
178 return (
short) this->value;
186 return (
int) this->value;
194 return (
long long) this->value;
virtual bool operator==(const unsigned char &c) const
Compares equality between this object and the one passed.
Definition Byte.h:116
static Byte decode(const String &value)
Decodes a String into a Byte.
virtual int intValue() const
Answers the int value which the receiver represents.
Definition Byte.h:185
static const int SIZE
The size of the primitive character in bits.
Definition Byte.h:47
static Byte valueOf(unsigned char value)
Returns a Character instance representing the specified char value.
Definition Byte.h:280
virtual double doubleValue() const
Answers the double value which the receiver represents.
Definition Byte.h:153
virtual long long longValue() const
Answers the long value which the receiver represents.
Definition Byte.h:193
bool equals(const unsigned char &c) const
Definition Byte.h:140
std::string toString() const
virtual bool operator==(const Byte &c) const
Compares equality between this object and the one passed.
Definition Byte.h:85
Byte(unsigned char value)
static unsigned char parseByte(const String &s, int radix)
Parses the string argument as a signed unsigned char in the radix specified by the second argument.
static const unsigned char MAX_VALUE
The maximum value that a unsigned char can take on.
Definition Byte.h:44
static unsigned char parseByte(const String &s)
Parses the string argument as a signed decimal unsigned char.
static std::string toString(unsigned char value)
virtual ~Byte()
Definition Byte.h:66
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:126
static const unsigned char MIN_VALUE
The minimum value that a unsigned char can take on.
Definition Byte.h:41
bool equals(const Byte &c) const
Definition Byte.h:133
static Byte valueOf(const String &value)
Returns a Byte object holding the value given by the specified std::string.
virtual short shortValue() const
Answers the short value which the receiver represents.
Definition Byte.h:177
Byte(const String &value)
Creates a new Byte instance from the given string.
static Byte valueOf(const String &value, int radix)
Returns a Byte object holding the value extracted from the specified std::string when parsed with the...
virtual unsigned char byteValue() const
Answers the byte value which the receiver represents.
Definition Byte.h:169
virtual int compareTo(const unsigned char &c) const
Compares this Byte instance with a char type.
Definition Byte.h:107
virtual int compareTo(const Byte &c) const
Compares this Byte instance with another.
Definition Byte.h:76
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:95
virtual float floatValue() const
Answers the float value which the receiver represents.
Definition Byte.h:161
This interface imposes a total ordering on the objects of each class that implements it.
Definition Comparable.h:33
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
unsigned char Byte
Definition zconf.h:335