Package org.apache.uima.cas

# Interface FSTypeConstraint

All Superinterfaces:
  `FSConstraint`, `FSMatchConstraint`, `Serializable`

public interface FSTypeConstraint extends FSMatchConstraint
Interface for type constraint. Tests if a feature structure is a subtype of a given type (or types).

You can add as many types to this constraint as you like. If you add more than one type, they will be interpreted disjunctively; i.e., the constraint will match any feature structure whose type is subsumed by one of the types of the constraint.

these constraints may be embedded in a path, or combined using and/or operators.

To use the constraint, invoke its `FSMatchConstraint.match(FeatureStructure)` method, passing the feature structure to test.

You can also use these constraints to construct a `CAS.createFilteredIterator(FSIterator, FSMatchConstraint)`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `add(String type)`
  Add a new type to this type constraint.
  `void`
  `add(Type type)`
  Add a new type to this type constraint.

  ### Methods inherited from interface org.apache.uima.cas.FSMatchConstraint

  `match`

- ## Method Details

  - ### add

    void add(Type type)
    Add a new type to this type constraint. This method can be called more than once. Multiple types will be interpreted disjunctively.
    Parameters:
      `type` - A type that should be permitted by this constraint.

  - ### add

    void add(String type)
    Add a new type to this type constraint. This method can be called more than once. Multiple types will be interpreted disjunctively.
    Parameters:
      `type` - A fully qualified type name that should be permitted by this constraint.