public final class Byte extends Number implements Comparable<Byte>
| Modifier and Type | Field and Description |
|---|---|
static byte |
MAX_VALUE
The maximum value a Byte can have.
|
static byte |
MIN_VALUE
The minimum value a Byte can have.
|
static int |
SIZE |
static Class<Byte> |
TYPE |
| Constructor and Description |
|---|
Byte(byte value)
Constructs a Byte object initialized to the specified byte value.
|
| Modifier and Type | Method and Description |
|---|---|
byte |
byteValue()
Returns the value of this Byte as a byte.
|
int |
compare(byte b1,
byte b2) |
int |
compareTo(Byte b)
Compares this object to the specified object to determine their relative
order.
|
double |
doubleValue() |
boolean |
equals(Object obj)
Compares this object to the specified object.
|
float |
floatValue() |
int |
hashCode()
Returns a hashcode for this Byte.
|
int |
intValue() |
long |
longValue() |
static byte |
parseByte(String s)
Assuming the specified String represents a byte, returns that byte's value.
|
static byte |
parseByte(String s,
int radix)
Assuming the specified String represents a byte, returns that byte's value.
|
String |
toString()
Returns a String object representing this Byte's value.
|
static Byte |
valueOf(byte i)
Returns the object instance of i
|
shortValuepublic static final int SIZE
public static final byte MAX_VALUE
public static final byte MIN_VALUE
public Byte(byte value)
public byte byteValue()
public boolean equals(Object obj)
public int hashCode()
public static byte parseByte(String s) throws NumberFormatException
NumberFormatExceptionpublic static byte parseByte(String s, int radix) throws NumberFormatException
NumberFormatExceptionpublic String toString()
public static Byte valueOf(byte i)
i - the primitivepublic float floatValue()
floatValue in class Numberpublic double doubleValue()
doubleValue in class Numberpublic int compare(byte b1,
byte b2)
public int compareTo(Byte b)
ComparablecompareTo in interface Comparable<Byte>b - the object to compare to this instance.another;
a positive integer if this instance is greater than
another; 0 if this instance has the same order as
another.