All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.exigen.ie.constrainer.Constraint Maven / Gradle / Ivy

package com.exigen.ie.constrainer;

///////////////////////////////////////////////////////////////////////////////
/*
 * Copyright Exigen Group 1998, 1999, 2000
 * 320 Amboy Ave., Metuchen, NJ, 08840, USA, www.exigengroup.com
 *
 * The copyright to the computer program(s) herein
 * is the property of Exigen Group, USA. All rights reserved.
 * The program(s) may be used and/or copied only with
 * the written permission of Exigen Group
 * or in accordance with the terms and conditions
 * stipulated in the agreement/contract under which
 * the program(s) have been supplied.
 */
///////////////////////////////////////////////////////////////////////////////

/**
 * The interface for constraints.
 * 

* Any implementaion of constraint should: *

    *
  • save in its constructor the expressions on which this constraint imposed. *
  • apply in {@link #execute()} the condition of this constraint to the expressions. *
* * @see Goal * @see ConstraintImpl */ public interface Constraint extends Goal { /** * Makes the constraint active. * * @throws Failure if the constraint can not be satisfied. */ public void post() throws Failure; /** * Returns a constraint: (NOT this). * An opposite constraint has semantically an opposite meaning to this constraint. */ public Constraint opposite(); /** * Returns a constraint: (this AND constraint). * This constraint is satisfied only * when both the invoked constraint and the parameter-constraint are satisfied. * 'And' condition has straightforward implementation for the constraints even * in the minimal requirements to the interface Constraint. */ public Constraint and(Constraint constraint); // /** // * * to be hidden * // * Returns a constraint: (this OR constraint). // * This constraint is satisfied only // * either the invoked constraint or the parameter-constraint is satisfied. // */ // public Constraint or(Constraint constraint); // // /** // * * to be hidden * // * Returns a constraint satisfying the condition: // * if this constraint is true, then the "constraint" should be true. // */ // public Constraint ifThen(Constraint constraint); // // /** // * * to be hidden * // * Returns a constraint satisfying the condition: // * if this "constraint" is true, then "constraint1" else "constraint2" // */ // public Constraint ifThenElse(Constraint constraint1, Constraint constraint2); public IntBoolExp toIntBoolExp(); public boolean isLinear(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy