Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
IntervalVar.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.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
9package com.google.ortools.constraintsolver;
10
23public class IntervalVar extends PropagationBaseObject {
24 private transient long swigCPtr;
25
26 protected IntervalVar(long cPtr, boolean cMemoryOwn) {
27 super(mainJNI.IntervalVar_SWIGUpcast(cPtr), cMemoryOwn);
28 swigCPtr = cPtr;
29 }
30
31 protected static long getCPtr(IntervalVar obj) {
32 return (obj == null) ? 0 : obj.swigCPtr;
33 }
34
35 protected static long swigRelease(IntervalVar obj) {
36 long ptr = 0;
37 if (obj != null) {
38 if (!obj.swigCMemOwn)
39 throw new RuntimeException("Cannot release ownership as memory is not owned");
40 ptr = obj.swigCPtr;
41 obj.swigCMemOwn = false;
42 obj.delete();
43 }
44 return ptr;
45 }
46
47 @SuppressWarnings({"deprecation", "removal"})
48 protected void finalize() {
49 delete();
50 }
51
52 public synchronized void delete() {
53 if (swigCPtr != 0) {
54 if (swigCMemOwn) {
55 swigCMemOwn = false;
56 mainJNI.delete_IntervalVar(swigCPtr);
57 }
58 swigCPtr = 0;
59 }
60 super.delete();
61 }
62
66 public static long getKMinValidValue() {
67 return mainJNI.IntervalVar_kMinValidValue_get();
68 }
69
73 public static long getKMaxValidValue() {
74 return mainJNI.IntervalVar_kMaxValidValue_get();
75 }
76
81 public long startMin() {
82 return mainJNI.IntervalVar_startMin(swigCPtr, this);
83 }
84
85 public long startMax() {
86 return mainJNI.IntervalVar_startMax(swigCPtr, this);
87 }
88
89 public void setStartMin(long m) {
90 mainJNI.IntervalVar_setStartMin(swigCPtr, this, m);
91 }
92
93 public void setStartMax(long m) {
94 mainJNI.IntervalVar_setStartMax(swigCPtr, this, m);
95 }
96
97 public void setStartRange(long mi, long ma) {
98 mainJNI.IntervalVar_setStartRange(swigCPtr, this, mi, ma);
99 }
100
101 public long oldStartMin() {
102 return mainJNI.IntervalVar_oldStartMin(swigCPtr, this);
103 }
104
105 public long oldStartMax() {
106 return mainJNI.IntervalVar_oldStartMax(swigCPtr, this);
107 }
108
109 public void whenStartRange(Demon d) {
110 mainJNI.IntervalVar_whenStartRange__SWIG_0(swigCPtr, this, Demon.getCPtr(d), d);
111 }
112
113 public void whenStartRange(Runnable closure) {
114 mainJNI.IntervalVar_whenStartRange__SWIG_1(swigCPtr, this, closure);
115 }
116
117 public void whenStartBound(Demon d) {
118 mainJNI.IntervalVar_whenStartBound__SWIG_0(swigCPtr, this, Demon.getCPtr(d), d);
119 }
120
121 public void whenStartBound(Runnable closure) {
122 mainJNI.IntervalVar_whenStartBound__SWIG_1(swigCPtr, this, closure);
123 }
124
128 public long durationMin() {
129 return mainJNI.IntervalVar_durationMin(swigCPtr, this);
130 }
131
132 public long durationMax() {
133 return mainJNI.IntervalVar_durationMax(swigCPtr, this);
134 }
135
136 public void setDurationMin(long m) {
137 mainJNI.IntervalVar_setDurationMin(swigCPtr, this, m);
138 }
139
140 public void setDurationMax(long m) {
141 mainJNI.IntervalVar_setDurationMax(swigCPtr, this, m);
142 }
143
144 public void setDurationRange(long mi, long ma) {
145 mainJNI.IntervalVar_setDurationRange(swigCPtr, this, mi, ma);
146 }
147
148 public long oldDurationMin() {
149 return mainJNI.IntervalVar_oldDurationMin(swigCPtr, this);
150 }
151
152 public long oldDurationMax() {
153 return mainJNI.IntervalVar_oldDurationMax(swigCPtr, this);
154 }
155
156 public void whenDurationRange(Demon d) {
157 mainJNI.IntervalVar_whenDurationRange__SWIG_0(swigCPtr, this, Demon.getCPtr(d), d);
158 }
159
160 public void whenDurationRange(Runnable closure) {
161 mainJNI.IntervalVar_whenDurationRange__SWIG_1(swigCPtr, this, closure);
162 }
163
164 public void whenDurationBound(Demon d) {
165 mainJNI.IntervalVar_whenDurationBound__SWIG_0(swigCPtr, this, Demon.getCPtr(d), d);
166 }
167
168 public void whenDurationBound(Runnable closure) {
169 mainJNI.IntervalVar_whenDurationBound__SWIG_1(swigCPtr, this, closure);
170 }
171
175 public long endMin() {
176 return mainJNI.IntervalVar_endMin(swigCPtr, this);
177 }
178
179 public long endMax() {
180 return mainJNI.IntervalVar_endMax(swigCPtr, this);
181 }
182
183 public void setEndMin(long m) {
184 mainJNI.IntervalVar_setEndMin(swigCPtr, this, m);
185 }
186
187 public void setEndMax(long m) {
188 mainJNI.IntervalVar_setEndMax(swigCPtr, this, m);
189 }
190
191 public void setEndRange(long mi, long ma) {
192 mainJNI.IntervalVar_setEndRange(swigCPtr, this, mi, ma);
193 }
194
195 public long oldEndMin() {
196 return mainJNI.IntervalVar_oldEndMin(swigCPtr, this);
197 }
198
199 public long oldEndMax() {
200 return mainJNI.IntervalVar_oldEndMax(swigCPtr, this);
201 }
202
203 public void whenEndRange(Demon d) {
204 mainJNI.IntervalVar_whenEndRange__SWIG_0(swigCPtr, this, Demon.getCPtr(d), d);
205 }
206
207 public void whenEndRange(Runnable closure) {
208 mainJNI.IntervalVar_whenEndRange__SWIG_1(swigCPtr, this, closure);
209 }
210
211 public void whenEndBound(Demon d) {
212 mainJNI.IntervalVar_whenEndBound__SWIG_0(swigCPtr, this, Demon.getCPtr(d), d);
213 }
214
215 public void whenEndBound(Runnable closure) {
216 mainJNI.IntervalVar_whenEndBound__SWIG_1(swigCPtr, this, closure);
217 }
218
223 public boolean mustBePerformed() {
224 return mainJNI.IntervalVar_mustBePerformed(swigCPtr, this);
225 }
226
227 public boolean mayBePerformed() {
228 return mainJNI.IntervalVar_mayBePerformed(swigCPtr, this);
229 }
230
231 public boolean cannotBePerformed() {
232 return mainJNI.IntervalVar_cannotBePerformed(swigCPtr, this);
233 }
234
235 public boolean isPerformedBound() {
236 return mainJNI.IntervalVar_isPerformedBound(swigCPtr, this);
237 }
238
239 public void setPerformed(boolean val) {
240 mainJNI.IntervalVar_setPerformed(swigCPtr, this, val);
241 }
242
243 public boolean wasPerformedBound() {
244 return mainJNI.IntervalVar_wasPerformedBound(swigCPtr, this);
245 }
246
247 public void whenPerformedBound(Demon d) {
248 mainJNI.IntervalVar_whenPerformedBound__SWIG_0(swigCPtr, this, Demon.getCPtr(d), d);
249 }
250
251 public void whenPerformedBound(Runnable closure) {
252 mainJNI.IntervalVar_whenPerformedBound__SWIG_1(swigCPtr, this, closure);
253 }
254
258 public void whenAnything(Demon d) {
259 mainJNI.IntervalVar_whenAnything__SWIG_0(swigCPtr, this, Demon.getCPtr(d), d);
260 }
261
265 public void whenAnything(Runnable closure) {
266 mainJNI.IntervalVar_whenAnything__SWIG_1(swigCPtr, this, closure);
267 }
268
275 long cPtr = mainJNI.IntervalVar_startExpr(swigCPtr, this);
276 return (cPtr == 0) ? null : new IntExpr(cPtr, false);
277 }
278
280 long cPtr = mainJNI.IntervalVar_durationExpr(swigCPtr, this);
281 return (cPtr == 0) ? null : new IntExpr(cPtr, false);
282 }
283
284 public IntExpr endExpr() {
285 long cPtr = mainJNI.IntervalVar_endExpr(swigCPtr, this);
286 return (cPtr == 0) ? null : new IntExpr(cPtr, false);
287 }
288
290 long cPtr = mainJNI.IntervalVar_performedExpr(swigCPtr, this);
291 return (cPtr == 0) ? null : new IntExpr(cPtr, false);
292 }
293
299 public IntExpr safeStartExpr(long unperformed_value) {
300 long cPtr = mainJNI.IntervalVar_safeStartExpr(swigCPtr, this, unperformed_value);
301 return (cPtr == 0) ? null : new IntExpr(cPtr, false);
302 }
303
304 public IntExpr safeDurationExpr(long unperformed_value) {
305 long cPtr = mainJNI.IntervalVar_safeDurationExpr(swigCPtr, this, unperformed_value);
306 return (cPtr == 0) ? null : new IntExpr(cPtr, false);
307 }
308
309 public IntExpr safeEndExpr(long unperformed_value) {
310 long cPtr = mainJNI.IntervalVar_safeEndExpr(swigCPtr, this, unperformed_value);
311 return (cPtr == 0) ? null : new IntExpr(cPtr, false);
312 }
313
317 public void accept(ModelVisitor visitor) {
318 mainJNI.IntervalVar_accept(swigCPtr, this, ModelVisitor.getCPtr(visitor), visitor);
319 }
320
321}
IntervalVar(long cPtr, boolean cMemoryOwn)
IntExpr safeEndExpr(long unperformed_value)
IntExpr safeDurationExpr(long unperformed_value)
IntExpr safeStartExpr(long unperformed_value)