Class ArrayValue<T extends Value>

  • Type Parameters:
    T - The type of SGr value to wrap.

    public class ArrayValue<T extends Value>
    extends Value
    Implements an array wrapper around other kinds of SGr value.
    • Constructor Detail

      • ArrayValue

        public ArrayValue​(T[] values)
        Constructs a new instance.
        Parameters:
        values - the SGr values
    • Method Detail

      • getInt8

        public byte getInt8()
        Description copied from class: Value
        Gets the value as 8-bit integer.
        Specified by:
        getInt8 in class Value
        Returns:
        a byte
      • getInt8U

        public short getInt8U()
        Description copied from class: Value
        Gets the value as unsigned 8-bit integer.
        Specified by:
        getInt8U in class Value
        Returns:
        a short
      • getInt16

        public short getInt16()
        Description copied from class: Value
        Gets the value as 16-bit integer.
        Specified by:
        getInt16 in class Value
        Returns:
        a short
      • getInt16U

        public int getInt16U()
        Description copied from class: Value
        Gets the value as unsigned 16-bit integer.
        Specified by:
        getInt16U in class Value
        Returns:
        an int
      • getInt32

        public int getInt32()
        Description copied from class: Value
        Gets the value as 32-bit integer.
        Specified by:
        getInt32 in class Value
        Returns:
        an int
      • getInt32U

        public long getInt32U()
        Description copied from class: Value
        Gets the value as unsigned 32-bit integer.
        Specified by:
        getInt32U in class Value
        Returns:
        a long
      • getInt64

        public long getInt64()
        Description copied from class: Value
        Gets the value as 64-bit integer.
        Specified by:
        getInt64 in class Value
        Returns:
        a long
      • getInt64U

        public java.math.BigInteger getInt64U()
        Description copied from class: Value
        Gets the value as unsigned 64-bit integer.
        Specified by:
        getInt64U in class Value
        Returns:
        a BigInteger
      • getFloat32

        public float getFloat32()
        Description copied from class: Value
        Gets the value as 32-bit floating-point.
        Specified by:
        getFloat32 in class Value
        Returns:
        a float
      • getFloat64

        public double getFloat64()
        Description copied from class: Value
        Gets the value as 64-bit floating-point.
        Specified by:
        getFloat64 in class Value
        Returns:
        a double
      • getString

        public java.lang.String getString()
        Description copied from class: Value
        Gets the value as string.
        Specified by:
        getString in class Value
        Returns:
        a string
      • getBoolean

        public boolean getBoolean()
        Description copied from class: Value
        Gets the value as boolean.
        Specified by:
        getBoolean in class Value
        Returns:
        a boolean
      • getEnum

        public EnumRecord getEnum()
        Description copied from class: Value
        Gets the value as SGr enumeration record.
        Specified by:
        getEnum in class Value
        Returns:
        an EnumRecord
      • getBitmap

        public java.util.Map<java.lang.String,​java.lang.Boolean> getBitmap()
        Description copied from class: Value
        Gets the value as SGr bitmap.
        Specified by:
        getBitmap in class Value
        Returns:
        a map of strings to boolean values
      • getDateTime

        public java.time.Instant getDateTime()
        Description copied from class: Value
        Gets the value as time stamp.
        Specified by:
        getDateTime in class Value
        Returns:
        an Instant
      • getJson

        public com.fasterxml.jackson.databind.JsonNode getJson()
        Description copied from class: Value
        Gets the value as JSON.
        Specified by:
        getJson in class Value
        Returns:
        a JsonNode
      • absValue

        public void absValue()
        Description copied from class: Value
        Sets the instance's value to its absolute value, if possible.
        Specified by:
        absValue in class Value
      • roundToInt

        public void roundToInt()
        Description copied from class: Value
        Rounds the instance's value to the nearest integer, if possible.
        Specified by:
        roundToInt in class Value
      • asArray

        public T[] asArray()
        Description copied from class: Value
        Gets the value as array.
        Specified by:
        asArray in class Value
        Returns:
        an array of Value
      • of

        public static ArrayValue<Value> of​(Value... values)
        Creates a new instance.
        Parameters:
        values - the values to wrap
        Returns:
        an instance of ArrayValue