Interface SignedWord

All Superinterfaces:
ComparableWord, WordBase

public interface SignedWord extends ComparableWord
Represents a signed word-sized value.
Since:
19.0
  • Method Details

    • add

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

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

      SignedWord multiply(SignedWord val)
      Returns a Signed whose value is (this * val).
      Parameters:
      val - value to be multiplied by this Signed.
      Returns:
      this * val
      Since:
      19.0
    • signedDivide

      SignedWord signedDivide(SignedWord val)
      Returns a Signed whose value is (this / val).
      Parameters:
      val - value by which this Signed is to be divided.
      Returns:
      this / val
      Since:
      19.0
    • signedRemainder

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

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

      SignedWord signedShiftRight(UnsignedWord n)
      Returns a Signed whose value is (this >> n). Sign extension is performed.
      Parameters:
      n - shift distance, in bits.
      Returns:
      this >> n
      Since:
      19.0
    • and

      Returns a Signed whose value is (this & val). (This method returns a negative Signed if and only if this and val are both negative.)
      Parameters:
      val - value to be AND'ed with this Signed.
      Returns:
      this & val
      Since:
      19.0
    • or

      Returns a Signed whose value is (this | val). (This method returns a negative Signed if and only if either this or val is negative.)
      Parameters:
      val - value to be OR'ed with this Signed.
      Returns:
      this | val
      Since:
      19.0
    • xor

      Returns a Signed whose value is (this ^ val). (This method returns a negative Signed if and only if exactly one of this and val are negative.)
      Parameters:
      val - value to be XOR'ed with this Signed.
      Returns:
      this ^ val
      Since:
      19.0
    • not

      SignedWord not()
      Returns a Signed whose value is (~this). (This method returns a negative value if and only if this Signed is non-negative.)
      Returns:
      ~this
      Since:
      19.0
    • equal

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

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

      boolean lessThan(SignedWord val)
      Compares this Signed with the specified value.
      Parameters:
      val - value to which this Signed is to be compared.
      Returns:
      this < val
      Since:
      19.0
    • lessOrEqual

      boolean lessOrEqual(SignedWord val)
      Compares this Signed with the specified value.
      Parameters:
      val - value to which this Signed is to be compared.
      Returns:
      this <= val
      Since:
      19.0
    • greaterThan

      boolean greaterThan(SignedWord val)
      Compares this Signed with the specified value.
      Parameters:
      val - value to which this Signed is to be compared.
      Returns:
      this > val
      Since:
      19.0
    • greaterOrEqual

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

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

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

      SignedWord multiply(int val)
      Returns a Signed whose value is (this * val).
      Parameters:
      val - value to be multiplied by this Signed.
      Returns:
      this * val
      Since:
      19.0
    • signedDivide

      SignedWord signedDivide(int val)
      Returns a Signed whose value is (this / val).
      Parameters:
      val - value by which this Signed is to be divided.
      Returns:
      this / val
      Since:
      19.0
    • signedRemainder

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

      SignedWord shiftLeft(int n)
      Returns a Signed whose value is (this << n).
      Parameters:
      n - shift distance, in bits.
      Returns:
      this << n
      Since:
      19.0
    • signedShiftRight

      SignedWord signedShiftRight(int n)
      Returns a Signed whose value is (this >> n). Sign extension is performed.
      Parameters:
      n - shift distance, in bits.
      Returns:
      this >> n
      Since:
      19.0
    • and

      SignedWord and(int val)
      Returns a Signed whose value is (this & val). (This method returns a negative Signed if and only if this and val are both negative.)
      Parameters:
      val - value to be AND'ed with this Signed.
      Returns:
      this & val
      Since:
      19.0
    • or

      SignedWord or(int val)
      Returns a Signed whose value is (this | val). (This method returns a negative Signed if and only if either this or val is negative.)
      Parameters:
      val - value to be OR'ed with this Signed.
      Returns:
      this | val
      Since:
      19.0
    • xor

      SignedWord xor(int val)
      Returns a Signed whose value is (this ^ val). (This method returns a negative Signed if and only if exactly one of this and val are negative.)
      Parameters:
      val - value to be XOR'ed with this Signed.
      Returns:
      this ^ val
      Since:
      19.0
    • equal

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

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

      boolean lessThan(int val)
      Compares this Signed with the specified value.
      Parameters:
      val - value to which this Signed is to be compared.
      Returns:
      this < val
      Since:
      19.0
    • lessOrEqual

      boolean lessOrEqual(int val)
      Compares this Signed with the specified value.
      Parameters:
      val - value to which this Signed is to be compared.
      Returns:
      this <= val
      Since:
      19.0
    • greaterThan

      boolean greaterThan(int val)
      Compares this Signed with the specified value.
      Parameters:
      val - value to which this Signed is to be compared.
      Returns:
      this > val
      Since:
      19.0
    • greaterOrEqual

      boolean greaterOrEqual(int val)
      Compares this Signed with the specified value.
      Parameters:
      val - value to which this Signed is to be compared.
      Returns:
      this >= val
      Since:
      19.0