T
- the generic typepublic class FSArrayList<T extends TOP> extends TOP implements UimaSerializableFSs, CommonArrayFS, SelectViaCopyToArray, List<T>, RandomAccess, Cloneable
An ArrayList type containing Feature Structures, for UIMA
Implementation notes:
Modifier and Type | Field and Description |
---|---|
static String |
_FeatName_fsArray |
static int |
_FI_fsArray |
static String |
_TypeName |
static int |
type |
static int |
typeIndexID |
_singleton
Modifier | Constructor and Description |
---|---|
protected |
FSArrayList()
Never called.
|
|
FSArrayList(JCas jcas) |
|
FSArrayList(JCas jcas,
int length)
Make a new ArrayList with an initial size .
|
|
FSArrayList(org.apache.uima.cas.impl.TypeImpl type,
org.apache.uima.cas.impl.CASImpl casImpl)
Internal - constructor used by generator
|
Modifier and Type | Method and Description |
---|---|
void |
_init_from_cas_data() |
void |
_save_to_cas_data()
This method is called by the framework before serialization of an instance of this
JCas class.
|
org.apache.uima.cas.impl.FeatureStructureImplC |
_superClone() |
FeatureStructure[] |
_toArrayForSelect() |
void |
add(int index,
T element)
Adds the.
|
boolean |
add(T e)
Adds the.
|
boolean |
addAll(Collection<? extends T> c)
Adds the all.
|
boolean |
addAll(int index,
Collection<? extends T> c)
Adds the all.
|
void |
clear()
Clear.
|
boolean |
contains(Object o)
Contains.
|
boolean |
containsAll(Collection<?> c)
Contains all.
|
void |
copyFromArray(String[] src,
int srcPos,
int destPos,
int length)
Not supported, will throw UnsupportedOperationException.
|
void |
copyFromArray(T[] src,
int srcPos,
int destPos,
int length)
Copy from array.
|
void |
copyToArray(int srcPos,
FeatureStructure[] dest,
int destPos,
int length)
Copy to array.
|
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 <N extends TOP> |
create(JCas jcas,
N[] a)
Convenience - create a FSArrayList from an existing FeatureStructure[].
|
boolean |
equals(Object o)
equals means equal items, same order.
|
void |
forEach(java.util.function.Consumer<? super T> action)
For each.
|
T |
get(int i) |
int |
getTypeIndexID() |
int |
hashCode()
want hashcode to depend only on equal items, regardless of what format.
|
int |
indexOf(Object o)
Index of.
|
boolean |
isEmpty()
Checks if is empty.
|
Iterator<T> |
iterator()
Iterator.
|
int |
lastIndexOf(Object o)
Last index of.
|
ListIterator<T> |
listIterator()
List iterator.
|
ListIterator<T> |
listIterator(int index)
List iterator.
|
java.util.stream.Stream<T> |
parallelStream()
Parallel stream.
|
T |
remove(int index)
Removes the.
|
boolean |
remove(Object o)
Removes the.
|
boolean |
removeAll(Collection<?> c)
Removes the all.
|
boolean |
removeIf(java.util.function.Predicate<? super T> filter)
Removes the if.
|
void |
replaceAll(java.util.function.UnaryOperator<T> operator)
Replace all.
|
boolean |
retainAll(Collection<?> c)
Retain all.
|
T |
set(int i,
T v)
updates the i-th value of the FSArrayList.
|
int |
size()
return the size of the array.
|
void |
sort(Comparator<? super T> c)
Sort.
|
Spliterator<T> |
spliterator()
Spliterator.
|
java.util.stream.Stream<T> |
stream()
Stream.
|
List<T> |
subList(int fromIndex,
int toIndex)
Sub list.
|
T[] |
toArray()
Note: doesn't convert to pear trampolines!.
|
<U> U[] |
toArray(U[] a)
To array.
|
String |
toString() |
_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, prettyPrint, prettyPrint, prettyPrint, prettyPrint, prettyPrint, prettyPrint, removeFromIndexes, removeFromIndexes, removeFromIndexes, setBooleanValue, setByteValue, setDoubleValue, setFeatureValue, setFeatureValueFromString, setFloatValue, setIntValue, setLongValue, setShortValue, setStringValue, toShortString, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
_save_fsRefs_to_cas_data
_reset_cas_data, clone
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 static final String _FeatName_fsArray
public static final int _FI_fsArray
protected FSArrayList()
public FSArrayList(org.apache.uima.cas.impl.TypeImpl type, org.apache.uima.cas.impl.CASImpl casImpl)
casImpl
- the CAS this Feature Structure belongs totype
- the type of this Feature Structurepublic FSArrayList(JCas jcas)
jcas
- JCas to which this Feature Structure belongspublic FSArrayList(JCas jcas, int length)
jcas
- The JCaslength
- initial sizepublic int getTypeIndexID()
getTypeIndexID
in class TOP
public void _init_from_cas_data()
_init_from_cas_data
in interface UimaSerializable
public void _save_to_cas_data()
UimaSerializable
_save_to_cas_data
in interface UimaSerializable
public int size()
size
in interface Collection<T extends TOP>
size
in interface List<T extends TOP>
size
in interface CommonArrayFS
public void copyFromArray(T[] src, int srcPos, int destPos, int length)
src
- -srcPos
- -destPos
- -length
- -ArrayFS.copyFromArray(FeatureStructure[], int, int, int)
public void copyToArray(int srcPos, FeatureStructure[] dest, int destPos, int length)
srcPos
- -dest
- -destPos
- -length
- -ArrayFS.copyToArray(int, FeatureStructure[], int, int)
public T[] toArray()
toArray
in interface Collection<T extends TOP>
toArray
in interface List<T extends TOP>
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 srcsrcPos
- the src posdestPos
- the dest poslength
- the lengthpublic 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 void copyValuesFrom(CommonArrayFS v)
CommonArrayFS
copyValuesFrom
in interface CommonArrayFS
v
- the other arraypublic static <N extends TOP> FSArrayList<N> create(JCas jcas, N[] a)
N
- generic type of returned FSjcas
- -a
- -public org.apache.uima.cas.impl.FeatureStructureImplC _superClone()
_superClone
in interface UimaSerializable
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<T extends TOP>
containsAll
in interface List<T extends TOP>
c
- -AbstractCollection.containsAll(java.util.Collection)
public boolean isEmpty()
isEmpty
in interface Collection<T extends TOP>
isEmpty
in interface List<T extends TOP>
ArrayList.isEmpty()
public boolean contains(Object o)
contains
in interface Collection<T extends TOP>
contains
in interface List<T extends TOP>
o
- -ArrayList.contains(java.lang.Object)
public int indexOf(Object o)
indexOf
in interface List<T extends TOP>
o
- -ArrayList.indexOf(java.lang.Object)
public int lastIndexOf(Object o)
lastIndexOf
in interface List<T extends TOP>
o
- -ArrayList.lastIndexOf(java.lang.Object)
public <U> U[] toArray(U[] a)
toArray
in interface Collection<T extends TOP>
toArray
in interface List<T extends TOP>
U
- the generic typea
- -ArrayList.toArray(java.lang.Object[])
public String toString()
toString
in class org.apache.uima.cas.impl.FeatureStructureImplC
public boolean add(T e)
add
in interface Collection<T extends TOP>
add
in interface List<T extends TOP>
e
- -ArrayList.add(java.lang.Object)
public boolean equals(Object o)
public void add(int index, T element)
add
in interface List<T extends TOP>
index
- -element
- -ArrayList.add(int, java.lang.Object)
public T remove(int index)
remove
in interface List<T extends TOP>
index
- -ArrayList.remove(int)
public boolean remove(Object o)
remove
in interface Collection<T extends TOP>
remove
in interface List<T extends TOP>
o
- -ArrayList.remove(java.lang.Object)
public int hashCode()
hashCode
in interface Collection<T extends TOP>
hashCode
in interface List<T extends TOP>
hashCode
in class org.apache.uima.cas.impl.FeatureStructureImplC
AbstractList.hashCode()
public void clear()
clear
in interface Collection<T extends TOP>
clear
in interface List<T extends TOP>
ArrayList.clear()
public boolean addAll(Collection<? extends T> c)
addAll
in interface Collection<T extends TOP>
addAll
in interface List<T extends TOP>
c
- -ArrayList.addAll(java.util.Collection)
public boolean addAll(int index, Collection<? extends T> c)
addAll
in interface List<T extends TOP>
index
- -c
- -ArrayList.addAll(int, java.util.Collection)
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<T extends TOP>
removeAll
in interface List<T extends TOP>
c
- -ArrayList.removeAll(java.util.Collection)
public boolean retainAll(Collection<?> c)
retainAll
in interface Collection<T extends TOP>
retainAll
in interface List<T extends TOP>
c
- -ArrayList.retainAll(java.util.Collection)
public java.util.stream.Stream<T> stream()
stream
in interface Collection<T extends TOP>
Collection.stream()
public java.util.stream.Stream<T> parallelStream()
parallelStream
in interface Collection<T extends TOP>
Collection.parallelStream()
public ListIterator<T> listIterator(int index)
listIterator
in interface List<T extends TOP>
index
- -ArrayList.listIterator(int)
public ListIterator<T> listIterator()
listIterator
in interface List<T extends TOP>
ArrayList.listIterator()
public List<T> subList(int fromIndex, int toIndex)
subList
in interface List<T extends TOP>
fromIndex
- -toIndex
- -ArrayList.subList(int, int)
public void forEach(java.util.function.Consumer<? super T> action)
forEach
in interface Iterable<T extends TOP>
action
- -ArrayList.forEach(java.util.function.Consumer)
public Spliterator<T> spliterator()
spliterator
in interface Iterable<T extends TOP>
spliterator
in interface Collection<T extends TOP>
spliterator
in interface List<T extends TOP>
ArrayList.spliterator()
public boolean removeIf(java.util.function.Predicate<? super T> filter)
removeIf
in interface Collection<T extends TOP>
filter
- -ArrayList.removeIf(java.util.function.Predicate)
public void replaceAll(java.util.function.UnaryOperator<T> operator)
replaceAll
in interface List<T extends TOP>
operator
- -ArrayList.replaceAll(java.util.function.UnaryOperator)
public void sort(Comparator<? super T> c)
sort
in interface List<T extends TOP>
c
- -ArrayList.sort(java.util.Comparator)
Copyright © 2006–2017 The Apache Software Foundation. All rights reserved.