public final class IntNumber
extends java.lang.Object
IntNumber
implements an integer number of a given length (less than or equal to 64).Constructor and Description |
---|
IntNumber(IntFormat format,
long value)
Constructs an integer number.
|
Modifier and Type | Method and Description |
---|---|
IntNumber |
clone() |
boolean |
equals(java.lang.Object o) |
IntFormat |
getFormat()
Returns the format of the number.
|
long |
getSignExtendedValue()
Returns the sign-extended value.
|
long |
getValue()
Returns the number.
|
int |
hashCode() |
boolean |
isNegative()
Checks whether the number is negative.
|
boolean |
isPositive()
Checks whether the number is positive.
|
boolean |
isZero()
Checks whether the number is zero.
|
void |
setValue(long value)
Sets the number.
|
java.lang.String |
toString() |
public IntNumber(IntFormat format, long value)
format
- the format.value
- the number.public IntFormat getFormat()
public long getValue()
public long getSignExtendedValue()
public void setValue(long value)
value
- the number to be set.public boolean isZero()
true
if the number is zero; false
otherwise.public boolean isPositive()
true
if the number is positive; false
otherwise.public boolean isNegative()
true
if the number is negative; false
otherwise.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public IntNumber clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object