Class IntFormat


  • public final class IntFormat
    extends java.lang.Object
    IntFormat represents an integer number format.
    • Constructor Summary

      Constructors 
      Constructor Description
      IntFormat​(int length)
      Constructs an integer number format.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      int getLength()
      Returns the bit length of a number.
      long getMask()
      Returns the bit mask of a number.
      long getMaxValue()
      Returns the maximal value (signed).
      long getMinValue()
      Returns the minimal value (signed).
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • INT1

        public static final IntFormat INT1
        1-bit integer numbers.
      • INT8

        public static final IntFormat INT8
        8-bit integer numbers.
      • INT16

        public static final IntFormat INT16
        16-bit integer numbers.
      • INT32

        public static final IntFormat INT32
        32-bit integer numbers.
      • INT64

        public static final IntFormat INT64
        64-bit integer numbers.
    • Constructor Detail

      • IntFormat

        public IntFormat​(int length)
        Constructs an integer number format.
        Parameters:
        length - the length (in bits).
    • Method Detail

      • getLength

        public int getLength()
        Returns the bit length of a number.
        Returns:
        the length.
      • getMask

        public long getMask()
        Returns the bit mask of a number.
        Returns:
        the mask.
      • getMinValue

        public long getMinValue()
        Returns the minimal value (signed).
        Returns:
        the minimal value.
      • getMaxValue

        public long getMaxValue()
        Returns the maximal value (signed).
        Returns:
        the maximal value.
      • 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
      • toString

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