public interface Signed extends ComparableWord
| Modifier and Type | Method and Description |
|---|---|
Signed |
add(int val)
Returns a Signed whose value is
(this + val). |
Signed |
add(Signed val)
Returns a Signed whose value is
(this + val). |
Signed |
and(int val)
Returns a Signed whose value is
(this & val). |
Signed |
and(Signed val)
Returns a Signed whose value is
(this & val). |
boolean |
equal(int val)
Compares this Signed with the specified value.
|
boolean |
equal(Signed val)
Compares this Signed with the specified value.
|
boolean |
greaterOrEqual(int val)
Compares this Signed with the specified value.
|
boolean |
greaterOrEqual(Signed val)
Compares this Signed with the specified value.
|
boolean |
greaterThan(int val)
Compares this Signed with the specified value.
|
boolean |
greaterThan(Signed val)
Compares this Signed with the specified value.
|
boolean |
lessOrEqual(int val)
Compares this Signed with the specified value.
|
boolean |
lessOrEqual(Signed val)
Compares this Signed with the specified value.
|
boolean |
lessThan(int val)
Compares this Signed with the specified value.
|
boolean |
lessThan(Signed val)
Compares this Signed with the specified value.
|
Signed |
multiply(int val)
Returns a Signed whose value is
(this * val). |
Signed |
multiply(Signed val)
Returns a Signed whose value is
(this * val). |
Signed |
not()
Returns a Signed whose value is
(~this). |
boolean |
notEqual(int val)
Compares this Signed with the specified value.
|
boolean |
notEqual(Signed val)
Compares this Signed with the specified value.
|
Signed |
or(int val)
Returns a Signed whose value is
(this | val). |
Signed |
or(Signed val)
Returns a Signed whose value is
(this | val). |
Signed |
shiftLeft(int n)
Returns a Signed whose value is
(this << n). |
Signed |
shiftLeft(Unsigned n)
Returns a Signed whose value is
(this << n). |
Signed |
signedDivide(int val)
Returns a Signed whose value is
(this / val). |
Signed |
signedDivide(Signed val)
Returns a Signed whose value is
(this / val). |
Signed |
signedRemainder(int val)
Returns a Signed whose value is
(this % val). |
Signed |
signedRemainder(Signed val)
Returns a Signed whose value is
(this % val). |
Signed |
signedShiftRight(int n)
Returns a Signed whose value is
(this >> n). |
Signed |
signedShiftRight(Unsigned n)
Returns a Signed whose value is
(this >> n). |
Signed |
subtract(int val)
Returns a Signed whose value is
(this - val). |
Signed |
subtract(Signed val)
Returns a Signed whose value is
(this - val). |
Signed |
xor(int val)
Returns a Signed whose value is
(this ^ val). |
Signed |
xor(Signed val)
Returns a Signed whose value is
(this ^ val). |
equal, notEqualSigned add(Signed val)
(this + val).val - value to be added to this Signed.this + valSigned subtract(Signed val)
(this - val).val - value to be subtracted from this Signed.this - valSigned multiply(Signed val)
(this * val).val - value to be multiplied by this Signed.this * valSigned signedDivide(Signed val)
(this / val).val - value by which this Signed is to be divided.this / valSigned signedRemainder(Signed val)
(this % val).val - value by which this Signed is to be divided, and the remainder computed.this % valSigned shiftLeft(Unsigned n)
(this << n).n - shift distance, in bits.this << nSigned signedShiftRight(Unsigned n)
(this >> n). Sign extension is performed.n - shift distance, in bits.this >> nSigned and(Signed 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 & valSigned or(Signed 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 | valSigned xor(Signed 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 ^ valSigned not()
(~this). (This method returns a negative value if and
only if this Signed is non-negative.)~thisboolean equal(Signed val)
val - value to which this Signed is to be compared.this == valboolean notEqual(Signed val)
val - value to which this Signed is to be compared.this != valboolean lessThan(Signed val)
val - value to which this Signed is to be compared.this < valboolean lessOrEqual(Signed val)
val - value to which this Signed is to be compared.this <= valboolean greaterThan(Signed val)
val - value to which this Signed is to be compared.this > valboolean greaterOrEqual(Signed val)
val - value to which this Signed is to be compared.this >= valSigned add(int val)
(this + val).val - value to be added to this Signed.this + valSigned subtract(int val)
(this - val).val - value to be subtracted from this Signed.this - valSigned multiply(int val)
(this * val).val - value to be multiplied by this Signed.this * valSigned signedDivide(int val)
(this / val).val - value by which this Signed is to be divided.this / valSigned signedRemainder(int val)
(this % val).val - value by which this Signed is to be divided, and the remainder computed.this % valSigned shiftLeft(int n)
(this << n).n - shift distance, in bits.this << nSigned signedShiftRight(int n)
(this >> n). Sign extension is performed.n - shift distance, in bits.this >> nSigned 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 & valSigned 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 | valSigned 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 ^ valboolean equal(int val)
val - value to which this Signed is to be compared.this == valboolean notEqual(int val)
val - value to which this Signed is to be compared.this != valboolean lessThan(int val)
val - value to which this Signed is to be compared.this < valboolean lessOrEqual(int val)
val - value to which this Signed is to be compared.this <= valboolean greaterThan(int val)
val - value to which this Signed is to be compared.this > valboolean greaterOrEqual(int val)
val - value to which this Signed is to be compared.this >= val