Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
Demon.java
Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (https://www.swig.org).
3 * Version 4.2.1
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
9package com.google.ortools.constraintsolver;
10
22public class Demon extends BaseObject {
23 private transient long swigCPtr;
24
25 protected Demon(long cPtr, boolean cMemoryOwn) {
26 super(mainJNI.Demon_SWIGUpcast(cPtr), cMemoryOwn);
27 swigCPtr = cPtr;
28 }
29
30 protected static long getCPtr(Demon obj) {
31 return (obj == null) ? 0 : obj.swigCPtr;
32 }
33
34 protected static long swigRelease(Demon obj) {
35 long ptr = 0;
36 if (obj != null) {
37 if (!obj.swigCMemOwn)
38 throw new RuntimeException("Cannot release ownership as memory is not owned");
39 ptr = obj.swigCPtr;
40 obj.swigCMemOwn = false;
41 obj.delete();
42 }
43 return ptr;
44 }
45
46 @SuppressWarnings({"deprecation", "removal"})
47 protected void finalize() {
48 delete();
49 }
50
51 public synchronized void delete() {
52 if (swigCPtr != 0) {
53 if (swigCMemOwn) {
54 swigCMemOwn = false;
55 mainJNI.delete_Demon(swigCPtr);
56 }
57 swigCPtr = 0;
58 }
59 super.delete();
60 }
61
65 public void run(Solver s) {
66 mainJNI.Demon_run(swigCPtr, this, Solver.getCPtr(s), s);
67 }
68
74 public int priority() {
75 return mainJNI.Demon_priority(swigCPtr, this);
76 }
77
78 public String toString() {
79 return mainJNI.Demon_toString(swigCPtr, this);
80 }
81
86 public void inhibit(Solver s) {
87 mainJNI.Demon_inhibit(swigCPtr, this, Solver.getCPtr(s), s);
88 }
89
93 public void desinhibit(Solver s) {
94 mainJNI.Demon_desinhibit(swigCPtr, this, Solver.getCPtr(s), s);
95 }
96
97}
static long swigRelease(Demon obj)
Definition Demon.java:34
Demon(long cPtr, boolean cMemoryOwn)
Definition Demon.java:25