public final class FSArray<T extends FeatureStructure> extends TOP implements ArrayFSImpl<T>, Iterable<T>, SelectViaCopyToArray<T>
FeatureStructureImplC.PrintReferences| Modifier and Type | Field and Description | 
|---|---|
| static String | _TypeName | 
| static int | type | 
| static int | typeIndexIDeach cover class when loaded sets an index. | 
_singleton_casView, _id, DISABLE_RUNTIME_FEATURE_VALIDATION, DISABLE_RUNTIME_FEATURE_VALUE_VALIDATION, IS_ENABLE_RUNTIME_FEATURE_VALIDATION, IS_ENABLE_RUNTIME_FEATURE_VALUE_VALIDATION, IS_V2_PRETTY_PRINT, V2_PRETTY_PRINT| Constructor and Description | 
|---|
| FSArray(Class<? extends TOP> clazz,
       JCas jcas,
       int length)Constructs an instance of a subtype of FSArray having the component type clazz Note: the array
 with this component type must already be specified in the type system declaration as a feature
 whose range is FSArray with the specified elementType. | 
| FSArray(JCas jcas,
       int length)Make a new FSArray of given size | 
| FSArray(TypeImpl t,
       CASImpl c,
       int length)used by generator Make a new FSArray of given size | 
| Modifier and Type | Method and Description | 
|---|---|
| TOP[] | _getTheArray() | 
| FeatureStructure[] | _toArrayForSelect() | 
| boolean | contains(Object o) | 
| void | copyFromArray(String[] src,
             int srcPos,
             int destPos,
             int length)Not supported, will throw UnsupportedOperationException | 
| <U extends FeatureStructure> | copyFromArray(U[] src,
             int srcPos,
             int destPos,
             int length)Copy the contents of an external array into this array. | 
| void | copyToArray(int srcPos,
           String[] dest,
           int destPos,
           int length)Copies an array of Feature Structures to an Array of Strings. | 
| <U extends FeatureStructure> | copyToArray(int srcPos,
           U[] dest,
           int destPos,
           int length)Copy the contents of the array from  starttoendto the destinationdestArraywith destination offsetdestOffset. | 
| void | copyValuesFrom(CommonArrayFS<T> v)Copy values from another array of the same kind | 
| static <U extends FeatureStructure> | create(JCas jcas,
      FeatureStructure[] a)Convenience - create a FSArray from an existing FeatureStructure[] | 
| <U extends FeatureStructure> | get(int i)return the indexed value from the corresponding Cas FSArray as a Java Model object. | 
| int | getTypeIndexID()used to obtain reference to the _Type instance | 
| Iterator<T> | iterator() | 
| void | set(int i,
   T av)updates the Cas, setting the indexed value with the corresponding Cas FeatureStructure. | 
| int | size()return the size of the array. | 
| Spliterator<T> | spliterator() | 
| Stream<T> | stream() | 
| FeatureStructure[] | toArray()Creates a new array the this array is copied to. | 
| <U extends TOP> | toArray(U[] a)Populates an existing array from this FS Array. | 
_createJCasHashMapReserve, _createSearchKey_copyIntAndRefArraysEqTypesFrom, _copyIntAndRefArraysFrom, _copyIntArrayEqTypesFrom, _getBooleanValueNc, _getBooleanValueNc, _getByteValueNc, _getByteValueNc, _getDoubleValueNc, _getDoubleValueNc, _getFeatFromAdjOffset, _getFeatureValueNc, _getFeatureValueNc, _getFloatValueNc, _getFloatValueNc, _getIntLikeValue, _getIntValueNc, _getIntValueNc, _getLongValueNc, _getLongValueNc, _getRefValueCommon, _getShortValueNc, _getShortValueNc, _getStringValueNc, _getStringValueNc, _getTypeCode, _getTypeImpl, _getView, _id, _inSetSortedIndex, _isJCasHashMapReserve, _isPearTrampoline, _maybeGetBaseForPearFs, _maybeGetBaseForPearFs, _maybeGetPearFs, _maybeGetPearFs, _resetInSetSortedIndex, _setBooleanValueNcNj, _setBooleanValueNcNj, _setBooleanValueNfc, _setByteValueNcNj, _setByteValueNcNj, _setByteValueNfc, _setDoubleValueNcNj, _setDoubleValueNcNj, _setDoubleValueNfc, _setFeatureValueNcNj, _setFeatureValueNcNj, _setFeatureValueNcWj, _setFloatValueNcNj, _setFloatValueNcNj, _setFloatValueNfc, _setInSetSortedIndexed, _setIntLikeValue, _setIntLikeValueNcNj, _setIntValueCJ, _setIntValueNcNj, _setIntValueNcNj, _setIntValueNfc, _setIntValueNfcCJ, _setJCasHashMapReserve, _setLongValueCJ, _setLongValueNcNj, _setLongValueNcNj, _setLongValueNfc, _setLongValueNfcCJ, _setPearTrampoline, _setRefValueCJ, _setRefValueCommon, _setRefValueCommonWj, _setRefValueNfcCJ, _setShortValueNcNj, _setShortValueNcNj, _setShortValueNfc, _setStringValueNcNj, _setStringValueNcWj, _setStringValueNfc, _setTypeImpl, addStringOrPrimitive, addToIndexes, addToIndexes, addToIndexes, clone, compare, equals, getAddress, getBooleanValue, getByteValue, getCAS, getCASImpl, getDoubleValue, getFeatureValue, getFeatureValueAsString, getFloatValue, getIntValue, getLongValue, getLowLevelCas, getShortValue, getStringValue, getType, hashCode, prettyPrint, prettyPrint, prettyPrint, prettyPrint, prettyPrint, prettyPrint, prettyPrintShort, removeFromIndexes, removeFromIndexes, removeFromIndexes, setBooleanValue, setByteValue, setDoubleValue, setFeatureValue, setFeatureValueFromString, setFloatValue, setIntValue, setLongValue, setShortValue, setStringValue, toShortString, toString, toString, wrapGetIntCatchExceptionfinalize, getClass, notify, notifyAll, wait, wait, waitgetValuesAsCommaSeparatedString, isEmpty, toStringArray_getTypeCode, _id, clone, equals, getAddress, getBooleanValue, getByteValue, getCAS, getDoubleValue, getFeatureValue, getFeatureValueAsString, getFloatValue, getIntValue, getJCas, getLongValue, getShortValue, getStringValue, getType, hashCode, setBooleanValue, setByteValue, setDoubleValue, setFeatureValue, setFeatureValueFromString, setFloatValue, setIntValue, setLongValue, setShortValue, setStringValuepublic static final String _TypeName
public static final int typeIndexID
public static final int type
public FSArray(JCas jcas, int length)
jcas - The JCaslength - The number of elements in the new arraypublic FSArray(TypeImpl t, CASImpl c, int length)
c - -t - -length - the length of the arraypublic FSArray(Class<? extends TOP> clazz, JCas jcas, int length)
clazz - - the FSArray's element's classjcas - -length - -public int getTypeIndexID()
getTypeIndexID in class TOPpublic <U extends FeatureStructure> U get(int i)
get in interface ArrayFS<T extends FeatureStructure>U - The class of the item being obtained by the geti - indexpublic void set(int i,
                T av)
