Java Reference

Java Reference

PropagationBaseObject.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.2
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
17public class PropagationBaseObject extends BaseObject {
18 private transient long swigCPtr;
19
20 protected PropagationBaseObject(long cPtr, boolean cMemoryOwn) {
21 super(mainJNI.PropagationBaseObject_SWIGUpcast(cPtr), cMemoryOwn);
22 swigCPtr = cPtr;
23 }
24
25 protected static long getCPtr(PropagationBaseObject obj) {
26 return (obj == null) ? 0 : obj.swigCPtr;
27 }
28
29 @SuppressWarnings("deprecation")
30 protected void finalize() {
31 delete();
32 }
33
34 public synchronized void delete() {
35 if (swigCPtr != 0) {
36 if (swigCMemOwn) {
37 swigCMemOwn = false;
38 mainJNI.delete_PropagationBaseObject(swigCPtr);
39 }
40 swigCPtr = 0;
41 }
42 super.delete();
43 }
44
46 this(mainJNI.new_PropagationBaseObject(Solver.getCPtr(s), s), true);
47 }
48
49 public String toString() {
50 return mainJNI.PropagationBaseObject_toString(swigCPtr, this);
51 }
52
53 public Solver solver() {
54 long cPtr = mainJNI.PropagationBaseObject_solver(swigCPtr, this);
55 return (cPtr == 0) ? null : new Solver(cPtr, false);
56 }
57
62 public void freezeQueue() {
63 mainJNI.PropagationBaseObject_freezeQueue(swigCPtr, this);
64 }
65
70 public void unfreezeQueue() {
71 mainJNI.PropagationBaseObject_unfreezeQueue(swigCPtr, this);
72 }
73
79 public void enqueueDelayedDemon(Demon d) {
80 mainJNI.PropagationBaseObject_enqueueDelayedDemon(swigCPtr, this, Demon.getCPtr(d), d);
81 }
82
83 public void enqueueVar(Demon d) {
84 mainJNI.PropagationBaseObject_enqueueVar(swigCPtr, this, Demon.getCPtr(d), d);
85 }
86
90 public void reset_action_on_fail() {
91 mainJNI.PropagationBaseObject_reset_action_on_fail(swigCPtr, this);
92 }
93
98 mainJNI.PropagationBaseObject_set_variable_to_clean_on_fail(swigCPtr, this, IntVar.getCPtr(v), v);
99 }
100
104 public String name() {
105 return mainJNI.PropagationBaseObject_name(swigCPtr, this);
106 }
107
108 public void setName(String name) {
109 mainJNI.PropagationBaseObject_setName(swigCPtr, this, name);
110 }
111
115 public boolean hasName() {
116 return mainJNI.PropagationBaseObject_hasName(swigCPtr, this);
117 }
118
122 public String baseName() {
123 return mainJNI.PropagationBaseObject_baseName(swigCPtr, this);
124 }
125
126}
A BaseObject is the root of all reversibly allocated objects.
Definition: BaseObject.java:16
A Demon is the base element of a propagation queue.
Definition: Demon.java:22
NOLINT The PropagationBaseObject is a subclass of BaseObject that is also friend to the Solver clas...
void unfreezeQueue()
This method unfreezes the propagation queue.
void reset_action_on_fail()
This method clears the failure callback.
String baseName()
Returns a base name for automatic naming.
boolean hasName()
Returns whether the object has been named or not.
void enqueueDelayedDemon(Demon d)
This method pushes the demon onto the propagation queue.
void freezeQueue()
This method freezes the propagation queue.
void set_variable_to_clean_on_fail(IntVar v)
Shortcut for variable cleaner.
Solver Class A solver represents the main computation engine.
Definition: Solver.java:73