Package io.opentelemetry.api.common
Class ValueBytes
- java.lang.Object
-
- io.opentelemetry.api.common.ValueBytes
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]raw
-
Constructor Summary
Constructors Modifier Constructor Description privateValueBytes(byte[] value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringasString()Return a string encoding of thisValue.(package private) static Value<java.nio.ByteBuffer>create(byte[] value)booleanequals(java.lang.Object o)ValueTypegetType()Returns the type of thisValue.java.nio.ByteBuffergetValue()Returns the value for thisValue.inthashCode()java.lang.StringtoString()
-
-
-
Method Detail
-
create
static Value<java.nio.ByteBuffer> create(byte[] value)
-
getType
public ValueType getType()
Description copied from interface:ValueReturns the type of thisValue. Useful for building switch statements.
-
getValue
public java.nio.ByteBuffer getValue()
Description copied from interface:ValueReturns the value for thisValue.The return type varies by
Value.getType()as described below:ValueType.STRINGreturnsStringValueType.BOOLEANreturnsbooleanValueType.LONGreturnslongValueType.DOUBLEreturnsdoubleValueType.ARRAYreturnsListofValueValueType.KEY_VALUE_LISTreturnsListofKeyValueValueType.BYTESreturns read onlyByteBuffer. SeeByteBuffer.asReadOnlyBuffer().
-
asString
public java.lang.String asString()
Description copied from interface:ValueReturn a string encoding of thisValue. This is intended to be a fallback serialized representation in case there is no suitable encoding that can utilizeValue.getType()/Value.getValue()to serialize specific types.WARNING: No guarantees are made about the encoding of this string response. It MAY change in a future minor release. If you need a reliable string encoding, write your own serializer.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-