Class FSArrayList<T extends TOP>

Type Parameters:
T - the generic type
All Implemented Interfaces:
Cloneable, Iterable<T>, Collection<T>, List<T>, RandomAccess, CommonArrayFS<T>, FeatureStructure, FeatureStructureImpl, SelectViaCopyToArray<T>, UimaSerializable, UimaSerializableFSs

public class FSArrayList<T extends TOP> extends TOP implements UimaSerializableFSs, CommonArrayFS<T>, SelectViaCopyToArray<T>, List<T>, RandomAccess, Cloneable

An ArrayList type containing Feature Structures, for UIMA

  • Has all the methods of List
  • Implements the select(...) APIs

Implementation notes:

  • Uses UimaSerializable APIs
  • two implementations of the array list:
    • one uses the original FSArray, via an asList wrapper
    • This is used until an add or remove operation;
    • switches to ArrayList, resetting the original FSArray to null
  • This enables operation without creating the Java Object in use cases of deserializing and referencing when updating is not being used.
  • The values stored internally are non-PEAR ones.
  • The get/set/add operations convert to/from PEAR ones as needed