public abstract class U32Id extends UnsignedLongBasedId
Modifier and Type | Field and Description |
---|---|
static String |
E_BYTES_BAD_LEN
Error message when byte array is incorrect length.
|
static int |
LENGTH_IN_BYTES
Length of the identifier when encoded as a byte array.
|
static long |
MAX_VALUE
Highest valid value.
|
id
E_BAD, E_NULL_BYTES, E_NULL_STR, E_OOR, MIN_VALUE
Modifier | Constructor and Description |
---|---|
protected |
U32Id(long id)
Constructs the id.
|
Modifier and Type | Method and Description |
---|---|
protected static void |
rangeCheck(long value)
Ensures that the given value is within range.
|
byte[] |
toByteArray()
Returns this id as a 4-byte array.
|
equals, hashCode, toLong, toString
parseIntStr, parseLongStr
getRefQ, keyFromBytes
public static final long MAX_VALUE
public static final int LENGTH_IN_BYTES
public static final String E_BYTES_BAD_LEN
public byte[] toByteArray()
protected static void rangeCheck(long value)
value
- the value to checkIllegalArgumentException
- if the value is out of rangeCopyright © 2015. All Rights Reserved.