# Package org.apache.uima.fit.util

Utility classes like `CasUtil` and `JCasUtil`.

See: Description

- Class Summary
  Class | Description
  --- | ---
  CasIOUtil | Deprecated Since UIMA 2.9.0 the core class `CasIOUtils` should be used.
  CasUtil | Utility methods for convenient access to the `CAS`.
  ContainmentIndex<S extends AnnotationFS,U extends AnnotationFS> | Create a fast way of repeatedly checking whether instances of one type are contained within the boundaries on another type.
  FSCollectionFactory | Bridge between Java `Collections` from different representations of collections of UIMA `FeatureStructures`.
  FSUtil |
  JCasUtil | Utility methods for convenient access to the `JCas`.
  LifeCycleUtil | Helper methods to handle the life cycle of UIMA components.
  LocaleUtil |
  SimpleNamedResourceManager | EXPERIMENTAL CODE

- Enum Summary
  Enum | Description
  --- | ---
  ContainmentIndex.Type |

## Package org.apache.uima.fit.util Description

Utility classes like `CasUtil` and `JCasUtil`.

## Sort order

The various select methods in `CasUtil` and `JCasUtil` rely on the UIMA feature structure indexes. Their behaviour differs depending on the type of feature structure being selected and where they are selected from:

## Selecting from a `CAS`/`JCas`

1. Annotations - if the type being selected is `Annotation` or a sub-type thereof, the built-in annotation index is used. This index has the keys begin (Ascending), end (Descending) and TYPE_PRIORITY. There are no built-in type priorities, so this last sort item does not play a role in the index unless type priorities are specified. uimaFIT uses `CAS.getAnnotationIndex(org.apache.uima.cas.Type)` to access annotation feature structures.
2. Other feature structures - if feature structures are selected that are not `annotations`, the order should be considered undefined. uimaFIT uses `FSIndexRepository.getAllIndexedFS(org.apache.uima.cas.Type)` to access these feature structures.

## Selecting from a `ArrayFS/FSArray`/`FSList`

When selecting from a feature structure list or array, the order is determined by the order of the annotations inside the list/array.

Copyright © 2012–2021 The Apache Software Foundation. All rights reserved.