public final class DDSpanId extends Object
| Modifier and Type | Field and Description |
|---|---|
static long |
MAX |
static long |
ZERO
The ZERO span id is not allowed and means no span.
|
| Modifier and Type | Method and Description |
|---|---|
static long |
from(String s)
Parse the span id from the given
String representation of the unsigned 64 bit id. |
static long |
fromHex(String s)
Parse the span id from the given
String hex representation of the unsigned 64 bit id. |
static long |
fromHex(String s,
int start,
int len,
boolean lowerCaseOnly)
Parse the span id from the given
String hex representation of the unsigned 64 bit id. |
static String |
toHexString(long id)
Returns the no zero padded hex representation, in lower case, of the unsigned 64 bit id.
|
static String |
toHexStringPadded(long id)
Returns the zero padded hex representation, in lower case, of the unsigned 64 bit id.
|
static String |
toString(long id)
Returns the decimal string representation of the unsigned 64 bit id.
|
public static final long ZERO
public static final long MAX
public static long from(String s) throws NumberFormatException
String representation of the unsigned 64 bit id.s - String of unsigned 64 bit idNumberFormatExceptionpublic static long fromHex(String s) throws NumberFormatException
String hex representation of the unsigned 64 bit id.s - String in hex of unsigned 64 bit idNumberFormatExceptionpublic static long fromHex(String s, int start, int len, boolean lowerCaseOnly) throws NumberFormatException
String hex representation of the unsigned 64 bit id.s - String in hex of unsigned 64 bit idstart - the start index of the hex valuelen - the len of the hex valuelowerCaseOnly - if the allowed hex characters are lower case onlyNumberFormatExceptionpublic static String toString(long id)
String will
NOT be cached.id - the long 64 bit id to generate a String forpublic static String toHexString(long id)
String will NOT be cached.public static String toHexStringPadded(long id)
String will NOT be cached.