public class UInt16 extends java.lang.Number implements java.lang.Comparable<UInt16>
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_VALUE
Maximum possible value.
|
static int |
MIN_VALUE
Minimum possible value.
|
| Constructor and Description |
|---|
UInt16(int value)
Create a UInt16 from an int.
|
UInt16(java.lang.String value)
Create a UInt16 from a String.
|
| Modifier and Type | Method and Description |
|---|---|
byte |
byteValue()
The value of this as a byte.
|
int |
compareTo(UInt16 other)
Compare two UInt16s.
|
double |
doubleValue()
The value of this as a double.
|
boolean |
equals(java.lang.Object o)
Test two UInt16s for equality.
|
float |
floatValue()
The value of this as a float.
|
int |
hashCode() |
int |
intValue()
The value of this as a int.
|
long |
longValue()
The value of this as a long.
|
short |
shortValue()
The value of this as a short.
|
java.lang.String |
toString()
The value of this as a string.
|
public static final int MAX_VALUE
public static final int MIN_VALUE
public UInt16(int value)
value - Must be within MIN_VALUE–MAX_VALUEjava.lang.NumberFormatException - if value is not between MIN_VALUE and MAX_VALUEpublic UInt16(java.lang.String value)
value - Must parse to a valid integer within MIN_VALUE–MAX_VALUEjava.lang.NumberFormatException - if value is not an integer between MIN_VALUE and MAX_VALUEpublic byte byteValue()
byteValue in class java.lang.Numberpublic double doubleValue()
doubleValue in class java.lang.Numberpublic float floatValue()
floatValue in class java.lang.Numberpublic int intValue()
intValue in class java.lang.Numberpublic long longValue()
longValue in class java.lang.Numberpublic short shortValue()
shortValue in class java.lang.Numberpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic int compareTo(UInt16 other)
compareTo in interface java.lang.Comparable<UInt16>public java.lang.String toString()
toString in class java.lang.Object