## org.eclipse.jst.jsf.common.sets.constraint
Class AbstractSetConstraint

    java.lang.Object
      org.eclipse.jst.jsf.common.sets.constraint.AbstractSetConstraint

Direct Known Subclasses:
  AbstractMemberConstraint, MemberConstraint

    public abstract class AbstractSetConstraint

extends java.lang.Object

Super-class of all axiomatic set constraints. A set constraint applies one or more pre-conditions on a set and returns a diagnostic that flags whether or not the set satisfies that constraint or not.

Provisional API - subject to change

Constructor Summary
`AbstractSetConstraint()`

Method Summary
`boolean` `failsConstraint(AxiomaticSet set)` Convenience method

`abstract Diagnostic`

`isSatisfied(AxiomaticSet set)`
The following post-conditions must hold: 1) if the set satisfies the constraint with no caveats, the returned diagnostic must in turn satisfy Diagnostic.getSeverity() == Diagnostic.OK 2) if the set does not satisfy the constraint, the returned diagnostic must satisfy Diagnostic.getSeverity() == Diagnostic.ERROR 3) if the set strictly satisfies the constraint but the constraint includes parameters that can only be heuristically applied, the constraint may choose to return a diagnostic where Diagnostic.getSeverity() == Diagnostic.WARNING The diagnostic returned should _never_ have any other severity but OK, ERROR or WARNING Algorithmically: Constraint is satisfied can be tested by Diagnostic.getSeverity() !

`boolean` `passesConstraint(AxiomaticSet set)` Convenience method

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AbstractSetConstraint

    public AbstractSetConstraint()

Method Detail

### isSatisfied

    public abstract Diagnostic isSatisfied(AxiomaticSet set)

  The following post-conditions must hold: 1) if the set satisfies the constraint with no caveats, the returned diagnostic must in turn satisfy Diagnostic.getSeverity() == Diagnostic.OK 2) if the set does not satisfy the constraint, the returned diagnostic must satisfy Diagnostic.getSeverity() == Diagnostic.ERROR 3) if the set strictly satisfies the constraint but the constraint includes parameters that can only be heuristically applied, the constraint may choose to return a diagnostic where Diagnostic.getSeverity() == Diagnostic.WARNING The diagnostic returned should _never_ have any other severity but OK, ERROR or WARNING Algorithmically: Constraint is satisfied can be tested by Diagnostic.getSeverity() != ERROR Constraint is not satisfied can be tested by Diagnostic.getSeverity() == ERROR

  Parameters:
    `set` -
  Returns:
    a diagnostic object that contains information about whether or not the constraint is satisfied for set. MUST NOT RETURN NULL

### passesConstraint

    public final boolean passesConstraint(AxiomaticSet set)

  Convenience method

  Parameters:
    `set` -
  Returns:
    true if the constraint is satisfied for set

### failsConstraint

    public final boolean failsConstraint(AxiomaticSet set)

  Convenience method

  Parameters:
    `set` -
  Returns:
    true if the constraint is not satisfied for set