public final class IntegerArray extends TOP implements CommonPrimitiveArray<Integer>, org.apache.uima.cas.impl.IntArrayFSImpl, Iterable<Integer>
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 |
---|
IntegerArray(JCas jcas,
int length)
Make a new IntegerArray of given size
|
IntegerArray(org.apache.uima.cas.impl.TypeImpl t,
org.apache.uima.cas.impl.CASImpl c,
int length)
used by generator
Make a new IntegerArray of given size
|
Modifier and Type | Method and Description |
---|---|
int[] |
_getTheArray() |
boolean |
contains(int item) |
void |
copyFromArray(int[] src,
int srcPos,
int destPos,
int length)
Copy the contents of an external array into this array.
|
void |
copyFromArray(String[] src,
int srcOffset,
int destOffset,
int length)
Copy the contents of an external string array into this array.
|
void |
copyToArray(int srcPos,
int[] 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 srcOffset,
String[] dest,
int destOffset,
int length)
Copy the contents of the array to an external string array.
|
void |
copyValuesFrom(CommonArrayFS v)
Copy values from another array of the same kind
|
static IntegerArray |
create(JCas jcas,
int[] a) |
void |
forEach(IntConsumer action)
non boxing version
|
int |
get(int i)
return the indexed value from the corresponding Cas IntegerArray_JCasImpl as an int.
|
int |
getTypeIndexID()
used to obtain reference to the _Type instance
|
PrimitiveIterator.OfInt |
iterator() |
void |
set(int i,
int v)
update the Cas, setting the indexed value to the passed in Java int value.
|
void |
setArrayValueFromString(int i,
String v)
Internal Use Only.
|
int |
size()
return the size of the array
|
Spliterator.OfInt |
spliterator() |
IntStream |
stream() |
int[] |
toArray()
Create a Java array that is a copy of the internal CAS 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, wrapGetIntCatchException
finalize, getClass, notify, notifyAll, wait, wait, wait
getValuesAsCommaSeparatedString, 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, setStringValue
public static final String _TypeName
public static final int typeIndexID
public static final int type
public IntegerArray(JCas jcas, int length)
jcas
- The JCaslength
- The number of elements in the new arraypublic IntegerArray(org.apache.uima.cas.impl.TypeImpl t, org.apache.uima.cas.impl.CASImpl c, int length)
c
- -t
- -length
- the length of the array in bytespublic int getTypeIndexID()
getTypeIndexID
in class TOP
public int get(int i)
get
in interface IntArrayFS
i
- the indexpublic void set(int i, int v)
set
in interface IntArrayFS
i
- The index.v
- The value.public void copyFromArray(int[] src, int srcPos, int destPos, int length)
IntArrayFS
copyFromArray
in interface IntArrayFS
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.IntArrayFS.copyFromArray(int[], int, int, int)
public void copyToArray(int srcPos, int[] dest, int destPos, int length)
IntArrayFS
start
to end
to the
destination destArray
with destination offset destOffset
.copyToArray
in interface IntArrayFS
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.IntArrayFS.copyToArray(int, int[], int, int)
public int[] toArray()
IntArrayFS
toArray
in interface IntArrayFS
IntArrayFS.toArray()
public int size()
size
in interface CommonArrayFS<Integer>
public void copyToArray(int srcOffset, String[] dest, int destOffset, int length)
CommonArrayFS
copyToArray
in interface CommonArrayFS<Integer>
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.CommonArrayFS.copyToArray(int, String[], int, int)
public void copyFromArray(String[] src, int srcOffset, int destOffset, int length)
CommonArrayFS
copyFromArray
in interface CommonArrayFS<Integer>
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.CommonArrayFS.copyFromArray(String[], int, int, int)
public int[] _getTheArray()
public void copyValuesFrom(CommonArrayFS v)
CommonArrayFS
copyValuesFrom
in interface CommonArrayFS<Integer>
v
- the other arraypublic void setArrayValueFromString(int i, String v)
CommonPrimitiveArray
setArrayValueFromString
in interface CommonPrimitiveArray<Integer>
i
- the indexv
- the value to set at the above indexpublic Spliterator.OfInt spliterator()
spliterator
in interface Iterable<Integer>
public PrimitiveIterator.OfInt iterator()
public IntStream stream()
public static IntegerArray create(JCas jcas, int[] a)
jcas
- Which CAS to create the array ina
- the source for the array's initial valuespublic void forEach(IntConsumer action)
action
- -public boolean contains(int item)
item
- the item to see if is in the arrayCopyright © 2006–2019 The Apache Software Foundation. All rights reserved.