public interface SignedWord extends ComparableWord
Modifier and Type | Method and Description |
---|---|
SignedWord |
add(int val)
Returns a Signed whose value is
(this + val) . |
SignedWord |
add(SignedWord val)
Returns a Signed whose value is
(this + val) . |
SignedWord |
and(int val)
Returns a Signed whose value is
(this & val) . |
SignedWord |
and(SignedWord val)
Returns a Signed whose value is
(this & val) . |
boolean |
equal(int val)
Compares this Signed with the specified value.
|
boolean |
equal(SignedWord val)
Compares this Signed with the specified value.
|
boolean |
greaterOrEqual(int val)
Compares this Signed with the specified value.
|
boolean |
greaterOrEqual(SignedWord val)
Compares this Signed with the specified value.
|
boolean |
greaterThan(int val)
Compares this Signed with the specified value.
|
boolean |
greaterThan(SignedWord val)
Compares this Signed with the specified value.
|
boolean |
lessOrEqual(int val)
Compares this Signed with the specified value.
|
boolean |
lessOrEqual(SignedWord val)
Compares this Signed with the specified value.
|
boolean |
lessThan(int val)
Compares this Signed with the specified value.
|
boolean |
lessThan(SignedWord val)
Compares this Signed with the specified value.
|
SignedWord |
multiply(int val)
Returns a Signed whose value is
(this * val) . |
SignedWord |
multiply(SignedWord val)
Returns a Signed whose value is
(this * val) . |
SignedWord |
not()
Returns a Signed whose value is
(~this) . |
boolean |
notEqual(int val)
Compares this Signed with the specified value.
|
boolean |
notEqual(SignedWord val)
Compares this Signed with the specified value.
|
SignedWord |
or(int val)
Returns a Signed whose value is
(this | val) . |
SignedWord |
or(SignedWord val)
Returns a Signed whose value is
(this | val) . |
SignedWord |
shiftLeft(int n)
Returns a Signed whose value is
(this << n) . |
SignedWord |
shiftLeft(UnsignedWord n)
Returns a Signed whose value is
(this << n) . |
SignedWord |
signedDivide(int val)
Returns a Signed whose value is
(this / val) . |
SignedWord |
signedDivide(SignedWord val)
Returns a Signed whose value is
(this / val) . |
SignedWord |
signedRemainder(int val)
Returns a Signed whose value is
(this % val) . |
SignedWord |
signedRemainder(SignedWord val)
Returns a Signed whose value is
(this % val) . |
SignedWord |
signedShiftRight(int n)
Returns a Signed whose value is
(this >> n) . |
SignedWord |
signedShiftRight(UnsignedWord n)
Returns a Signed whose value is
(this >> n) . |
SignedWord |
subtract(int val)
Returns a Signed whose value is
(this - val) . |
SignedWord |
subtract(SignedWord val)
Returns a Signed whose value is
(this - val) . |
SignedWord |
xor(int val)
Returns a Signed whose value is
(this ^ val) . |
SignedWord |
xor(SignedWord val)
Returns a Signed whose value is
(this ^ val) . |
equal, notEqual
SignedWord add(SignedWord val)
(this + val)
.val
- value to be added to this Signed.this + val
SignedWord subtract(SignedWord val)
(this - val)
.val
- value to be subtracted from this Signed.this - val
SignedWord multiply(SignedWord val)
(this * val)
.val
- value to be multiplied by this Signed.this * val
SignedWord signedDivide(SignedWord val)
(this / val)
.val
- value by which this Signed is to be divided.this / val
SignedWord signedRemainder(SignedWord val)
(this % val)
.val
- value by which this Signed is to be divided, and the remainder computed.this % val
SignedWord shiftLeft(UnsignedWord n)
(this << n)
.n
- shift distance, in bits.this << n
SignedWord signedShiftRight(UnsignedWord n)
(this >> n)
. Sign extension is performed.n
- shift distance, in bits.this >> n
SignedWord and(SignedWord val)
(this & val)
. (This method returns a negative Signed
if and only if this and val are both negative.)val
- value to be AND'ed with this Signed.this & val
SignedWord or(SignedWord val)
(this | val)
. (This method returns a negative Signed
if and only if either this or val is negative.)val
- value to be OR'ed with this Signed.this | val
SignedWord xor(SignedWord val)
(this ^ val)
. (This method returns a negative Signed
if and only if exactly one of this and val are negative.)val
- value to be XOR'ed with this Signed.this ^ val
SignedWord not()
(~this)
. (This method returns a negative value if and
only if this Signed is non-negative.)~this
boolean equal(SignedWord val)
val
- value to which this Signed is to be compared.this == val
boolean notEqual(SignedWord val)
val
- value to which this Signed is to be compared.this != val
boolean lessThan(SignedWord val)
val
- value to which this Signed is to be compared.this < val
boolean lessOrEqual(SignedWord val)
val
- value to which this Signed is to be compared.this <= val
boolean greaterThan(SignedWord val)
val
- value to which this Signed is to be compared.this > val
boolean greaterOrEqual(SignedWord val)
val
- value to which this Signed is to be compared.this >= val
SignedWord add(int val)
(this + val)
.val
- value to be added to this Signed.this + val
SignedWord subtract(int val)
(this - val)
.val
- value to be subtracted from this Signed.this - val
SignedWord multiply(int val)
(this * val)
.val
- value to be multiplied by this Signed.this * val
SignedWord signedDivide(int val)
(this / val)
.val
- value by which this Signed is to be divided.this / val
SignedWord signedRemainder(int val)
(this % val)
.val
- value by which this Signed is to be divided, and the remainder computed.this % val
SignedWord shiftLeft(int n)
(this << n)
.n
- shift distance, in bits.this << n
SignedWord signedShiftRight(int n)
(this >> n)
. Sign extension is performed.n
- shift distance, in bits.this >> n
SignedWord and(int val)
(this & val)
. (This method returns a negative Signed
if and only if this and val are both negative.)val
- value to be AND'ed with this Signed.this & val
SignedWord or(int val)
(this | val)
. (This method returns a negative Signed
if and only if either this or val is negative.)val
- value to be OR'ed with this Signed.this | val
SignedWord xor(int val)
(this ^ val)
. (This method returns a negative Signed
if and only if exactly one of this and val are negative.)val
- value to be XOR'ed with this Signed.this ^ val
boolean equal(int val)
val
- value to which this Signed is to be compared.this == val
boolean notEqual(int val)
val
- value to which this Signed is to be compared.this != val
boolean lessThan(int val)
val
- value to which this Signed is to be compared.this < val
boolean lessOrEqual(int val)
val
- value to which this Signed is to be compared.this <= val
boolean greaterThan(int val)
val
- value to which this Signed is to be compared.this > val
boolean greaterOrEqual(int val)
val
- value to which this Signed is to be compared.this >= val