Class IntegerArrayList

All Implemented Interfaces:
Cloneable, Iterable<Integer>, RandomAccess, CommonArrayFS<Integer>, FeatureStructure, FeatureStructureImpl, UimaSerializable

public class IntegerArrayList extends TOP implements Iterable<Integer>, UimaSerializable, CommonArrayFS<Integer>, RandomAccess, Cloneable
An ArrayList type containing ints, for UIMA - implements a subset of the List API, Iterable<Integer>, IntListIterator. - it is adjustable, like ArrayList Implementation notes: - implements Iterable + stream, not Collection, because stream returns IntStream - Uses UimaSerializable APIs - two implementations of the array list: -- one uses the original IntegerArray, via a variant of the asList wrapper that returns ints -- This is used until an add or remove operation that changes the size. --- switches to IntVector, resetting the original IntegerArray to null - This enables operation without creating the Java Object in use cases of deserializing and referencing when updating is not being used.
  • Field Details

    • _TypeName

      public static final String _TypeName
      See Also:
    • typeIndexID

      public static final int typeIndexID
    • type

      public static final int type
    • intArrayList

      private final IntVector intArrayList
      lifecycle - starts as empty array list - becomes non-empty when updated (add) -- used from that point on
    • intArrayAsList

      private List_of_ints intArrayAsList
      lifecycle - starts as the empty list - set when _init_from_cas_data() - set to null when update (add/remove) happens
    • _FeatName_intArray

      public static final String _FeatName_intArray
      See Also:
    • _FC_intArray

      private static final CallSite _FC_intArray
    • _FH_intArray

      private static final MethodHandle _FH_intArray
  • Constructor Details

    • IntegerArrayList

      protected IntegerArrayList()
      Never called. Disable default constructor
    • IntegerArrayList

      public IntegerArrayList(TypeImpl type, CASImpl casImpl)
      Internal - constructor used by generator
      Parameters:
      type - the type of this Feature Structure
      casImpl - the CAS this Feature Structure belongs to
    • IntegerArrayList

      public IntegerArrayList(JCas jcas)
      Parameters:
      jcas - JCas to which this Feature Structure belongs
    • IntegerArrayList

      public IntegerArrayList(JCas jcas, int length)
      Make a new ArrayList with an initial size
      Parameters:
      jcas - The JCas
      length - initial size
  • Method Details