public final class UnsignedByte extends Number implements Comparable<UnsignedByte>, BitField
Byte).| Modifier and Type | Field and Description |
|---|---|
static UnsignedByte[] |
EMPTY_ARRAY |
static NodeId |
ID
Deprecated.
use
Identifiers.Byte instead. |
static long |
L_MAX_VALUE |
static long |
L_MIN_VALUE |
static UnsignedByte |
MAX_VALUE |
static UnsignedByte |
MIN_VALUE |
static UnsignedByte |
ONE |
static UnsignedByte |
ZERO |
| Constructor and Description |
|---|
UnsignedByte()
Deprecated.
use
ZERO |
UnsignedByte(byte value)
Deprecated.
use
valueOf(int) |
UnsignedByte(int value)
Deprecated.
use
valueOf(int) instead. |
UnsignedByte(long value)
Deprecated.
use
valueOf(long) instead. |
UnsignedByte(String valueString)
Deprecated.
use
valueOf(String) instead. |
| Modifier and Type | Method and Description |
|---|---|
UnsignedByte |
add(int increment)
Add a value.
|
UnsignedByte |
add(UnsignedByte increment)
Add a value.
|
static UnsignedByte[] |
arrayOf()
Returns an empty UnsignedByte array.
|
static UnsignedByte[] |
arrayOf(long... elements)
Returns an UnsignedByte array with the given elements.
|
static UnsignedByte[] |
arrayOf(String... elements)
Returns an UnsignedByte array with the given elements.
|
byte |
byteValue() |
int |
compareTo(UnsignedByte other)
compareTo.
|
UnsignedByte |
dec()
Decrease the value by one.
|
UnsignedByte |
decOrWrap()
|
UnsignedByte |
decOrWrapTo(UnsignedByte target)
If equals
MIN_VALUE, returns the given target, otherwise return value - 1. |
double |
doubleValue() |
boolean |
equals(Object obj) |
float |
floatValue() |
static UnsignedByte |
getFromBits(byte value)
getFromBits.
|
int |
getValue()
Getter for the field
value. |
int |
hashCode() |
UnsignedByte |
inc()
Increase the value by one.
|
UnsignedByte |
incOrWrap()
|
UnsignedByte |
incOrWrapTo(UnsignedByte target)
If equals
MAX_VALUE, returns the given target, otherwise return value + 1. |
int |
intValue() |
boolean |
isBitSet(int position)
Is bit set in position.
|
long |
longValue() |
static UnsignedByte |
max(UnsignedByte v0,
UnsignedByte v1)
max.
|
static UnsignedByte |
min(UnsignedByte v0,
UnsignedByte v1)
min.
|
static UnsignedByte |
parseUnsignedByte(String str)
Parse an UnsignedByte value from a string.
|
static UnsignedByte |
parseUnsignedByte(String str,
int radix)
Parses the string argument as an unsigned byte similar to
Integer.parseInt(String, int). |
UnsignedByte |
subtract(int decrement)
Subtract a value from this value.
|
UnsignedByte |
subtract(UnsignedByte decrement)
Subtract a value from this value.
|
byte |
toByteBits()
toByteBits.
|
String |
toString() |
static UnsignedByte |
valueOf(int value)
valueOf.
|
static UnsignedByte |
valueOf(long value) |
static UnsignedByte |
valueOf(String str)
Parses
UnsignedByte from String. |
static UnsignedByte |
valueOf(String str,
int radix)
Parses
UnsignedByte from String. |
shortValue@Deprecated public static final NodeId ID
Identifiers.Byte instead.public static final long L_MAX_VALUE
public static final long L_MIN_VALUE
public static final UnsignedByte MAX_VALUE
public static final UnsignedByte MIN_VALUE
public static final UnsignedByte ZERO
public static final UnsignedByte ONE
public static final UnsignedByte[] EMPTY_ARRAY
@Deprecated public UnsignedByte()
ZEROConstructor for UnsignedByte.
@Deprecated public UnsignedByte(byte value) throws IllegalArgumentException
valueOf(int)Constructor for UnsignedByte.
value - a byte.IllegalArgumentException - if any.@Deprecated public UnsignedByte(int value) throws IllegalArgumentException
valueOf(int) instead.Constructor for UnsignedByte.
value - a int.IllegalArgumentException - if any.@Deprecated public UnsignedByte(long value) throws IllegalArgumentException
valueOf(long) instead.Constructor for UnsignedByte.
value - a long.IllegalArgumentException - if any.@Deprecated public UnsignedByte(String valueString) throws IllegalArgumentException
valueOf(String) instead.Constructor for UnsignedByte.
valueString - a String object.IllegalArgumentException - if any.public static UnsignedByte[] arrayOf()
public static UnsignedByte[] arrayOf(long... elements)
valueOf(long). If given null array for elements returns null.public static UnsignedByte[] arrayOf(String... elements)
valueOf(String). If given null array for elements returns null.public static UnsignedByte getFromBits(byte value)
getFromBits.
value - a byte.UnsignedByte object.public static UnsignedByte max(UnsignedByte v0, UnsignedByte v1)
max.
v0 - a UnsignedByte object.v1 - a UnsignedByte object.UnsignedByte object.public static UnsignedByte min(UnsignedByte v0, UnsignedByte v1)
min.
v0 - a UnsignedByte object.v1 - a UnsignedByte object.UnsignedByte object.public static UnsignedByte parseUnsignedByte(String str)
str - the string to parse, assumed to contain a positive Integer valuepublic static UnsignedByte parseUnsignedByte(String str, int radix)
Integer.parseInt(String, int).str - the string to parse, assumed to contain a positive Integer valueradix - the radix to be used while parsing s.public static UnsignedByte valueOf(int value)
valueOf.
value - a int.UnsignedByte object.public static UnsignedByte valueOf(long value)
public static UnsignedByte valueOf(String str)
UnsignedByte from String. Behaves the same as
parseUnsignedByte(String).public static UnsignedByte valueOf(String str, int radix)
UnsignedByte from String. Behaves the same as
parseUnsignedByte(String, int).public UnsignedByte add(int increment)
increment - the value to add to the current valuepublic UnsignedByte add(UnsignedByte increment)
increment - the value to add to the current valuepublic int compareTo(UnsignedByte other)
compareTo.
compareTo in interface Comparable<UnsignedByte>other - a UnsignedByte object.public UnsignedByte dec()
IllegalArgumentException - if the value was 0 before the callpublic UnsignedByte decOrWrap()
public UnsignedByte decOrWrapTo(UnsignedByte target)
MIN_VALUE, returns the given target, otherwise return value - 1.public double doubleValue()
doubleValue in class Numberpublic float floatValue()
floatValue in class Numberpublic int getValue()
Getter for the field value.
public UnsignedByte inc()
public UnsignedByte incOrWrap()
public UnsignedByte incOrWrapTo(UnsignedByte target)
MAX_VALUE, returns the given target, otherwise return value + 1.public boolean isBitSet(int position)
BitFieldpublic UnsignedByte subtract(int decrement)
decrement - the value to subtract from the current valueIllegalArgumentException - if the decrement is bigger than the current valuepublic UnsignedByte subtract(UnsignedByte decrement)
decrement - the value to subtract from the current valueIllegalArgumentException - if the decrement is bigger than the current valuepublic byte toByteBits()
toByteBits.
Copyright © 2026. All rights reserved.