@Immutable public final class SpanId extends Object implements Comparable<SpanId>
| Modifier and Type | Field and Description |
|---|---|
static SpanId |
INVALID
The invalid
SpanId. |
static int |
SIZE
The size in bytes of the
SpanId. |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(SpanId that) |
void |
copyBytesTo(byte[] dest,
int destOffset)
Copies the byte array representations of the
SpanId into the dest beginning at
the destOffset offset. |
void |
copyLowerBase16To(char[] dest,
int destOffset)
Copies the lowercase base16 representations of the
SpanId into the dest
beginning at the destOffset offset. |
boolean |
equals(Object obj) |
static SpanId |
fromBytes(byte[] src,
int srcOffset)
Returns a
SpanId whose representation is copied from the src beginning at the
srcOffset offset. |
static SpanId |
fromLowerBase16(CharSequence src,
int srcOffset)
Returns a
SpanId built from a lowercase base16 representation. |
int |
hashCode() |
boolean |
isValid()
Returns whether the span identifier is valid.
|
String |
toLowerBase16()
Returns the lowercase base16 encoding of this
SpanId. |
String |
toString() |
public static final int SIZE
SpanId.public static final SpanId INVALID
SpanId. All bytes are 0.public static SpanId fromBytes(byte[] src, int srcOffset)
SpanId whose representation is copied from the src beginning at the
srcOffset offset.src - the buffer where the representation of the SpanId is copied.srcOffset - the offset in the buffer where the representation of the SpanId
begins.SpanId whose representation is copied from the buffer.NullPointerException - if src is null.IndexOutOfBoundsException - if srcOffset+SpanId.SIZE is greater than src.length.public void copyBytesTo(byte[] dest,
int destOffset)
SpanId into the dest beginning at
the destOffset offset.dest - the destination buffer.destOffset - the starting offset in the destination buffer.NullPointerException - if dest is null.IndexOutOfBoundsException - if destOffset+SpanId.SIZE is greater than dest.length.public static SpanId fromLowerBase16(CharSequence src, int srcOffset)
SpanId built from a lowercase base16 representation.src - the lowercase base16 representation.srcOffset - the offset in the buffer where the representation of the SpanId
begins.SpanId built from a lowercase base16 representation.NullPointerException - if src is null.IllegalArgumentException - if not enough characters in the src from the srcOffset.public void copyLowerBase16To(char[] dest,
int destOffset)
SpanId into the dest
beginning at the destOffset offset.dest - the destination buffer.destOffset - the starting offset in the destination buffer.IndexOutOfBoundsException - if destOffset + 2 * SpanId.SIZE is greater than
dest.length.public boolean isValid()
true if the span identifier is valid.public String toLowerBase16()
SpanId.SpanId.public int compareTo(SpanId that)
compareTo in interface Comparable<SpanId>