Class FSArray_Type


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

      • typeIndexID

        public static final int typeIndexID
    • Constructor Detail

      • FSArray_Type

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

      • get

        public FeatureStructure 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 FSArray as a JCas object.
        See Also:
        ArrayFS.get(int)
      • set

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

        public void copyFromArray​(int addr,
                                  FeatureStructure[] src,
                                  int srcOffset,
                                  int destOffset,
                                  int length)
                           throws java.lang.ArrayIndexOutOfBoundsException
        Parameters:
        addr - the low level CAS Feature Structure reference
        src - the Java array object to copy from
        srcOffset - the source offset
        destOffset - the destination offset
        length - the number of items to copy
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - if index out of bounds
        See Also:
        ArrayFS.copyFromArray(FeatureStructure[], int, int, int)
      • copyToArray

        public void copyToArray​(int addr,
                                int srcOffset,
                                FeatureStructure[] dest,
                                int destOffset,
                                int length)
                         throws java.lang.ArrayIndexOutOfBoundsException
        Parameters:
        addr - the low level CAS Feature Structure reference
        srcOffset - the CAS source offset
        dest - the Java object to copy into
        destOffset - the destination offset
        length - the number of items to copy
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - if index out of bounds
        See Also:
        ArrayFS.copyToArray(int, FeatureStructure[], int, int)
      • toArray

        public FeatureStructure[] toArray​(int addr)
        Parameters:
        addr - the low level CAS Feature Structure reference
        Returns:
        a copy of the CAS array as a Java object
        See Also:
        ArrayFS.toArray()