Interface ArrayFS<E extends FeatureStructure>

    • Method Detail

      • get

        <U extends FeatureStructure> U get​(int i)
                                    throws java.lang.ArrayIndexOutOfBoundsException
        Get the i-th feature structure from the array.
        Type Parameters:
        U - The class of the item being obtained by the get
        Parameters:
        i - index
        Returns:
        The i-th feature structure.
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - If the index is out of bounds.
      • set

        void set​(int i,
                 E fs)
          throws java.lang.ArrayIndexOutOfBoundsException
        Set the i-th value.
        Parameters:
        i - The index.
        fs - The value.
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - If i is out of bounds.
      • copyToArray

        <U extends FeatureStructure> void copyToArray​(int srcOffset,
                                                      U[] dest,
                                                      int destOffset,
                                                      int length)
                                               throws java.lang.ArrayIndexOutOfBoundsException
        Copy the contents of the array from start to end to the destination destArray with destination offset destOffset.
        Type Parameters:
        U - the type of the array element
        Parameters:
        srcOffset - The index of the first element to copy.
        dest - The array to copy to.
        destOffset - Where to start copying into dest.
        length - The number of elements to copy.
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - If srcOffset < 0 or length > size() or destOffset + length > destArray.length.
      • copyFromArray

        <T extends FeatureStructure> void copyFromArray​(T[] src,
                                                        int srcOffset,
                                                        int destOffset,
                                                        int length)
                                                 throws java.lang.ArrayIndexOutOfBoundsException
        Copy the contents of an external array into this array.
        Type Parameters:
        T - the class of the array being copied into
        Parameters:
        src - The source array.
        srcOffset - Where to start copying in the source array.
        destOffset - Where to start copying to in the destination array.
        length - The number of elements to copy.
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - If srcOffset < 0 or length > size() or destOffset + length > destArray.length.
      • toArray

        FeatureStructure[] toArray()
        Creates a new array the this array is copied to. Return type is FeatureStructure to be backwards compatible with V2
        Returns:
        A Java array copy of this FS array.
      • toArray

        <T extends TOP> T[] toArray​(T[] a)
        Populates an existing array from this FS Array.
        Type Parameters:
        T - the type of the element
        Parameters:
        a - the existing array
        Returns:
        the populated array