public class IntegerValueType
extends java.lang.Number
implements java.lang.Comparable, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
private static long |
serialVersionUID |
private java.lang.String |
value
canonical representation of absolute value of integer
BNF of canonical representation
canonical_integer := "0" | nonzero
nonzero := '-'? ["1"-"9"] ["0"-"9"]*
|
| Modifier | Constructor and Description |
|---|---|
private |
IntegerValueType(long v) |
private |
IntegerValueType(java.lang.String canonicalizedValue)
internal use only: construct object from canonicalized value
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(java.lang.Object o) |
static IntegerValueType |
create(java.math.BigInteger bi)
translates a BigInteger to an IntegerValueType.
|
static IntegerValueType |
create(java.lang.String nonCanonicalizedValue)
translates non-canonicalized representation of an integer into
an IntegerValueType.
|
double |
doubleValue() |
boolean |
equals(java.lang.Object o) |
float |
floatValue() |
int |
hashCode() |
int |
intValue() |
boolean |
isNegative()
returns true if the value if negative (less than zero)
|
boolean |
isNonNegative()
returns true if the value if non-negative (greater than or equal to zero)
|
boolean |
isNonPositive()
returns true if the value if non-positive (less than or equal to zero)
|
boolean |
isPositive()
returns true if the value if positive (greater than zero)
|
long |
longValue() |
int |
precision() |
java.math.BigInteger |
toBigInteger()
converts to BigInteger.
|
java.lang.String |
toString() |
private final java.lang.String value
private static final long serialVersionUID
private IntegerValueType(java.lang.String canonicalizedValue)
private IntegerValueType(long v)
public static IntegerValueType create(java.math.BigInteger bi)
public static IntegerValueType create(java.lang.String nonCanonicalizedValue)
public int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparablepublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic int precision()
public boolean isNonPositive()
public boolean isPositive()
public boolean isNegative()
public boolean isNonNegative()
public java.math.BigInteger toBigInteger()
public double doubleValue()
doubleValue in class java.lang.Numberpublic float floatValue()
floatValue in class java.lang.Numberpublic int intValue()
intValue in class java.lang.Numberpublic long longValue()
longValue in class java.lang.Number