Interface UnsignedWord

All Superinterfaces:
ComparableWord, WordBase
All Known Subinterfaces:
Pointer

public interface UnsignedWord extends ComparableWord
Represents an unsigned word-sized value.
Since:
19.0
  • Method Details

    • add

      Returns a Unsigned whose value is (this + val).
      Parameters:
      val - value to be added to this Unsigned.
      Returns:
      this + val
      Since:
      19.0
    • subtract

      UnsignedWord subtract(UnsignedWord val)
      Returns a Unsigned whose value is (this - val).
      Parameters:
      val - value to be subtracted from this Unsigned.
      Returns:
      this - val
      Since:
      19.0
    • multiply

      UnsignedWord multiply(UnsignedWord val)
      Returns a Unsigned whose value is (this * val).
      Parameters:
      val - value to be multiplied by this Unsigned.
      Returns:
      this * val
      Since:
      19.0
    • unsignedDivide

      UnsignedWord unsignedDivide(UnsignedWord val)
      Returns a Unsigned whose value is (this / val).
      Parameters:
      val - value by which this Unsigned is to be divided.
      Returns:
      this / val
      Since:
      19.0
    • unsignedRemainder

      UnsignedWord unsignedRemainder(UnsignedWord val)
      Returns a Unsigned whose value is (this % val).
      Parameters:
      val - value by which this Unsigned is to be divided, and the remainder computed.
      Returns:
      this % val
      Since:
      19.0
    • shiftLeft

      UnsignedWord shiftLeft(UnsignedWord n)
      Returns a Unsigned whose value is (this << n).
      Parameters:
      n - shift distance, in bits.
      Returns:
      this << n
      Since:
      19.0
    • unsignedShiftRight

      UnsignedWord unsignedShiftRight(UnsignedWord n)
      Returns a Unsigned whose value is (this >>> n). No sign extension is performed.
      Parameters:
      n - shift distance, in bits.
      Returns:
      this >> n
      Since:
      19.0
    • and

      Returns a Unsigned whose value is (this & val).
      Parameters:
      val - value to be AND'ed with this Unsigned.
      Returns:
      this & val
      Since:
      19.0
    • or

      Returns a Unsigned whose value is (this | val).
      Parameters:
      val - value to be OR'ed with this Unsigned.
      Returns:
      this | val
      Since:
      19.0
    • xor

      Returns a Unsigned whose value is (this ^ val).
      Parameters:
      val - value to be XOR'ed with this Unsigned.
      Returns:
      this ^ val
      Since:
      19.0
    • not

      Returns a Unsigned whose value is (~this).
      Returns:
      ~this
      Since:
      19.0
    • equal

      boolean equal(UnsignedWord val)
      Compares this Unsigned with the specified value.
      Parameters:
      val - value to which this Unsigned is to be compared.
      Returns:
      this == val
      Since:
      19.0
    • notEqual

      boolean notEqual(UnsignedWord val)
      Compares this Unsigned with the specified value.
      Parameters:
      val - value to which this Unsigned is to be compared.
      Returns:
      this != val
      Since:
      19.0
    • belowThan

      boolean belowThan(UnsignedWord val)
      Compares this Unsigned with the specified value.
      Parameters:
      val - value to which this Unsigned is to be compared.
      Returns:
      this < val
      Since:
      19.0
    • belowOrEqual

      boolean belowOrEqual(UnsignedWord val)
      Compares this Unsigned with the specified value.
      Parameters:
      val - value to which this Unsigned is to be compared.
      Returns:
      this <= val
      Since:
      19.0
    • aboveThan

      boolean aboveThan(UnsignedWord val)
      Compares this Unsigned with the specified value.
      Parameters:
      val - value to which this Unsigned is to be compared.
      Returns:
      this > val
      Since:
      19.0
    • aboveOrEqual

      boolean aboveOrEqual(UnsignedWord val)
      Compares this Unsigned with the specified value.
      Parameters:
      val - value to which this Unsigned is to be compared.
      Returns:
      this >= val
      Since:
      19.0
    • add

      UnsignedWord add(int val)
      Returns a Unsigned whose value is (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.

      Parameters:
      val - value to be added to this Unsigned.
      Returns:
      this + val
      Since:
      19.0
    • subtract

      UnsignedWord subtract(int val)
      Returns a Unsigned whose value is (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.

      Parameters:
      val - value to be subtracted from this Unsigned.
      Returns:
      this - val
      Since:
      19.0
    • multiply

      UnsignedWord multiply(int val)
      Returns a Unsigned whose value is (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.

      Parameters:
      val - value to be multiplied by this Unsigned.
      Returns:
      this * val
      Since:
      19.0
    • unsignedDivide

      UnsignedWord unsignedDivide(int val)
      Returns a Unsigned whose value is (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.

      Parameters:
      val - value by which this Unsigned is to be divided.
      Returns:
      this / val
      Since:
      19.0
    • unsignedRemainder

      UnsignedWord unsignedRemainder(int val)
      Returns a Unsigned whose value is (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.

      Parameters:
      val - value by which this Unsigned is to be divided, and the remainder computed.
      Returns:
      this % val
      Since:
      19.0
    • shiftLeft

      UnsignedWord shiftLeft(int n)
      Returns a Unsigned whose value is (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.

      Parameters:
      n - shift distance, in bits.
      Returns:
      this << n
      Since:
      19.0
    • unsignedShiftRight

      UnsignedWord unsignedShiftRight(int n)
      Returns a Unsigned whose value is (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.

      Parameters:
      n - shift distance, in bits.
      Returns:
      this >> n
      Since:
      19.0
    • and

      UnsignedWord and(int val)
      Returns a Unsigned whose value is (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.

      Parameters:
      val - value to be AND'ed with this Unsigned.
      Returns:
      this & val
      Since:
      19.0
    • or

      UnsignedWord or(int val)
      Returns a Unsigned whose value is (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.

      Parameters:
      val - value to be OR'ed with this Unsigned.
      Returns:
      this | val
      Since:
      19.0
    • xor

      UnsignedWord xor(int val)
      Returns a Unsigned whose value is (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.

      Parameters:
      val - value to be XOR'ed with this Unsigned.
      Returns:
      this ^ val
      Since:
      19.0
    • equal

      boolean equal(int val)
      Compares this Unsigned with the specified value.

      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.

      Parameters:
      val - value to which this Unsigned is to be compared.
      Returns:
      this == val
      Since:
      19.0
    • notEqual

      boolean notEqual(int val)
      Compares this Unsigned with the specified value.

      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.

      Parameters:
      val - value to which this Unsigned is to be compared.
      Returns:
      this != val
      Since:
      19.0
    • belowThan

      boolean belowThan(int val)
      Compares this Unsigned with the specified value.

      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.

      Parameters:
      val - value to which this Unsigned is to be compared.
      Returns:
      this < val
      Since:
      19.0
    • belowOrEqual

      boolean belowOrEqual(int val)
      Compares this Unsigned with the specified value.

      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.

      Parameters:
      val - value to which this Unsigned is to be compared.
      Returns:
      this <= val
      Since:
      19.0
    • aboveThan

      boolean aboveThan(int val)
      Compares this Unsigned with the specified value.

      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.

      Parameters:
      val - value to which this Unsigned is to be compared.
      Returns:
      this > val
      Since:
      19.0
    • aboveOrEqual

      boolean aboveOrEqual(int val)
      Compares this Unsigned with the specified value.

      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.

      Parameters:
      val - value to which this Unsigned is to be compared.
      Returns:
      this >= val
      Since:
      19.0