Class IntFormat
- java.lang.Object
-
- ru.ispras.testbase.knowledge.integer.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()
-
-
-
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.
-
-
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 classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-