public final class UByte extends UNumber implements java.lang.Comparable<UByte>
unsigned byte
typeModifier and Type | Field and Description |
---|---|
static short |
MAX_VALUE
A constant holding the maximum value an
unsigned byte can
have, 28-1. |
static short |
MIN_VALUE
A constant holding the minimum value an
unsigned byte can
have, 0. |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(UByte o) |
double |
doubleValue() |
boolean |
equals(java.lang.Object obj) |
float |
floatValue() |
int |
hashCode() |
int |
intValue() |
long |
longValue() |
java.math.BigInteger |
toBigInteger()
Get this number as a
BigInteger . |
java.lang.String |
toString() |
static UByte |
valueOf(byte value)
Get an instance of an
unsigned byte by masking it with
0xFF i.e. |
static UByte |
valueOf(int value)
Get an instance of an
unsigned byte |
static UByte |
valueOf(long value)
Get an instance of an
unsigned byte |
static UByte |
valueOf(short value)
Get an instance of an
unsigned byte |
static UByte |
valueOf(java.lang.String value)
Get an instance of an
unsigned byte |
public static final short MIN_VALUE
unsigned byte
can
have, 0.public static final short MAX_VALUE
unsigned byte
can
have, 28-1.public static UByte valueOf(java.lang.String value) throws java.lang.NumberFormatException
unsigned byte
java.lang.NumberFormatException
- If value
does not contain a
parsable unsigned byte
.public static UByte valueOf(byte value)
unsigned byte
by masking it with
0xFF
i.e. (byte) -1
becomes
(ubyte) 255
public static UByte valueOf(short value) throws java.lang.NumberFormatException
unsigned byte
java.lang.NumberFormatException
- If value
is not in the range
of an unsigned byte
public static UByte valueOf(int value) throws java.lang.NumberFormatException
unsigned byte
java.lang.NumberFormatException
- If value
is not in the range
of an unsigned byte
public static UByte valueOf(long value) throws java.lang.NumberFormatException
unsigned byte
java.lang.NumberFormatException
- If value
is not in the range
of an unsigned byte
public int intValue()
intValue
in class java.lang.Number
public long longValue()
longValue
in class java.lang.Number
public float floatValue()
floatValue
in class java.lang.Number
public double doubleValue()
doubleValue
in class java.lang.Number
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(UByte o)
compareTo
in interface java.lang.Comparable<UByte>
public java.math.BigInteger toBigInteger()
UNumber
BigInteger
. This is a convenience method for
calling new BigInteger(toString())
toBigInteger
in class UNumber
Copyright © 2018. All Rights Reserved.