Class IntegerList

All Implemented Interfaces:
Cloneable, Iterable<Integer>, FeatureStructure, FeatureStructureImpl, CommonList
Direct Known Subclasses:
EmptyIntegerList, NonEmptyIntegerList

public abstract class IntegerList extends TOP implements CommonList, Iterable<Integer>
  • Field Details

  • Constructor Details

    • IntegerList

      protected IntegerList()
    • IntegerList

      public IntegerList(JCas jcas)
    • IntegerList

      public IntegerList(TypeImpl t, CASImpl c)
      used by generator Make a new AnnotationBase
      Parameters:
      c - -
      t - -
  • Method Details

    • getNthElement

      public int getNthElement(int i)
    • createNonEmptyNode

      public NonEmptyIntegerList createNonEmptyNode()
      Description copied from interface: CommonList
      Creates a non empty node
      Specified by:
      createNonEmptyNode in interface CommonList
      Returns:
      a new non empty node
    • pushNode

      public NonEmptyIntegerList pushNode()
      Description copied from interface: CommonList
      Creates a new node and pushes it onto the front of the existing node
      Specified by:
      pushNode in interface CommonList
      Returns:
      the new node
    • iterator

      public PrimitiveIterator.OfInt iterator()
      Specified by:
      iterator in interface Iterable<Integer>
    • push

      public NonEmptyIntegerList push(int item)
      pushes item onto front of this list
      Parameters:
      item - the item to push onto the list
      Returns:
      the new list, with this item as the head value of the first element
    • emptyList

      public EmptyIntegerList emptyList()
      Specified by:
      emptyList in interface CommonList
      Returns:
      a shared instance of the empty node.
    • create

      public static IntegerList create(JCas jcas, int[] a)
      Create an IntegerList from an existing array of ints
      Parameters:
      jcas - the JCas to use
      a - the array of ints to populate the list with
      Returns:
      an IntegerList, with the elements from the array
    • stream

      public Stream<Integer> stream()
    • spliterator

      public Spliterator.OfInt spliterator()
      Specified by:
      spliterator in interface Iterable<Integer>
    • contains

      public boolean contains(int v)