#include <src/main/decaf/lang/Character.h>
|
static Character | valueOf (char value) |
| Returns a Character instance representing the specified char value. More...
|
|
static bool | isWhitespace (char c) |
| Indicates whether or not the given character is considered whitespace. More...
|
|
static bool | isDigit (char c) |
| Indicates whether or not the given character is a digit. More...
|
|
static bool | isLowerCase (char c) |
| Indicates whether or not the given character is a lower case character. More...
|
|
static bool | isUpperCase (char c) |
| Indicates whether or not the given character is a upper case character. More...
|
|
static bool | isLetter (char c) |
| Indicates whether or not the given character is a letter. More...
|
|
static bool | isLetterOrDigit (char c) |
| Indicates whether or not the given character is either a letter or a digit. More...
|
|
static bool | isISOControl (char c) |
| Answers whether the character is an ISO control character, which is a char that lays in the range of 0 to 1f and 7f to 9f. More...
|
|
static int | digit (char c, int radix) |
| Returns the numeric value of the character ch in the specified radix. More...
|
|
static char | toLowerCase (char value) |
| Returns the lower case equivalent for the specified character if the character is an upper case letter. More...
|
|
static char | toUpperCase (char value) |
| Returns the upper case equivalent for the specified character if the character is a lower case letter. More...
|
|
decaf::lang::Character::Character |
( |
char |
value | ) |
|
virtual unsigned char decaf::lang::Character::byteValue |
( |
| ) |
const |
|
inlinevirtual |
Answers the byte value which the receiver represents.
- Returns
- int the value of the receiver.
Reimplemented from decaf::lang::Number.
virtual int decaf::lang::Character::compareTo |
( |
const Character & |
c | ) |
const |
|
inlinevirtual |
Compares this Character instance with another.
- Parameters
-
- Returns
- zero if this object represents the same char value as the argument; a positive value if this object represents a value greater than the passed in value, and -1 if this object represents a value less than the passed in value.
Implements decaf::lang::Comparable< Character >.
virtual int decaf::lang::Character::compareTo |
( |
const char & |
c | ) |
const |
|
inlinevirtual |
Compares this Character instance with a char type.
- Parameters
-
c | the char instance to be compared |
- Returns
- zero if this object represents the same char value as the argument; a positive value if this object represents a value greater than the passed in value, and -1 if this object represents a value less than the passed in value.
Implements decaf::lang::Comparable< char >.
static int decaf::lang::Character::digit |
( |
char |
c, |
|
|
int |
radix |
|
) |
| |
|
static |
Returns the numeric value of the character ch in the specified radix.
If the radix is not in the range MIN_RADIX <= radix <= MAX_RADIX or if the value of ch is not a valid digit in the specified radix, -1 is returned. A character is a valid digit if at least one of the following is true:
- The method isDigit is true of the character and the single-character decomposition is less than the specified radix. In this case the decimal digit value is returned.
- The character is one of the uppercase Latin letters 'A' through 'Z' and its code is less than radix + 'A' - 10. In this case, ch - 'A' + 10 is returned.
- The character is one of the lowercase Latin letters 'a' through 'z' and its code is less than radix + 'a' - 10. In this case, ch - 'a' + 10 is returned.
- Parameters
-
c | the char to be converted |
radix | the radix of the number |
- Returns
- the numeric value of the number represented in the given radix
virtual double decaf::lang::Character::doubleValue |
( |
| ) |
const |
|
inlinevirtual |
Answers the double value which the receiver represents.
- Returns
- double the value of the receiver.
Implements decaf::lang::Number.
bool decaf::lang::Character::equals |
( |
const char & |
c | ) |
const |
|
inlinevirtual |
virtual float decaf::lang::Character::floatValue |
( |
| ) |
const |
|
inlinevirtual |
Answers the float value which the receiver represents.
- Returns
- float the value of the receiver.
Implements decaf::lang::Number.
virtual int decaf::lang::Character::intValue |
( |
| ) |
const |
|
inlinevirtual |
Answers the int value which the receiver represents.
- Returns
- int the value of the receiver.
Implements decaf::lang::Number.
static bool decaf::lang::Character::isDigit |
( |
char |
c | ) |
|
|
inlinestatic |
Indicates whether or not the given character is a digit.
- Parameters
-
c | The character whose value is being checked. |
- Returns
- true if the character is a digit value.
static bool decaf::lang::Character::isISOControl |
( |
char |
c | ) |
|
|
inlinestatic |
Answers whether the character is an ISO control character, which is a char that lays in the range of 0 to 1f and 7f to 9f.
- Parameters
-
c | the character, including supplementary characters |
- Returns
- true if the char is an ISO control character
static bool decaf::lang::Character::isLetter |
( |
char |
c | ) |
|
|
inlinestatic |
Indicates whether or not the given character is a letter.
- Parameters
-
c | The character whose value is being checked. |
- Returns
- true if the character is an ASCII letter value.
static bool decaf::lang::Character::isLetterOrDigit |
( |
char |
c | ) |
|
|
inlinestatic |
Indicates whether or not the given character is either a letter or a digit.
- Parameters
-
c | The character whose value is being checked. |
- Returns
- true if the character is an ASCII letter or numeric value.
static bool decaf::lang::Character::isLowerCase |
( |
char |
c | ) |
|
|
inlinestatic |
Indicates whether or not the given character is a lower case character.
- Parameters
-
c | The character whose value is being checked. |
- Returns
- true if the character is a lower case ASCII value.
static bool decaf::lang::Character::isUpperCase |
( |
char |
c | ) |
|
|
inlinestatic |
Indicates whether or not the given character is a upper case character.
- Parameters
-
c | The character whose value is being checked. |
- Returns
- true if the character is a upper case ASCII value.
static bool decaf::lang::Character::isWhitespace |
( |
char |
c | ) |
|
|
inlinestatic |
Indicates whether or not the given character is considered whitespace.
- Parameters
-
c | The character whose value is being checked. |
- Returns
- true if the character is a whitespace value.
virtual long long decaf::lang::Character::longValue |
( |
| ) |
const |
|
inlinevirtual |
Answers the long value which the receiver represents.
- Returns
- long the value of the receiver.
Implements decaf::lang::Number.
virtual bool decaf::lang::Character::operator< |
( |
const Character & |
c | ) |
const |
|
inlinevirtual |
Compares this object to another and returns true if this object is considered to be less than the one passed.
- Parameters
-
c | the value to be compared to this one. |
- Returns
- true if this object is equal to the one passed.
Implements decaf::lang::Comparable< Character >.
virtual bool decaf::lang::Character::operator< |
( |
const char & |
c | ) |
const |
|
inlinevirtual |
Compares this object to another and returns true if this object is considered to be less than the one passed.
This
- Parameters
-
c | the value to be compared to this one. |
- Returns
- true if this object is equal to the one passed.
Implements decaf::lang::Comparable< char >.
virtual bool decaf::lang::Character::operator== |
( |
const Character & |
c | ) |
const |
|
inlinevirtual |
Compares equality between this object and the one passed.
- Parameters
-
c | the value to be compared to this one. |
- Returns
- true if this object is equal to the one passed.
Implements decaf::lang::Comparable< Character >.
virtual bool decaf::lang::Character::operator== |
( |
const char & |
c | ) |
const |
|
inlinevirtual |
Compares equality between this object and the one passed.
- Parameters
-
c | the value to be compared to this one. |
- Returns
- true if this object is equal to the one passed.
Implements decaf::lang::Comparable< char >.
virtual short decaf::lang::Character::shortValue |
( |
| ) |
const |
|
inlinevirtual |
Answers the short value which the receiver represents.
- Returns
- int the value of the receiver.
Reimplemented from decaf::lang::Number.
static char decaf::lang::Character::toLowerCase |
( |
char |
value | ) |
|
|
inlinestatic |
Returns the lower case equivalent for the specified character if the character is an upper case letter.
Otherwise, the specified character is returned unchanged.
- Parameters
-
value | the character to convert if needed. |
- Returns
- if value is an upper case character then its lower case counterpart, otherwise just returns value unchanged.
std::string decaf::lang::Character::toString |
( |
| ) |
const |
static char decaf::lang::Character::toUpperCase |
( |
char |
value | ) |
|
|
inlinestatic |
Returns the upper case equivalent for the specified character if the character is a lower case letter.
Otherwise, the specified character is returned unchanged.
- Parameters
-
value | the character to convert to upper case if needed. |
- Returns
- if value is a lower case character then its upper case counterpart, otherwise just returns value unchanged.
static Character decaf::lang::Character::valueOf |
( |
char |
value | ) |
|
|
inlinestatic |
Returns a Character instance representing the specified char value.
- Parameters
-
value | the primitive char to wrap. |
- Returns
- a new Character instance that wraps this value.
const int decaf::lang::Character::MAX_RADIX |
|
static |
The maximum radix available for conversion to and from strings.
const char decaf::lang::Character::MAX_VALUE |
|
static |
The maximum value that a signed char can take on.
const int decaf::lang::Character::MIN_RADIX |
|
static |
The minimum radix available for conversion to and from strings.
const char decaf::lang::Character::MIN_VALUE |
|
static |
The minimum value that a signed char can take on.
const int decaf::lang::Character::SIZE |
|
static |
The size of the primitive character in bits.
The documentation for this class was generated from the following file: