There are two more other representation that this class helps with:
long value, where valid means that the value is non-zero.
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final int | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static String | Returns: the lowercase hex (base16) representation of theSpanId.the bytes (8-byte array) representation of the spanIdBytes)SpanId.Returns the lowercase hex (base16) representation of the |
| public static String | Returns: the lowercase hex (base16) representation of theSpanId.long value representation of the SpanId.Returns the lowercase hex (base16) representation of the |
| public static String | Returns: the invalidSpanId lowercase in hex (base16) representation.Returns the invalid |
| public static int | Returns: the length of the lowercase hex (base16) representation of theSpanId.Returns the length of the lowercase hex (base16) representation of the |
| public static boolean | Returns: true if the span identifier is valid.Returns whether the span identifier is valid. |
| BYTES_LENGTH | back to summary |
|---|---|
| private static final int BYTES_LENGTH | |
| HEX_LENGTH | back to summary |
|---|---|
| private static final int HEX_LENGTH | |
| INVALID | back to summary |
|---|---|
| private static final String INVALID | |
| SpanId | back to summary |
|---|---|
| private SpanId() | |
| fromBytes | back to summary |
|---|---|
| public static String fromBytes(byte[] spanIdBytes) Returns the lowercase hex (base16) representation of the It converts the first 8 bytes of the given byte array.
| |
| fromLong | back to summary |
|---|---|
| public static String fromLong(long id) Returns the lowercase hex (base16) representation of the There is no restriction on the specified values, other than the already established validity
rules applying to This is equivalent to calling
| |
| getInvalid | back to summary |
|---|---|
| public static String getInvalid() Returns the invalid
| |
| getLength | back to summary |
|---|---|
| public static int getLength() Returns the length of the lowercase hex (base16) representation of the
| |
| isValid | back to summary |
|---|---|
| public static boolean isValid(CharSequence spanId) Returns whether the span identifier is valid. A valid span identifier is a 16 character hex String, where at least one of the characters is not a '0'.
| |