Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.uima.cas
Interface CommonArrayFS

All Superinterfaces:
  FeatureStructure

All Known Subinterfaces:
  ArrayFS, BooleanArrayFS, ByteArrayFS, DoubleArrayFS, FloatArrayFS, IntArrayFS, LongArrayFS, ShortArrayFS, StringArrayFS

All Known Implementing Classes:
  BooleanArray, ByteArray, DoubleArray, FloatArray, FSArray, IntegerArray, LongArray, ShortArray, StringArray

    public interface CommonArrayFS

extends FeatureStructure

Common parts of the Array interfaces.

Method Summary
`void` | `copyFromArray(String[] src, int srcOffset, int destOffset, int length)` Copy the contents of an external string array into this array.
`void` | `copyToArray(int srcOffset, String[] dest, int destOffset, int length)` Copy the contents of the array to an external string array.
`int` | `size()` Return the size of the array.
`String[]` | `toStringArray()` Creates a new string array and copies this array values into it.

Methods inherited from interface org.apache.uima.cas.FeatureStructure
`clone, equals, getBooleanValue, getByteValue, getCAS, getDoubleValue, getFeatureValue, getFeatureValueAsString, getFloatValue, getIntValue, getLongValue, getShortValue, getStringValue, getType, hashCode, setBooleanValue, setByteValue, setDoubleValue, setFeatureValue, setFeatureValueFromString, setFloatValue, setIntValue, setLongValue, setShortValue, setStringValue`

Method Detail

### size

    int size()

  Return the size of the array.

  Returns:
    The size of the array.

### toStringArray

    String[] toStringArray()

  Creates a new string array and copies this array values into it.

  Returns:
    A Java array copy of this array.

### copyToArray

    void copyToArray(int srcOffset,
                     String[] dest,
                     int destOffset,
                     int length)
                     throws ArrayIndexOutOfBoundsException

  Copy the contents of the array to an external string array.

  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:
    `ArrayIndexOutOfBoundsException` - If `srcOffset < 0` or `length > size()` or `destOffset + length > destArray.length`.

### copyFromArray

    void copyFromArray(String[] src,
                       int srcOffset,
                       int destOffset,
                       int length)
                       throws ArrayIndexOutOfBoundsException,
                              NumberFormatException

  Copy the contents of an external string array into this array. The strings are parsed and converted to floats.

  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:
    `ArrayIndexOutOfBoundsException` - When length conditions are not met.
    `NumberFormatException` - When the input strings do not represent valid floats.
    `UnsupportedOperationException` - When the array is an array of FSs.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 The Apache Software Foundation. All Rights Reserved.