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

com.google.ortools.constraintsolver.Demon Maven / Gradle / Ivy

The newest version!
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 3.0.10
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.google.ortools.constraintsolver;

public class Demon extends BaseObject {
  private transient long swigCPtr;

  protected Demon(long cPtr, boolean cMemoryOwn) {
    super(operations_research_constraint_solverJNI.Demon_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  protected static long getCPtr(Demon obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        operations_research_constraint_solverJNI.delete_Demon(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public void Run(Solver s) {
    operations_research_constraint_solverJNI.Demon_Run(swigCPtr, this, Solver.getCPtr(s), s);
  }

  public int priority() {
    return operations_research_constraint_solverJNI.Demon_priority(swigCPtr, this);
  }

  public String toString() {
    return operations_research_constraint_solverJNI.Demon_toString(swigCPtr, this);
  }

  public void inhibit(Solver s) {
    operations_research_constraint_solverJNI.Demon_inhibit(swigCPtr, this, Solver.getCPtr(s), s);
  }

  public void desinhibit(Solver s) {
    operations_research_constraint_solverJNI.Demon_desinhibit(swigCPtr, this, Solver.getCPtr(s), s);
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy