org.apache.uima.cas.admin

## Interface LinearTypeOrder

- All Known Implementing Classes:
    LinearTypeOrderBuilderImpl.TotalTypeOrder

      public interface LinearTypeOrder

  Linear order on types.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(FeatureStructure fs1, FeatureStructure fs2)` Compare two Feature Structure's types
    `int[]` | `getOrder()`
    `boolean` | `isEmptyTypeOrder()`
    `boolean` | `lessThan(int t1, int t2)` Compare two types.
    `boolean` | `lessThan(Type t1, Type t2)` Compare two types.

- - ### Method Detail

    - #### lessThan

          boolean lessThan(Type t1,
                           Type t2)

      Compare two types.
      Parameters:
        `t1` - type to compare
        `t2` - type to compare
      Returns:
        `true` iff `t1` is less than `t2` in this order.

    - #### lessThan

          boolean lessThan(int t1,
                           int t2)

      Compare two types.
      Parameters:
        `t1` - type to compare
        `t2` - type to compare
      Returns:
        `true` iff `t1` is less than `t2` in this order.

    - #### compare

          int compare(FeatureStructure fs1,
                      FeatureStructure fs2)

      Compare two Feature Structure's types
      Parameters:
        `fs1` - first Feature Structure
        `fs2` - second Feature Structure
      Returns:
        same as compare functions: -1 if fs1's type < fs2's type, etc.

    - #### getOrder

          int[] getOrder()

      Returns:
        The type order as array of type codes in ascending order.

    - #### isEmptyTypeOrder

          boolean isEmptyTypeOrder()

      Returns:
        true if there is no type order defined for this pipeline

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