org.apache.uima.cas

## Interface FSBooleanConstraint

- All Superinterfaces:
    FSConstraint, Serializable

      public interface FSBooleanConstraint
      extends FSConstraint

  Interface for a boolean constraint. A boolean constraint contains a single condition, either true or false. To set the condition, use

  To use the constraint, invoke its `match(boolean)` method, passing the value to test. You can also embed this test with a path specification, using the `ConstraintFactory.embedConstraint(FeaturePath, FSConstraint)` method, and use it to test feature structures, or combine it with other tests using the `ConstraintFactory.and(FSMatchConstraint, FSMatchConstraint)` and `ConstraintFactory.or(FSMatchConstraint, FSMatchConstraint)` methods.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `eq(boolean condition)` Set the constraint.
    `boolean` | `match(boolean condition)` Check the condition.

- - ### Method Detail

    - #### eq

          void eq(boolean condition)

      Set the constraint.
      Parameters:
        `condition` - The condition that needs to be matched to satisfy the constraint.

    - #### match

          boolean match(boolean condition)

      Check the condition.
      Parameters:
        `condition` - Value to compare with the condition.
      Returns:
        True if value and constraint are equal, false else.

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