Package | Description |
---|---|
ca.randolf.lang |
Various classes that add value to Java.
|
ca.randolf.util |
Convenient utility classes that help make commonly needed programming
tasks easier.
|
Modifier and Type | Method and Description |
---|---|
static VeryLong |
VeryLong.coerce(java.math.BigInteger value)
Strips off excess bits (the sign will be preserved), if any, and returns
the remaining BigInteger presented as a VeryLong.
|
VeryLong |
VeryLong.negate()
Returns a VeryLong whose value is (-this).
|
static VeryLong |
VeryLong.parseVeryLong(String s)
Converts the specified
String into a VeryLong ,
presented as a VeryLong because Java doesn't have a primitive VeryLong
type. This function assumes a radix of 10. |
static VeryLong |
VeryLong.parseVeryLong(String s,
int radix)
Converts the specified
String into a VeryLong ,
presented as a VeryLong because Java doesn't have a primitive VeryLong
type, using the specified radix (base). The string must not be
null or empty. It may begin with an optional minus sign
("-"), which will negate the answer, provided that there are also valid
digits. Each digit is parsed as if by Character.digit(d,
radix) , and must be in the range 0 to radix -
1 . Finally, the result must be within MIN_VALUE
to MAX_VALUE , inclusive. Unlike Double.parseDouble, you
may not have a leading plus sign ("+"). |
static VeryLong |
VeryLong.valueOf(String s)
Creates a new
VeryLong object using the String
and assuming a radix of 10. |
static VeryLong |
VeryLong.valueOf(String s,
int radix)
Creates a new
VeryLong object using the String
and specified radix (base). |
Modifier and Type | Method and Description |
---|---|
int |
VeryLong.compareTo(VeryLong n)
Compare two VeryLongs numerically by comparing their
VeryLong
values. The result is positive if the first is greater, negative if
the second is greater, and 0 if the two are equal. |
static String |
VeryLong.toString(VeryLong veryLong)
Converts the
VeryLong to a String and assumes a
radix of 10. |
Modifier and Type | Method and Description |
---|---|
static VeryLong |
StringParser.parseVeryLong(String number,
VeryLong exception,
String... specials)
Converts a String containing a number to a special (optional) or VeryLong
(in that order), and returns the specified VeryLong (which must also be
within the range of a nybble), also represented by a byte, in place of
throwing java.lang.NumberFormatException.
|
static VeryLong |
StringParser.transmuteVeryLong(String phrase,
VeryLong exception,
String... specials)
Transmutes a String to a VeryLong object based on the list of specials
(the phrases and their corresponding values), and returns the specified
VeryLong object represented by a VeryLong object (because a native
equiviliant isn't currently available).
|
Modifier and Type | Method and Description |
---|---|
static VeryLong |
StringParser.parseVeryLong(String number,
VeryLong exception,
String... specials)
Converts a String containing a number to a special (optional) or VeryLong
(in that order), and returns the specified VeryLong (which must also be
within the range of a nybble), also represented by a byte, in place of
throwing java.lang.NumberFormatException.
|
static VeryLong |
StringParser.transmuteVeryLong(String phrase,
VeryLong exception,
String... specials)
Transmutes a String to a VeryLong object based on the list of specials
(the phrases and their corresponding values), and returns the specified
VeryLong object represented by a VeryLong object (because a native
equiviliant isn't currently available).
|