Demon.java
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 4.0.0
4  *
5  * Do not make changes to this file unless you know what you are doing--modify
6  * the SWIG interface file instead.
7  * ----------------------------------------------------------------------------- */
8 
9 package com.google.ortools.constraintsolver;
10 
11 public class Demon extends BaseObject {
12  private transient long swigCPtr;
13 
14  protected Demon(long cPtr, boolean cMemoryOwn) {
15  super(mainJNI.Demon_SWIGUpcast(cPtr), cMemoryOwn);
16  swigCPtr = cPtr;
17  }
18 
19  protected static long getCPtr(Demon obj) {
20  return (obj == null) ? 0 : obj.swigCPtr;
21  }
22 
23  @SuppressWarnings("deprecation")
24  protected void finalize() {
25  delete();
26  }
27 
28  public synchronized void delete() {
29  if (swigCPtr != 0) {
30  if (swigCMemOwn) {
31  swigCMemOwn = false;
32  mainJNI.delete_Demon(swigCPtr);
33  }
34  swigCPtr = 0;
35  }
36  super.delete();
37  }
38 
39  public void run(Solver s) {
40  mainJNI.Demon_run(swigCPtr, this, Solver.getCPtr(s), s);
41  }
42 
43  public int priority() {
44  return mainJNI.Demon_priority(swigCPtr, this);
45  }
46 
47  public String toString() {
48  return mainJNI.Demon_toString(swigCPtr, this);
49  }
50 
51  public void inhibit(Solver s) {
52  mainJNI.Demon_inhibit(swigCPtr, this, Solver.getCPtr(s), s);
53  }
54 
55  public void desinhibit(Solver s) {
56  mainJNI.Demon_desinhibit(swigCPtr, this, Solver.getCPtr(s), s);
57  }
58 
59 }
Demon(long cPtr, boolean cMemoryOwn)
Definition: Demon.java:14