Byte (Java SE 26 & JDK 26)
- All Implemented Interfaces:
Serializable, Comparable<Byte>, Constable
-
Field Summary
Fields
static final intThe number of bytes used to represent a
bytevalue in two's complement binary form.static final byteA constant holding the maximum value a
bytecan have, 27-1.static final byteA constant holding the minimum value a
bytecan have, -27.static final intThe number of bits used to represent a
bytevalue in two's complement binary form.The
Classinstance representing the primitive typebyte. -
Constructor Summary
Constructors
-
Method Summary
byteReturns the value of this
Byteas abyte.static intcompare(byte x, byte y) Compares two
bytevalues numerically.intCompares two
Byteobjects numerically.static intcompareUnsigned(byte x, byte y) Compares two
bytevalues numerically treating the values as unsigned.Decodes a
Stringinto aByte.Returns an
Optionalcontaining the nominal descriptor for this instance.doubleReturns the value of this
Byteas adoubleafter a widening primitive conversion.booleanCompares this object to the specified object.
floatReturns the value of this
Byteas afloatafter a widening primitive conversion.inthashCode()Returns a hash code for this
Byte; equal to the result of invokingintValue().static inthashCode(byte value) Returns a hash code for a
bytevalue; compatible withByte.hashCode().intintValue()Returns the value of this
Byteas anintafter a widening primitive conversion.longReturns the value of this
Byteas alongafter a widening primitive conversion.static byteParses the string argument as a signed decimal
byte.static byteParses the string argument as a signed
bytein the radix specified by the second argument.shortReturns the value of this
Byteas ashortafter a widening primitive conversion.toString()Returns a
Stringobject representing thisByte's value.toString(byte b) Returns a new
Stringobject representing the specifiedbyte.static inttoUnsignedInt(byte x) Converts the argument to an
intby an unsigned conversion.static longtoUnsignedLong(byte x) Converts the argument to a
longby an unsigned conversion.valueOf(byte b) Returns a
Byteinstance representing the specifiedbytevalue.Returns a
Byteobject holding the value given by the specifiedString.Returns a
Byteobject holding the value extracted from the specifiedStringwhen parsed with the radix given by the second argument.Methods declared in class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitCreates and returns a copy of this object.
protected voidDeprecated, for removal: This API element is subject to removal in a future version.
Returns the runtime class of this
Object.final voidWakes up a single thread that is waiting on this object's monitor.
final voidWakes up all threads that are waiting on this object's monitor.
final voidCauses the current thread to wait until it is awakened, typically by being notified or interrupted.
final voidwait(long timeoutMillis) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
final voidwait(long timeoutMillis, int nanos) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
-
Field Details
-
MIN_VALUE
-
MAX_VALUE
-
TYPE
-
SIZE
-
BYTES
-
-
Constructor Details
-
Byte
-
Byte
-
-
Method Details
-
toString
-
describeConstable
-
valueOf
-
parseByte
-
parseByte
-
valueOf
-
valueOf
-
decode
-
byteValue
-
shortValue
-
intValue
-
longValue
-
floatValue
-
doubleValue
-
toString
-
hashCode
-
hashCode
-
equals
-
compareTo
-
compare
-
compareUnsigned
-
toUnsignedInt
-
toUnsignedLong
-