Class KConstraintArray

java.lang.Object
com.artelys.kalis.constraintlist
com.artelys.kalis.KConstraintArray

public class KConstraintArray extends com.artelys.kalis.constraintlist
This class implements an array of KConstraint

Example :

KIntVarArray TAB(...)
KIntVar X(...)
KIntVar Y(...)
KIntVar Z(...)
KConstraintArray constraintArray;

constraintArray += KAllDifferent("alldiff(TAB)",TAB);
constraintArray += X == Y + 2:
constraintArray += (Y < 6) || (Z + 4 == X)s


Since:
2016.1
See Also:
KConstraint

  • Field Summary

    Fields inherited from class com.artelys.kalis.constraintlist

    swigCMemOwn
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    Default Constructor
     
    KConstraintArray​(int nbElements)
    Constructor
    protected
    KConstraintArray​(long cPtr, boolean cMemoryOwn)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected void
     
    protected static long
     

    Methods inherited from class com.artelys.kalis.constraintlist

    add, add, check, emptyAndDelete, getCopyPtr, getCPtr, getElt, getNumberOfElements, initializeAsEmptyList, initializeListWithVa_list, insert, insert, isEmpty, makeList, print, removeLastElement, replace, replace

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • KConstraintArray

      protected KConstraintArray(long cPtr, boolean cMemoryOwn)
    • KConstraintArray

      public KConstraintArray()
      Default Constructor
    • KConstraintArray

      public KConstraintArray(int nbElements)
      Constructor
  • Method Details

    • getCPtr

      protected static long getCPtr(KConstraintArray obj)
    • finalize

      protected void finalize()
      Overrides:
      finalize in class com.artelys.kalis.constraintlist
    • delete

      public void delete()
      Overrides:
      delete in class com.artelys.kalis.constraintlist