org.apache.uima.jcas.cas

## Interface SelectViaCopyToArray<T extends FeatureStructure>

- Type Parameters:
    `T` - the type of the element
  All Known Implementing Classes:
    FSArray, FSArrayList, FSHashSet, FSLinkedHashSet

      public interface SelectViaCopyToArray<T extends FeatureStructure>

  Classes which provide a toArrayForSelect() method that returns a FeatureStructure[] can implement this to enable the class to be used as a "select" source T extends FeatureStructure because FSArray with no typing needs to default to FeatureStructure for backwards compatibility

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `CASImpl` | `_getView()`
    `FeatureStructure[]` | `_toArrayForSelect()`
    `default SelectFSs_impl<T>` | `select()`
    `default <U extends T> SelectFSs<U>` | `select(Class<U> filterByType)` Treat an FSArray as a source for SelectFSs.
    `default <U extends T> SelectFSs<U>` | `select(int filterByType)` Treat an FSArray as a source for SelectFSs.
    `default <U extends T> SelectFSs<U>` | `select(String filterByType)` Treat an FSArray as a source for SelectFSs.
    `default <U extends T> SelectFSs<U>` | `select(Type filterByType)` Treat an FSArray as a source for SelectFSs.

- - ### Method Detail

    - #### _toArrayForSelect

          FeatureStructure[] _toArrayForSelect()

    - #### _getView

          CASImpl _getView()

    - #### select

          default SelectFSs_impl<T> select()

      Returns:
        a new instance of SelectFSs

    - #### select

          default <U extends T> SelectFSs<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:
        `IllegalArgumentException` - if no type is specified.

    - #### select

          default <U extends T> SelectFSs<U> select(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:
        `IllegalArgumentException` - if no type is specified.

    - #### select

          default <U extends T> SelectFSs<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

          default <U extends T> SelectFSs<U> select(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 qualifined type name)
      Returns:
        a new instance of SelectFSs
      Throws:
        `IllegalArgumentException` - if no type is specified.

Copyright © 2006–2022 The Apache Software Foundation. All rights reserved.