phelps.lang
public class Integers extends Object
Version: $Revision: 1.5 $ $Date: 2003/11/27 18:40:29 $
Field Summary | |
---|---|
static Integer | ONE |
static Integer | TWO |
static Integer | ZERO |
Method Summary | |
---|---|
static int | countOneBits(int value) Returns number of 1-bits in 4-byte integer value. |
static Integer | getInteger(int val) Caches java.lang.Integer objects, so the 1000s of instances of 0 all share the same Java object. |
static int | parseHex(int ch1, int ch2) Interprets ch1 and ch2 as pair of hexidecimal characters, and returns combined 8-bit value. |
static int | parseInt(String value, int defaultval)
Tries to parse value as an int ,
but if String is null or can't be parsed as an int returns defaultval . |
static int | parseInt(int ch)
Interprets ch as ASCII character in radix up to 36, and returns value, or if not hex returns -1.
|
static String | toRomanString(int val)
Returns Roman numeral representation of numbers >0 && <=4000 (no numbers which require a bar to multiply by 1000).
|
static String | toString(int val) |
int
,
but if String is null
or can't be parsed as an int
returns defaultval .