Class TypeCache.ConstraintTemplate

  • Enclosing class:
    TypeCache

    private class TypeCache.ConstraintTemplate
    extends java.lang.Object
    Represents a constraint template with related constraint set to add the constraint to.
    Author:
    Holger Eichelberger
    • Field Detail

      • first

        private boolean first
      • register

        private boolean register
    • Constructor Detail

      • ConstraintTemplate

        private ConstraintTemplate​(ConstraintList target,
                                   boolean first,
                                   Constraint constraint,
                                   boolean register)
        Creates the constraint template.
        Parameters:
        target - the target constraint set
        first - add to front or to end
        constraint - the constraint
        register - the constraint with the VariablesMap
    • Method Detail

      • transfer

        private void transfer​(TypeCache.IConstraintTarget target,
                              IDecisionVariable register,
                              AbstractVariable var,
                              AbstractVariable self)
        Transfers the stored constraint into the context of self.
        Parameters:
        target - the target constraint set
        register - the decision variable to register with (may be null for none)
        var - the original (template) variable
        self - the new variable