public final class ByteArray extends TOP implements CommonPrimitiveArray<Byte>, org.apache.uima.cas.impl.ByteArrayFSImpl, Iterable<Byte>
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 |
---|
ByteArray(JCas jcas,
int length)
Make a new ByteArray of given size
|
ByteArray(org.apache.uima.cas.impl.TypeImpl t,
org.apache.uima.cas.impl.CASImpl c,
int length)
used by generator
Make a new ByteArray of given size
|
Modifier and Type | Method and Description |
---|---|
byte[] |
_getTheArray() |
boolean |
contains(byte item) |
void |
copyFromArray(byte[] 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)
Copy the contents of an external string array into this array.
|
void |
copyToArray(int srcPos,
byte[] 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)
Copy the contents of the array to an external string array.
|
void |
copyValuesFrom(CommonArrayFS<Byte> v)
Copy values from another array of the same kind
|
static ByteArray |
create(JCas jcas,
byte[] a) |
byte |
get(int i)
Get the i-th string from the array.
|
int |
getTypeIndexID()
used to obtain reference to the _Type instance
|
Iterator<Byte> |
iterator() |
void |
set(int i,
byte v)
Set the i-th value.
|
void |
setArrayValueFromString(int i,
String v)
Internal Use Only.
|
int |
size()
return the size of the array
|
byte[] |
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
forEach, spliterator
public static final String _TypeName
public static final int typeIndexID
public static final int type
public ByteArray(JCas jcas, int length)
jcas
- the JCaslength
- the length of the array in bytespublic ByteArray(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 byte get(int i)
ByteArrayFS
get
in interface ByteArrayFS
i
- the indexByteArrayFS.get(int)
public void set(int i, byte v)
ByteArrayFS
set
in interface ByteArrayFS
i
- The index.v
- The value.ByteArrayFS.set(int , byte)
public void copyFromArray(byte[] src, int srcPos, int destPos, int length)
ByteArrayFS
copyFromArray
in interface ByteArrayFS
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.ByteArrayFS.copyFromArray(byte[], int, int, int)
public void copyToArray(int srcPos, byte[] dest, int destPos, int length)
ByteArrayFS
start
to end
to the
destination destArray
with destination offset destOffset
.copyToArray
in interface ByteArrayFS
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.ByteArrayFS.copyToArray(int, byte[], int, int)
public byte[] toArray()
ByteArrayFS
toArray
in interface ByteArrayFS
ByteArrayFS.toArray()
public int size()
size
in interface CommonArrayFS<Byte>
public void copyToArray(int srcPos, String[] dest, int destPos, int length)
CommonArrayFS
copyToArray
in interface CommonArrayFS<Byte>
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.CommonArrayFS.copyToArray(int, String[], int, int)
public void copyFromArray(String[] src, int srcPos, int destPos, int length)
CommonArrayFS
copyFromArray
in interface CommonArrayFS<Byte>
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.CommonArrayFS.copyFromArray(String[], int, int, int)
public byte[] _getTheArray()
public void copyValuesFrom(CommonArrayFS<Byte> v)
CommonArrayFS
copyValuesFrom
in interface CommonArrayFS<Byte>
v
- the other arraypublic void setArrayValueFromString(int i, String v)
CommonPrimitiveArray
setArrayValueFromString
in interface CommonPrimitiveArray<Byte>
i
- the indexv
- the value to set at the above indexpublic static ByteArray create(JCas jcas, byte[] a)
jcas
- Which CAS to create the array ina
- the source for the array's initial valuespublic boolean contains(byte item)
item
- the item to see if is in the arrayCopyright © 2006–2017 The Apache Software Foundation. All rights reserved.