net.percederberg.mibble.type

## Interface Constraint

- All Known Implementing Classes:
    CompoundConstraint, SizeConstraint, ValueConstraint, ValueRangeConstraint

      public interface Constraint

  A MIB type constraint.
  Since:
    2.0

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `initialize(MibType type, MibLoaderLog log)` Initializes the constraint.
    `boolean` | `isCompatible(MibType type)` Checks if the specified type is compatible with this constraint.
    `boolean` | `isCompatible(MibValue value)` Checks if the specified value is compatible with this constraint.

- - ### Method Detail

    - #### initialize

          void initialize(MibType type,
                        MibLoaderLog log)
                          throws MibException

      Initializes the constraint. This will remove all levels of indirection present, such as references to types or values. No constraint information is lost by this operation. This method may modify this object as a side-effect, and will be called by the MIB loader.
      Parameters:
        `type` - the type to constrain
        `log` - the MIB loader log
      Throws:
        `MibException` - if an error was encountered during the initialization

    - #### isCompatible

          boolean isCompatible(MibType type)

      Checks if the specified type is compatible with this constraint.
      Parameters:
        `type` - the type to check
      Returns:
        true if the type is compatible, or false otherwise

    - #### isCompatible

          boolean isCompatible(MibValue value)

      Checks if the specified value is compatible with this constraint.
      Parameters:
        `value` - the value to check
      Returns:
        true if the value is compatible, or false otherwise