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, notEqual
Signed add(Signed val)
(this + val)
.val
- value to be added to this Signed.this + val
Signed subtract(Signed val)
(this - val)
.val
- value to be subtracted from this Signed.this - val
Signed multiply(Signed val)
(this * val)
.val
- value to be multiplied by this Signed.this * val
Signed signedDivide(Signed val)
(this / val)
.val
- value by which this Signed is to be divided.this / val
Signed signedRemainder(Signed val)
(this % val)
.val
- value by which this Signed is to be divided, and the remainder computed.this % val
Signed shiftLeft(Unsigned n)
(this << n)
.n
- shift distance, in bits.this << n
Signed signedShiftRight(Unsigned n)
(this >> n)
. Sign extension is performed.n
- shift distance, in bits.this >> n
Signed 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 & val
Signed 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 | val
Signed 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 ^ val
Signed not()
(~this)
. (This method returns a negative value if and
only if this Signed is non-negative.)~this
boolean equal(Signed val)
val
- value to which this Signed is to be compared.this == val
boolean notEqual(Signed val)
val
- value to which this Signed is to be compared.this != val
boolean lessThan(Signed val)
val
- value to which this Signed is to be compared.this < val
boolean lessOrEqual(Signed val)
val
- value to which this Signed is to be compared.this <= val
boolean greaterThan(Signed val)
val
- value to which this Signed is to be compared.this > val
boolean greaterOrEqual(Signed val)
val
- value to which this Signed is to be compared.this >= val
Signed add(int val)
(this + val)
.val
- value to be added to this Signed.this + val
Signed subtract(int val)
(this - val)
.val
- value to be subtracted from this Signed.this - val
Signed multiply(int val)
(this * val)
.val
- value to be multiplied by this Signed.this * val
Signed signedDivide(int val)
(this / val)
.val
- value by which this Signed is to be divided.this / val
Signed signedRemainder(int val)
(this % val)
.val
- value by which this Signed is to be divided, and the remainder computed.this % val
Signed shiftLeft(int n)
(this << n)
.n
- shift distance, in bits.this << n
Signed signedShiftRight(int n)
(this >> n)
. Sign extension is performed.n
- shift distance, in bits.this >> n
Signed 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
Signed 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
Signed 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