Package javax.constraints.extra

Examples of javax.constraints.extra.ConstraintElementAtOnSets.post()


   * @throws RuntimeException if the posting fails
   * @return a newly created constraint
   */
  public Constraint postElement(Set[] arrayOfSets, Var indexVar, String oper, VarSet setVar) {
    Constraint c = new ConstraintElementAtOnSets(setVar, arrayOfSets, indexVar);
    c.post();
    return c;
  }
 
//  /**
//   * This method is defined for Set[] similarly to the "elementAt" for int[].
View Full Code Here


    while (iter2.hasNext()) {
      values[u++] = ((Integer)iter2.next()).intValue();
    }
    VarSet setVar = variableSet("indexVarSet for "+indexVar.getName(), values);
    Constraint c = new ConstraintElementAtOnSets(setVar,sets,indexVar);
    c.post();
    return setVar;
  }
 
  /**
   * Returns the constant constraint that always will fail when it is posted or executed.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.