Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
BooleanVar.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
11public class BooleanVar extends IntVar {
12 private transient long swigCPtr;
13
14 protected BooleanVar(long cPtr, boolean cMemoryOwn) {
15 super(mainJNI.BooleanVar_SWIGUpcast(cPtr), cMemoryOwn);
16 swigCPtr = cPtr;
17 }
18
19 protected static long getCPtr(BooleanVar obj) {
20 return (obj == null) ? 0 : obj.swigCPtr;
21 }
22
23 protected static long swigRelease(BooleanVar obj) {
24 long ptr = 0;
25 if (obj != null) {
26 if (!obj.swigCMemOwn)
27 throw new RuntimeException("Cannot release ownership as memory is not owned");
28 ptr = obj.swigCPtr;
29 obj.swigCMemOwn = false;
30 obj.delete();
31 }
32 return ptr;
33 }
34
35 @SuppressWarnings({"deprecation", "removal"})
36 protected void finalize() {
37 delete();
38 }
39
40 public synchronized void delete() {
41 if (swigCPtr != 0) {
42 if (swigCMemOwn) {
43 swigCMemOwn = false;
44 mainJNI.delete_BooleanVar(swigCPtr);
45 }
46 swigCPtr = 0;
47 }
48 super.delete();
49 }
50
51 public static int getKUnboundBooleanVarValue() {
52 return mainJNI.BooleanVar_kUnboundBooleanVarValue_get();
53 }
54
55 public long min() {
56 return mainJNI.BooleanVar_min(swigCPtr, this);
57 }
58
59 public void setMin(long m) {
60 mainJNI.BooleanVar_setMin(swigCPtr, this, m);
61 }
62
63 public long max() {
64 return mainJNI.BooleanVar_max(swigCPtr, this);
65 }
66
67 public void setMax(long m) {
68 mainJNI.BooleanVar_setMax(swigCPtr, this, m);
69 }
70
71 public void setRange(long mi, long ma) {
72 mainJNI.BooleanVar_setRange(swigCPtr, this, mi, ma);
73 }
74
75 public boolean bound() {
76 return mainJNI.BooleanVar_bound(swigCPtr, this);
77 }
78
79 public long value() {
80 return mainJNI.BooleanVar_value(swigCPtr, this);
81 }
82
83 public void removeValue(long v) {
84 mainJNI.BooleanVar_removeValue(swigCPtr, this, v);
85 }
86
87 public void removeInterval(long l, long u) {
88 mainJNI.BooleanVar_removeInterval(swigCPtr, this, l, u);
89 }
90
91 public void whenBound(Demon d) {
92 mainJNI.BooleanVar_whenBound(swigCPtr, this, Demon.getCPtr(d), d);
93 }
94
95 public void whenRange(Demon d) {
96 mainJNI.BooleanVar_whenRange(swigCPtr, this, Demon.getCPtr(d), d);
97 }
98
99 public void whenDomain(Demon d) {
100 mainJNI.BooleanVar_whenDomain(swigCPtr, this, Demon.getCPtr(d), d);
101 }
102
103 public long size() {
104 return mainJNI.BooleanVar_size(swigCPtr, this);
105 }
106
107 public boolean contains(long v) {
108 return mainJNI.BooleanVar_contains(swigCPtr, this, v);
109 }
110
111 public IntVarIterator makeHoleIterator(boolean reversible) {
112 long cPtr = mainJNI.BooleanVar_makeHoleIterator(swigCPtr, this, reversible);
113 return (cPtr == 0) ? null : new IntVarIterator(cPtr, false);
114 }
115
116 public IntVarIterator makeDomainIterator(boolean reversible) {
117 long cPtr = mainJNI.BooleanVar_makeDomainIterator(swigCPtr, this, reversible);
118 return (cPtr == 0) ? null : new IntVarIterator(cPtr, false);
119 }
120
121 public String toString() {
122 return mainJNI.BooleanVar_toString(swigCPtr, this);
123 }
124
125 public int varType() {
126 return mainJNI.BooleanVar_varType(swigCPtr, this);
127 }
128
129 public IntVar isEqual(long constant) {
130 long cPtr = mainJNI.BooleanVar_isEqual(swigCPtr, this, constant);
131 return (cPtr == 0) ? null : new IntVar(cPtr, false);
132 }
133
134 public IntVar isDifferent(long constant) {
135 long cPtr = mainJNI.BooleanVar_isDifferent(swigCPtr, this, constant);
136 return (cPtr == 0) ? null : new IntVar(cPtr, false);
137 }
138
139 public IntVar isGreaterOrEqual(long constant) {
140 long cPtr = mainJNI.BooleanVar_isGreaterOrEqual(swigCPtr, this, constant);
141 return (cPtr == 0) ? null : new IntVar(cPtr, false);
142 }
143
144 public IntVar isLessOrEqual(long constant) {
145 long cPtr = mainJNI.BooleanVar_isLessOrEqual(swigCPtr, this, constant);
146 return (cPtr == 0) ? null : new IntVar(cPtr, false);
147 }
148
149 public void restoreValue() {
150 mainJNI.BooleanVar_restoreValue(swigCPtr, this);
151 }
152
153 public String baseName() {
154 return mainJNI.BooleanVar_baseName(swigCPtr, this);
155 }
156
157 public int rawValue() {
158 return mainJNI.BooleanVar_rawValue(swigCPtr, this);
159 }
160
161}
IntVarIterator makeHoleIterator(boolean reversible)
BooleanVar(long cPtr, boolean cMemoryOwn)
IntVarIterator makeDomainIterator(boolean reversible)
IntVar(long cPtr, boolean cMemoryOwn)
Definition IntVar.java:19