Class FSList<T extends TOP>

    • Constructor Detail

      • FSList

        protected FSList()
      • FSList

        public FSList​(JCas jcas)
      • FSList

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

      • getNthElement

        public T getNthElement​(int i)
      • pushNode

        public NonEmptyFSList<T> 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
      • select

        public <U extends TSelectFSs<U> select()
        Treat an FSArray as a source for SelectFSs.
        Type Parameters:
        U - generic type being selected
        Returns:
        a new instance of SelectFSs
      • select

        public <U extends TSelectFSs<U> select​(Type filterByType)
        Treat an FSArray as a source for SelectFSs.
        Type Parameters:
        U - generic type being selected
        Parameters:
        filterByType - only includes elements of this type
        Returns:
        a new instance of SelectFSs
        Throws:
        java.lang.IllegalArgumentException - if no type is specified.
      • select

        public <U extends TSelectFSs<U> select​(java.lang.Class<U> filterByType)
        Treat an FSArray as a source for SelectFSs.
        Type Parameters:
        U - generic type being selected
        Parameters:
        filterByType - only includes elements of this JCas class
        Returns:
        a new instance of SelectFSs
        Throws:
        java.lang.IllegalArgumentException - if no type is specified.
      • select

        public <U extends TSelectFSs<U> select​(int filterByType)
        Treat an FSArray as a source for SelectFSs.
        Type Parameters:
        U - generic type being selected
        Parameters:
        filterByType - only includes elements of this JCas class's type
        Returns:
        a new instance of SelectFSs
      • select

        public <U extends TSelectFSs<U> select​(java.lang.String filterByType)
        Treat an FSArray as a source for SelectFSs.
        Type Parameters:
        U - generic type being selected
        Parameters:
        filterByType - only includes elements of this type (fully qualified type name)
        Returns:
        a new instance of SelectFSs
        Throws:
        java.lang.IllegalArgumentException - if no type is specified.
      • create

        public static <U extends TOP,​E extends FeatureStructureFSList<U> create​(JCas jcas,
                                                                                        E[] a)
        Create an FSList from an existing array of Feature Structures
        Type Parameters:
        U - the type of FeatureStructures being stored in the FSList being created
        E - the type of the array argument
        Parameters:
        jcas - the JCas to use
        a - the array of Feature Structures to populate the list with
        Returns:
        an FSList, with the elements from the array
      • iterator

        public java.util.Iterator<T> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<T extends TOP>
      • push

        public NonEmptyFSList<T> push​(T 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
      • stream

        public java.util.stream.Stream<T> stream()
        Returns:
        a stream over this FSList
      • contains

        public boolean contains​(T v)