-
public final class DDSpanIdClass with methods for working with the unsigned 64 bit id used for Span ids.
-
-
Method Summary
Modifier and Type Method Description static longfrom(String s)Parse the span id from the given {@code String}representation of the unsigned 64 bit id.static longfromHex(String s)Parse the span id from the given {@code String}hex representation of the unsigned 64 bit id.static longfromHex(String s, int start, int len, boolean lowerCaseOnly)Parse the span id from the given {@code String}hex representation of the unsigned 64 bit id.static StringtoString(long id)Returns the decimal string representation of the unsigned 64 bit id. static StringtoHexString(long id)Returns the no zero padded hex representation, in lower case, of the unsigned 64 bit id. static StringtoHexStringPadded(long id)Returns the zero padded hex representation, in lower case, of the unsigned 64 bit id. -
-
Method Detail
-
from
static long from(String s)
Parse the span id from the given
{@code String}representation of the unsigned 64 bit id.- Parameters:
s- String of unsigned 64 bit id
-
fromHex
static long fromHex(String s)
Parse the span id from the given
{@code String}hex representation of the unsigned 64 bit id.- Parameters:
s- String in hex of unsigned 64 bit id
-
fromHex
static long fromHex(String s, int start, int len, boolean lowerCaseOnly)
Parse the span id from the given
{@code String}hex representation of the unsigned 64 bit id.- Parameters:
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 only
-
toString
static String toString(long id)
Returns the decimal string representation of the unsigned 64 bit id. The
{@code String}willNOT be cached.- Parameters:
id- the long 64 bit id to generate a String for
-
toHexString
static String toHexString(long id)
Returns the no zero padded hex representation, in lower case, of the unsigned 64 bit id. Thehex
{@code String}will NOT be cached.
-
toHexStringPadded
static String toHexStringPadded(long id)
Returns the zero padded hex representation, in lower case, of the unsigned 64 bit id. The sizewill be rounded up to 16 characters. The hex
{@code String}will NOT be cached.
-
-
-
-