Package net.aifusion.metamodel
Class UInt8
java.lang.Object
java.lang.Number
net.aifusion.metamodel.UInt8
- All Implemented Interfaces:
Serializable
Class to represent an unsigned 8-bit integer
- Author:
- Sharad Singhal
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
Return the dataValue of this unsigned 8-bit integer as a double dataValueboolean
float
int
hashCode()
int
intValue()
Return the dataValue of this unsigned 8-bit integer as an integer dataValuelong
Return the dataValue of this unsigned 8-bit integer as a long dataValueshort
Return the dataValue of this unsigned 8-bit integer as a short dataValuetoString()
-
Field Details
-
MAX_VALUE
public static final short MAX_VALUEmaximum dataValue possible for the unsigned integer- See Also:
-
MIN_VALUE
public static final short MIN_VALUEminimum dataValue possible for the unsigned integer- See Also:
-
-
Constructor Details
-
UInt8
Create an unsigned 8-bit integer- Parameters:
val
- - string containing an unsigned 8 bit integer 0 <= dataValue < 2^8
-
UInt8
public UInt8(short s) Create an unsigned 8-bit integer from a short dataValue- Parameters:
s
- - short dataValue containing an unsigned 8-bit integer 0 <= dataValue < 2^8
-
-
Method Details
-
shortValue
public short shortValue()Return the dataValue of this unsigned 8-bit integer as a short dataValue- Overrides:
shortValue
in classNumber
- Returns:
- - short containing dataValue
-
intValue
public int intValue()Return the dataValue of this unsigned 8-bit integer as an integer dataValue -
longValue
public long longValue()Return the dataValue of this unsigned 8-bit integer as a long dataValue -
doubleValue
public double doubleValue()Return the dataValue of this unsigned 8-bit integer as a double dataValue- Specified by:
doubleValue
in classNumber
- Returns:
- - double containing dataValue
-
equals
-
toString
-
hashCode
public int hashCode() -
floatValue
public float floatValue()- Specified by:
floatValue
in classNumber
-