Methods Summary |
---|
public boolean | fitsIn16Bits()Returns true if this value can fit in 16 bits with sign-extension.
if (! fitsInInt()) {
return false;
}
int bits = getIntBits();
return (short) bits == bits;
|
public boolean | fitsIn8Bits()Returns true if this value can fit in 8 bits with sign-extension.
if (! fitsInInt()) {
return false;
}
int bits = getIntBits();
return (byte) bits == bits;
|
public abstract boolean | fitsInInt()Returns whether or not this instance's value may be accurately
represented as an int . The rule is that if there
is an int which may be sign-extended to yield this
instance's value, then this method returns true .
Otherwise, it returns false .
|
public abstract int | getIntBits()Gets the value as int bits. If this instance contains
more bits than fit in an int , then this returns only
the low-order bits.
|
public abstract long | getLongBits()Gets the value as long bits. If this instance contains
fewer bits than fit in a long , then the result of this
method is the sign extension of the value.
|