public final class FSArray extends TOP implements Iterable<TOP>, ArrayFSImpl, SelectViaCopyToArray
Modifier and Type | Field and Description |
---|---|
static String |
_TypeName |
static int |
type |
static int |
typeIndexID
each cover class when loaded sets an index.
|
_singleton
Constructor and Description |
---|
FSArray(JCas jcas,
int length)
Make a new FSArray of given size
|
FSArray(org.apache.uima.cas.impl.TypeImpl t,
org.apache.uima.cas.impl.CASImpl c,
int length)
used by generator
Make a new FSArray of given size
|
Modifier and Type | Method and Description |
---|---|
TOP[] |
_getTheArray() |
FeatureStructure[] |
_toArrayForSelect() |
void |
copyFromArray(FeatureStructure[] src,
int srcPos,
int destPos,
int length)
Copy the contents of an external array into this array.
|
void |
copyFromArray(String[] src,
int srcPos,
int destPos,
int length)
Not supported, will throw UnsupportedOperationException
|
void |
copyToArray(int srcPos,
FeatureStructure[] dest,
int destPos,
int length)
Copy the contents of the array from
start to end to the
destination destArray with destination offset destOffset . |
void |
copyToArray(int srcPos,
String[] dest,
int destPos,
int length)
Copies an array of Feature Structures to an Array of Strings.
|
void |
copyValuesFrom(CommonArrayFS v)
Copy values from another array of the same kind
|
static FSArray |
create(JCas jcas,
FeatureStructure[] a)
Convenience - create a FSArray from an existing FeatureStructure[]
|
TOP |
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<TOP> |
iterator() |
void |
set(int i,
FeatureStructure v)
updates the Cas, setting the indexed value with the corresponding Cas FeatureStructure.
|
int |
size()
return the size of the array.
|
Spliterator<TOP> |
spliterator() |
<T extends TOP> |
stream() |
FeatureStructure[] |
toArray()
Creates a new array the this array is copied to.
|
_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, addToIndexes, addToIndexes, addToIndexes, clone, compare, getAddress, getBooleanValue, getByteValue, getCAS, getCASImpl, getDoubleValue, getFeatureValue, getFeatureValueAsString, getFloatValue, getIntValue, getLongValue, getLowLevelCas, getShortValue, getStringValue, getType, hashCode, prettyPrint, prettyPrint, prettyPrint, prettyPrint, prettyPrint, prettyPrint, removeFromIndexes, removeFromIndexes, removeFromIndexes, setBooleanValue, setByteValue, setDoubleValue, setFeatureValue, setFeatureValueFromString, setFloatValue, setIntValue, setLongValue, setShortValue, setStringValue, toShortString, toString, toString
equals, finalize, getClass, notify, notifyAll, wait, wait, wait
getValuesAsCommaSeparatedString, toStringArray
_getTypeCode, _id, clone, getAddress, getBooleanValue, getByteValue, getCAS, getDoubleValue, getFeatureValue, getFeatureValueAsString, getFloatValue, getIntValue, getLongValue, getShortValue, getStringValue, getType, setBooleanValue, setByteValue, setDoubleValue, setFeatureValue, setFeatureValueFromString, setFloatValue, setIntValue, setLongValue, setShortValue, setStringValue
public 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(org.apache.uima.cas.impl.TypeImpl t, org.apache.uima.cas.impl.CASImpl c, int length)
c
- -t
- -length
- the length of the arraypublic int getTypeIndexID()
getTypeIndexID
in class TOP
public TOP get(int i)
public void set(int i, FeatureStructure v)
public int size()
size
in interface CommonArrayFS
public void copyFromArray(FeatureStructure[] src, int srcPos, int destPos, int length)
ArrayFS
copyFromArray
in interface ArrayFS
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.ArrayFS.copyFromArray(FeatureStructure[], int, int, int)
public void copyToArray(int srcPos, FeatureStructure[] dest, int destPos, int length)
ArrayFS
start
to end
to the
destination destArray
with destination offset destOffset
.copyToArray
in interface ArrayFS
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.ArrayFS.copyToArray(int, FeatureStructure[], int, int)
public FeatureStructure[] toArray()
ArrayFS
toArray
in interface ArrayFS
ArrayFS.toArray()
public FeatureStructure[] _toArrayForSelect()
_toArrayForSelect
in interface SelectViaCopyToArray
public void copyFromArray(String[] src, int srcPos, int destPos, int length)
copyFromArray
in interface CommonArrayFS
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
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 v)
CommonArrayFS
copyValuesFrom
in interface CommonArrayFS
v
- the other arraypublic static FSArray create(JCas jcas, FeatureStructure[] a)
jcas
- -a
- -public Spliterator<TOP> spliterator()
spliterator
in interface Iterable<TOP>
public <T extends TOP> java.util.stream.Stream<T> stream()
Copyright © 2006–2017 The Apache Software Foundation. All rights reserved.