Class IntNumber


  • public final class IntNumber
    extends java.lang.Object
    IntNumber implements an integer number of a given length (less than or equal to 64).
    • Constructor Summary

      Constructors 
      Constructor Description
      IntNumber​(IntFormat format, long value)
      Constructs an integer number.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      IntNumber clone()  
      boolean equals​(java.lang.Object obj)  
      IntFormat getFormat()
      Returns the format of the number.
      long getValue​(boolean signExtend)
      Returns the value.
      int hashCode()  
      boolean isNegative()
      Checks whether the number is negative.
      boolean isPositive()
      Checks whether the number is positive.
      boolean isZero()
      Checks whether the number is zero.
      void setValue​(long value)
      Sets the number.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • IntNumber

        public IntNumber​(IntFormat format,
                         long value)
        Constructs an integer number.
        Parameters:
        format - the format.
        value - the number.
    • Method Detail

      • getFormat

        public IntFormat getFormat()
        Returns the format of the number.
        Returns:
        the number format.
      • getValue

        public long getValue​(boolean signExtend)
        Returns the value.
        Parameters:
        signExtend - the sign-extension flag.
        Returns:
        the value.
      • setValue

        public void setValue​(long value)
        Sets the number.
        Parameters:
        value - the number to be set.
      • isZero

        public boolean isZero()
        Checks whether the number is zero.
        Returns:
        true if the number is zero; false otherwise.
      • isPositive

        public boolean isPositive()
        Checks whether the number is positive.
        Returns:
        true if the number is positive; false otherwise.
      • isNegative

        public boolean isNegative()
        Checks whether the number is negative.
        Returns:
        true if the number is negative; false otherwise.
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • clone

        public IntNumber clone()
        Overrides:
        clone in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object