Package com.yahoo.jrt

Class Value

    • Constructor Detail

      • Value

        public Value()
    • Method Detail

      • type

        public abstract byte type()
        Obtain the type identifier for this value
        Returns:
        type identifier
      • count

        public abstract int count()
        Obtain the number of entries stored in this value. This is 1 for basic data types and the size of the array for array types.
        Returns:
        the number of entries stored in this value
      • asInt8

        public byte asInt8()
        Interpret this value as a Int8Value and return the contents as an appropriate Java type
        Returns:
        the value contained in this object as a Java type
        Throws:
        java.lang.ClassCastException - if this is not a Int8Value
      • asInt8Array

        public byte[] asInt8Array()
        Interpret this value as a Int8Array and return the contents as an appropriate Java type
        Returns:
        the value contained in this object as a Java type
        Throws:
        java.lang.ClassCastException - if this is not a Int8Array
      • asInt16

        public short asInt16()
        Interpret this value as a Int16Value and return the contents as an appropriate Java type
        Returns:
        the value contained in this object as a Java type
        Throws:
        java.lang.ClassCastException - if this is not a Int16Value
      • asInt16Array

        public short[] asInt16Array()
        Interpret this value as a Int16Array and return the contents as an appropriate Java type
        Returns:
        the value contained in this object as a Java type
        Throws:
        java.lang.ClassCastException - if this is not a Int16Array
      • asInt32

        public int asInt32()
        Interpret this value as a Int32Value and return the contents as an appropriate Java type
        Returns:
        the value contained in this object as a Java type
        Throws:
        java.lang.ClassCastException - if this is not a Int32Value
      • asInt32Array

        public int[] asInt32Array()
        Interpret this value as a Int32Array and return the contents as an appropriate Java type
        Returns:
        the value contained in this object as a Java type
        Throws:
        java.lang.ClassCastException - if this is not a Int32Array
      • asInt64

        public long asInt64()
        Interpret this value as a Int64Value and return the contents as an appropriate Java type
        Returns:
        the value contained in this object as a Java type
        Throws:
        java.lang.ClassCastException - if this is not a Int64Value
      • asInt64Array

        public long[] asInt64Array()
        Interpret this value as a Int64Array and return the contents as an appropriate Java type
        Returns:
        the value contained in this object as a Java type
        Throws:
        java.lang.ClassCastException - if this is not a Int64Array
      • asFloat

        public float asFloat()
        Interpret this value as a FloatValue and return the contents as an appropriate Java type
        Returns:
        the value contained in this object as a Java type
        Throws:
        java.lang.ClassCastException - if this is not a FloatValue
      • asFloatArray

        public float[] asFloatArray()
        Interpret this value as a FloatArray and return the contents as an appropriate Java type
        Returns:
        the value contained in this object as a Java type
        Throws:
        java.lang.ClassCastException - if this is not a FloatArray
      • asDouble

        public double asDouble()
        Interpret this value as a DoubleValue and return the contents as an appropriate Java type
        Returns:
        the value contained in this object as a Java type
        Throws:
        java.lang.ClassCastException - if this is not a DoubleValue
      • asDoubleArray

        public double[] asDoubleArray()
        Interpret this value as a DoubleArray and return the contents as an appropriate Java type
        Returns:
        the value contained in this object as a Java type
        Throws:
        java.lang.ClassCastException - if this is not a DoubleArray
      • asString

        public java.lang.String asString()
        Interpret this value as a StringValue and return the contents as an appropriate Java type
        Returns:
        the value contained in this object as a Java type
        Throws:
        java.lang.ClassCastException - if this is not a StringValue
      • asUtf8Array

        public com.yahoo.text.Utf8Array asUtf8Array()
        Interpret this value as a StringValue and return the contents as an appropriate Java type
        Returns:
        the value contained in this object as a Java type
        Throws:
        java.lang.ClassCastException - if this is not a Utf8Array
      • asStringArray

        public java.lang.String[] asStringArray()
        Interpret this value as a StringArray and return the contents as an appropriate Java type
        Returns:
        the value contained in this object as a Java type
        Throws:
        java.lang.ClassCastException - if this is not a StringArray
      • asData

        public byte[] asData()
        Interpret this value as a DataValue and return the contents as an appropriate Java type
        Returns:
        the value contained in this object as a Java type
        Throws:
        java.lang.ClassCastException - if this is not a DataValue
      • asDataArray

        public byte[][] asDataArray()
        Interpret this value as a DataArray and return the contents as an appropriate Java type
        Returns:
        the value contained in this object as a Java type
        Throws:
        java.lang.ClassCastException - if this is not a DataArray
      • toString

        public abstract java.lang.String toString()
        Force a proper toString
        Overrides:
        toString in class java.lang.Object