public interface Unsigned extends ComparableWord
Modifier and Type | Method and Description |
---|---|
boolean |
aboveOrEqual(int val)
Compares this Unsigned with the specified value.
|
boolean |
aboveOrEqual(Unsigned val)
Compares this Unsigned with the specified value.
|
boolean |
aboveThan(int val)
Compares this Unsigned with the specified value.
|
boolean |
aboveThan(Unsigned val)
Compares this Unsigned with the specified value.
|
Unsigned |
add(int val)
Returns a Unsigned whose value is
(this + val) . |
Unsigned |
add(Unsigned val)
Returns a Unsigned whose value is
(this + val) . |
Unsigned |
and(int val)
Returns a Unsigned whose value is
(this & val) . |
Unsigned |
and(Unsigned val)
Returns a Unsigned whose value is
(this & val) . |
boolean |
belowOrEqual(int val)
Compares this Unsigned with the specified value.
|
boolean |
belowOrEqual(Unsigned val)
Compares this Unsigned with the specified value.
|
boolean |
belowThan(int val)
Compares this Unsigned with the specified value.
|
boolean |
belowThan(Unsigned val)
Compares this Unsigned with the specified value.
|
boolean |
equal(int val)
Compares this Unsigned with the specified value.
|
boolean |
equal(Unsigned val)
Compares this Unsigned with the specified value.
|
Unsigned |
multiply(int val)
Returns a Unsigned whose value is
(this * val) . |
Unsigned |
multiply(Unsigned val)
Returns a Unsigned whose value is
(this * val) . |
Unsigned |
not()
Returns a Unsigned whose value is
(~this) . |
boolean |
notEqual(int val)
Compares this Unsigned with the specified value.
|
boolean |
notEqual(Unsigned val)
Compares this Unsigned with the specified value.
|
Unsigned |
or(int val)
Returns a Unsigned whose value is
(this | val) . |
Unsigned |
or(Unsigned val)
Returns a Unsigned whose value is
(this | val) . |
Unsigned |
shiftLeft(int n)
Returns a Unsigned whose value is
(this << n) . |
Unsigned |
shiftLeft(Unsigned n)
Returns a Unsigned whose value is
(this << n) . |
Unsigned |
subtract(int val)
Returns a Unsigned whose value is
(this - val) . |
Unsigned |
subtract(Unsigned val)
Returns a Unsigned whose value is
(this - val) . |
Unsigned |
unsignedDivide(int val)
Returns a Unsigned whose value is
(this / val) . |
Unsigned |
unsignedDivide(Unsigned val)
Returns a Unsigned whose value is
(this / val) . |
Unsigned |
unsignedRemainder(int val)
Returns a Unsigned whose value is
(this % val) . |
Unsigned |
unsignedRemainder(Unsigned val)
Returns a Unsigned whose value is
(this % val) . |
Unsigned |
unsignedShiftRight(int n)
Returns a Unsigned whose value is
(this >>> n) . |
Unsigned |
unsignedShiftRight(Unsigned n)
Returns a Unsigned whose value is
(this >>> n) . |
Unsigned |
xor(int val)
Returns a Unsigned whose value is
(this ^ val) . |
Unsigned |
xor(Unsigned val)
Returns a Unsigned whose value is
(this ^ val) . |
equal, notEqual
Unsigned add(Unsigned val)
(this + val)
.val
- value to be added to this Unsigned.this + val
Unsigned subtract(Unsigned val)
(this - val)
.val
- value to be subtracted from this Unsigned.this - val
Unsigned multiply(Unsigned val)
(this * val)
.val
- value to be multiplied by this Unsigned.this * val
Unsigned unsignedDivide(Unsigned val)
(this / val)
.val
- value by which this Unsigned is to be divided.this / val
Unsigned unsignedRemainder(Unsigned val)
(this % val)
.val
- value by which this Unsigned is to be divided, and the remainder computed.this % val
Unsigned shiftLeft(Unsigned n)
(this << n)
.n
- shift distance, in bits.this << n
Unsigned unsignedShiftRight(Unsigned n)
(this >>> n)
. No sign extension is performed.n
- shift distance, in bits.this >> n
Unsigned and(Unsigned val)
(this & val)
.val
- value to be AND'ed with this Unsigned.this & val
Unsigned or(Unsigned val)
(this | val)
.val
- value to be OR'ed with this Unsigned.this | val
Unsigned xor(Unsigned val)
(this ^ val)
.val
- value to be XOR'ed with this Unsigned.this ^ val
boolean equal(Unsigned val)
val
- value to which this Unsigned is to be compared.this == val
boolean notEqual(Unsigned val)
val
- value to which this Unsigned is to be compared.this != val
boolean belowThan(Unsigned val)
val
- value to which this Unsigned is to be compared.this < val
boolean belowOrEqual(Unsigned val)
val
- value to which this Unsigned is to be compared.this <= val
boolean aboveThan(Unsigned val)
val
- value to which this Unsigned is to be compared.this > val
boolean aboveOrEqual(Unsigned val)
val
- value to which this Unsigned is to be compared.this >= val
Unsigned add(int val)
(this + val)
.
Note that the right operand is a signed value, while the operation is performed unsigned. Therefore, the result is only well-defined for positive right operands.
val
- value to be added to this Unsigned.this + val
Unsigned subtract(int val)
(this - val)
.
Note that the right operand is a signed value, while the operation is performed unsigned. Therefore, the result is only well-defined for positive right operands.
val
- value to be subtracted from this Unsigned.this - val
Unsigned multiply(int val)
(this * val)
.
Note that the right operand is a signed value, while the operation is performed unsigned. Therefore, the result is only well-defined for positive right operands.
val
- value to be multiplied by this Unsigned.this * val
Unsigned unsignedDivide(int val)
(this / val)
.
Note that the right operand is a signed value, while the operation is performed unsigned. Therefore, the result is only well-defined for positive right operands.
val
- value by which this Unsigned is to be divided.this / val
Unsigned unsignedRemainder(int val)
(this % val)
.
Note that the right operand is a signed value, while the operation is performed unsigned. Therefore, the result is only well-defined for positive right operands.
val
- value by which this Unsigned is to be divided, and the remainder computed.this % val
Unsigned shiftLeft(int n)
(this << n)
.
Note that the right operand is a signed value, while the operation is performed unsigned. Therefore, the result is only well-defined for positive right operands.
n
- shift distance, in bits.this << n
Unsigned unsignedShiftRight(int n)
(this >>> n)
. No sign extension is performed.
Note that the right operand is a signed value, while the operation is performed unsigned. Therefore, the result is only well-defined for positive right operands.
n
- shift distance, in bits.this >> n
Unsigned and(int val)
(this & val)
.
Note that the right operand is a signed value, while the operation is performed unsigned. Therefore, the result is only well-defined for positive right operands.
val
- value to be AND'ed with this Unsigned.this & val
Unsigned or(int val)
(this | val)
.
Note that the right operand is a signed value, while the operation is performed unsigned. Therefore, the result is only well-defined for positive right operands.
val
- value to be OR'ed with this Unsigned.this | val
Unsigned xor(int val)
(this ^ val)
.
Note that the right operand is a signed value, while the operation is performed unsigned. Therefore, the result is only well-defined for positive right operands.
val
- value to be XOR'ed with this Unsigned.this ^ val
boolean equal(int val)
Note that the right operand is a signed value, while the operation is performed unsigned. Therefore, the result is only well-defined for positive right operands.
val
- value to which this Unsigned is to be compared.this == val
boolean notEqual(int val)
Note that the right operand is a signed value, while the operation is performed unsigned. Therefore, the result is only well-defined for positive right operands.
val
- value to which this Unsigned is to be compared.this != val
boolean belowThan(int val)
Note that the right operand is a signed value, while the operation is performed unsigned. Therefore, the result is only well-defined for positive right operands.
val
- value to which this Unsigned is to be compared.this < val
boolean belowOrEqual(int val)
Note that the right operand is a signed value, while the operation is performed unsigned. Therefore, the result is only well-defined for positive right operands.
val
- value to which this Unsigned is to be compared.this <= val
boolean aboveThan(int val)
Note that the right operand is a signed value, while the operation is performed unsigned. Therefore, the result is only well-defined for positive right operands.
val
- value to which this Unsigned is to be compared.this > val
boolean aboveOrEqual(int val)
Note that the right operand is a signed value, while the operation is performed unsigned. Therefore, the result is only well-defined for positive right operands.
val
- value to which this Unsigned is to be compared.this >= val