set in interface ArrayFS<T extends FeatureStructure>i - The index.av - The value.public int size()
size in interface CommonArrayFS<T extends FeatureStructure>public <U extends FeatureStructure> void copyFromArray(U[] src, int srcPos, int destPos, int length)
ArrayFScopyFromArray in interface ArrayFS<T extends FeatureStructure>U - the class of the array being copied intosrc - The source array.srcPos - Where to start copying in the source array.destPos - Where to start copying to in the destination array.length - The number of elements to copy.ArrayFS.copyFromArray(FeatureStructure[], int, int, int)public <U extends FeatureStructure> void copyToArray(int srcPos, U[] dest, int destPos, int length)
ArrayFSstart to end to the destination
 destArray with destination offset destOffset.copyToArray in interface ArrayFS<T extends FeatureStructure>U - the type of the array elementsrcPos - The index of the first element to copy.dest - The array to copy to.destPos - Where to start copying into dest.length - The number of elements to copy.ArrayFS.copyToArray(int, FeatureStructure[], int, int)public FeatureStructure[] toArray()
ArrayFStoArray in interface ArrayFS<T extends FeatureStructure>ArrayFS.toArray()public FeatureStructure[] _toArrayForSelect()
_toArrayForSelect in interface SelectViaCopyToArray<T extends FeatureStructure>public void copyFromArray(String[] src, int srcPos, int destPos, int length)
copyFromArray in interface CommonArrayFS<T extends FeatureStructure>src - The source array.srcPos - Where to start copying in the source array.destPos - Where to start copying to in the destination array.length - The number of elements to copy.public void copyToArray(int srcPos,
                        String[] dest,
                        int destPos,
                        int length)
copyToArray in interface CommonArrayFS<T extends FeatureStructure>srcPos - The index of the first element to copy.dest - The array to copy to.destPos - Where to start copying into dest.length - The number of elements to copy.ArrayIndexOutOfBoundsException - If srcPos < 0 or length > size() or
              destPos + length > destArray.length.public TOP[] _getTheArray()
public void copyValuesFrom(CommonArrayFS<T> v)
CommonArrayFScopyValuesFrom in interface CommonArrayFS<T extends FeatureStructure>v - the other arraypublic static <U extends FeatureStructure> FSArray<U> create(JCas jcas, FeatureStructure[] a)
U - the element type of the FSArray, subtype of FeatureStructurejcas - -a - -public Iterator<T> iterator()
iterator in interface Iterable<T extends FeatureStructure>public Spliterator<T> spliterator()
spliterator in interface Iterable<T extends FeatureStructure>public boolean contains(Object o)
public <U extends TOP> U[] toArray(U[] a)
ArrayFStoArray in interface ArrayFS<T extends FeatureStructure>U - the type of the elementa - the existing arrayCopyright © 2006–2022 The Apache Software Foundation. All rights reserved.