public abstract class Primitive extends JsonWrapper
| Modifier and Type | Field and Description |
|---|---|
static String |
EMPTY_MESSAGE
The String representation of an empty primitive in JSON.
|
EMPTY_JSON| Constructor and Description |
|---|
Primitive(javax.json.JsonObject jsonObject,
String primitiveType)
Create a Primitive based on the given JSON object.
|
Primitive(String jsonString,
String primitiveType)
Create a Primitive based on the given String representation of a JSON
object.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
fromUInt16(short value)
Convert the given value in unsigned 16-bit representation into its actual
value.
|
static int[] |
fromUInt16(short[] values)
Convert the given values in unsigned 16-bit representation into their
actual values.
|
static long |
fromUInt32(int value)
Convert the given value in unsigned 32-bit representation into its actual
value.
|
static long[] |
fromUInt32(int[] values)
Convert the given values in unsigned 32-bit representation into their
actual values.
|
static BigInteger |
fromUInt64(long value)
Convert the given value in unsigned 64-bit representation into its actual
value.
|
static BigInteger[] |
fromUInt64(long[] values)
Convert the given values in unsigned 64-bit representation into their
actual values.
|
static short |
fromUInt8(byte value)
Convert the given value in unsigned 8-bit representation into its actual
value.
|
static short[] |
fromUInt8(byte[] values)
Convert the given values in unsigned 8-bit representation into their
actual values.
|
String |
getPrimitiveType()
Get the type of the primitive.
|
void |
setPrimitiveType(String primitiveType)
Set the type of the primitive.
|
static short |
toUInt16(int value)
Convert the given value to an unsigned 16-bit unsigned integer.
|
static short[] |
toUInt16(int[] values)
Convert the given values to unsigned 16-bit unsigned integers.
|
static int |
toUInt32(long value)
Convert the given value to an unsigned 32-bit unsigned integer.
|
static int[] |
toUInt32(long[] values)
Convert the given values to unsigned 32-bit unsigned integers.
|
static long |
toUInt64(BigInteger value)
Convert the given value to an unsigned 64-bit unsigned integer.
|
static long[] |
toUInt64(BigInteger[] values)
Convert the given values to unsigned 64-bit unsigned integers.
|
static byte |
toUInt8(short value)
Convert the given value to an unsigned 8-bit unsigned integer.
|
static byte[] |
toUInt8(short[] values)
Convert the given values to unsigned 8-bit unsigned integers.
|
clone, equals, hashCode, toJsonObject, toStringpublic static final String EMPTY_MESSAGE
public Primitive(String jsonString, String primitiveType)
jsonString - The JSON String to parse.primitiveType - The type of the primitive (e.g., "geometry_msgs/Twist").public Primitive(javax.json.JsonObject jsonObject,
String primitiveType)
jsonObject - The JSON object containing the primitive data.primitiveType - The type of the primitive (e.g., "time").public String getPrimitiveType()
public void setPrimitiveType(String primitiveType)
primitiveType - The type of the primitive (e.g., "time").public static byte toUInt8(short value)
value - The value to convert.public static byte[] toUInt8(short[] values)
values - The values to convert.public static short fromUInt8(byte value)
value - The unsigned 8-bit value to convert.public static short[] fromUInt8(byte[] values)
values - The unsigned 8-bit values to convert.public static short toUInt16(int value)
value - The value to convert.public static short[] toUInt16(int[] values)
values - The values to convert.public static int fromUInt16(short value)
value - The unsigned 16-bit value to convert.public static int[] fromUInt16(short[] values)
values - The unsigned 16-bit values to convert.public static int toUInt32(long value)
value - The value to convert.public static int[] toUInt32(long[] values)
values - The values to convert.public static long fromUInt32(int value)
value - The unsigned 32-bit value to convert.public static long[] fromUInt32(int[] values)
values - The unsigned 32-bit values to convert.public static long toUInt64(BigInteger value)
value - The value to convert.public static long[] toUInt64(BigInteger[] values)
values - The values to convert.public static BigInteger fromUInt64(long value)
value - The unsigned 64-bit value to convert.public static BigInteger[] fromUInt64(long[] values)
values - The unsigned 64-bit values to convert.Copyright © 2014. All rights reserved.