The largest power of two that can be represented as an unsigned
Byte
.
The largest power of two that can be represented as an unsigned
Byte
.
The largest value that fits into an unsigned Byte.
Ordering that compares the two specified UByte
values.
Ordering that compares the two specified UByte
values.
Returns the UByte
value that, when treated as unsigned, is equal to
value
, if possible.
Returns the UByte
value that, when treated as unsigned, is equal to
value
, if possible.
Equivalent to valueOf(value)
a value between 0 and 255 inclusive
the UByte
value that, when treated as unsigned, equals
value
IllegalArgumentException
if value
is negative or greater
than 255
Compares the two specified UByte
values, treating them as unsigned
values between 0 and 255 inclusive.
Compares the two specified UByte
values, treating them as unsigned
values between 0 and 255 inclusive. For example, (Byte) -127
is
considered greater than (Byte) 127
because it is seen as having
the value of positive 129
.
the first UByte
to compare
the second UByte
to compare
a negative value if a
is less than b
; a positive
value if a
is greater than b
; or zero if they are equal
Returns an UByte
corresponding to a given bit representation.
Returns an UByte
corresponding to a given bit representation.
The argument is interpreted as an unsigned byte value. Specifically, the sign bit
of bits
is interpreted as a normal bit, and all other bits are treated as usual.
If the argument is nonnegative, the returned result will be equal to bits
,
otherwise, the result will be equal to bits + 256
.
Returns a string containing the supplied UByte
values separated by
separator
.
Returns a string containing the supplied UByte
values separated by
separator
. For example, join(":", (Byte) 1, (Byte) 2,
(Byte) 255)
returns the string "1:2:255"
.
the text that should appear between consecutive values in the resulting string (but not at the start or end)
an array of UByte
values, possibly empty
Returns a comparator that compares two UByte
arrays
lexicographically.
Returns a comparator that compares two UByte
arrays
lexicographically. That is, it compares, using
#compare(Byte, Byte)
), the first pair of values that follow any common
prefix, or when one array is a prefix of the other, treats the shorter
array as the lesser. For example, [] < [0x01] < [0x01, 0x7F] <
[0x01, 0x80] < [0x02]
. Values are treated as unsigned.
The returned comparator is inconsistent with
Object#equals(Object)
(since arrays support only identity equality), but
it is consistent with java.util.Arrays#equals(Byte[], Byte[])
.
Returns the greatest value present in array
.
Returns the greatest value present in array
.
a nonempty array of UByte
values
the value present in array
that is greater than or equal
to every other value in the array
IllegalArgumentException
if array
is empty
Returns the least value present in array
.
Returns the least value present in array
.
a nonempty array of UByte
values
the value present in array
that is less than or equal to
every other value in the array
IllegalArgumentException
if array
is empty
Returns the UByte
value that, when treated as unsigned, is nearest
in value to value
.
Returns the UByte
value that, when treated as unsigned, is nearest
in value to value
.
any long
value
(Byte) 255
if value >= 255
, (Byte) 0
if
value <= 0
, and value
cast to UByte
otherwise
Returns the unsigned UByte
value represented by a string with the given radix.
Returns the unsigned UByte
value represented by a string with the given radix.
the string containing the unsigned UByte
representation to be parsed.
the radix to use while parsing string
NullPointerException
if s
is null
(in contrast to Byte#parseByte(String)
)
NumberFormatException
if the string does not contain a valid unsigned UByte
with the given radix, or if radix
is not between Character#MIN_RADIX
and Character#MAX_RADIX
.
Returns the unsigned UByte
value represented by the given decimal string.
Returns the unsigned UByte
value represented by the given decimal string.
NullPointerException
if s
is null
(in contrast to Byte#parseByte(String)
)
NumberFormatException
if the string does not contain a valid unsigned UByte
value
Returns the UByte
value that, when treated as unsigned, is equal to
value
, if possible.
Returns the UByte
value that, when treated as unsigned, is equal to
value
, if possible.
a value between 0 and 255 inclusive
the UByte
value that, when treated as unsigned, equals
value
IllegalArgumentException
if value
is negative or greater
than 255
Static utility methods pertaining to
byte
primitives that interpret values as unsigned (that is, any negative valueb
is treated as the positive value256 + b
).See the Guava User Guide article on unsigned primitive utilities.
0.10 (copied from Guava-libraries)