Class FloatArray_Type


  • public class FloatArray_Type
    extends CommonArray_Type
    The java Cas model for the CAS FloatArray Type This is not final because the migration from pre v08 has the old xxx_Type as a subclass of this.
    • Field Detail

      • typeIndexID

        public static final int typeIndexID
    • Constructor Detail

      • FloatArray_Type

        public FloatArray_Type​(JCas jcas,
                               Type casType)
    • Method Detail

      • get

        public float get​(int addr,
                         int i)
        Parameters:
        addr - the low level CAS Feature Structure reference
        i - the index
        Returns:
        the indexed value from the corresponding Cas floatArray as a Java float.
        See Also:
        ArrayFS.get(int)
      • set

        public void set​(int addr,
                        int i,
                        float value)
        updates the Cas, setting the indexed value to the passed in Java float value.
        Parameters:
        addr - the low level CAS Feature Structure reference
        i - the index
        value - the value to set
        See Also:
        ArrayFS.set(int, FeatureStructure)
      • copyFromArray

        public void copyFromArray​(int addr,
                                  float[] src,
                                  int srcOffset,
                                  int destOffset,
                                  int length)
        Parameters:
        addr - the low level CAS Feature Structure reference to copy into
        src - the array to copy from
        srcOffset - the source offset
        destOffset - the destination offset
        length - the number of items to copy
        See Also:
        FloatArrayFS.copyFromArray(float[], int, int, int)
      • copyToArray

        public void copyToArray​(int addr,
                                int srcOffset,
                                float[] dest,
                                int destOffset,
                                int length)
        Parameters:
        addr - the low level CAS Feature Structure reference to copy from
        srcOffset - the source offset
        dest - the target to copy into
        destOffset - the destination offset
        length - the number of items to copy
      • toArray

        public float[] toArray​(int addr)
        Parameters:
        addr - the low level CAS Feature Structure reference to copy from
        Returns:
        a copy of the array
        See Also:
        FloatArrayFS.toArray()