BooleanVar.java
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 3.0.12
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 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 void finalize() {
24  delete();
25  }
26 
27  public synchronized void delete() {
28  if (swigCPtr != 0) {
29  if (swigCMemOwn) {
30  swigCMemOwn = false;
31  mainJNI.delete_BooleanVar(swigCPtr);
32  }
33  swigCPtr = 0;
34  }
35  super.delete();
36  }
37 
38  public static int getKUnboundBooleanVarValue() {
39  return mainJNI.BooleanVar_kUnboundBooleanVarValue_get();
40  }
41 
42  public long min() {
43  return mainJNI.BooleanVar_min(swigCPtr, this);
44  }
45 
46  public void setMin(long m) {
47  mainJNI.BooleanVar_setMin(swigCPtr, this, m);
48  }
49 
50  public long max() {
51  return mainJNI.BooleanVar_max(swigCPtr, this);
52  }
53 
54  public void setMax(long m) {
55  mainJNI.BooleanVar_setMax(swigCPtr, this, m);
56  }
57 
58  public void setRange(long mi, long ma) {
59  mainJNI.BooleanVar_setRange(swigCPtr, this, mi, ma);
60  }
61 
62  public boolean bound() {
63  return mainJNI.BooleanVar_bound(swigCPtr, this);
64  }
65 
66  public long value() {
67  return mainJNI.BooleanVar_value(swigCPtr, this);
68  }
69 
70  public void removeValue(long v) {
71  mainJNI.BooleanVar_removeValue(swigCPtr, this, v);
72  }
73 
74  public void removeInterval(long l, long u) {
75  mainJNI.BooleanVar_removeInterval(swigCPtr, this, l, u);
76  }
77 
78  public void whenBound(Demon d) {
79  mainJNI.BooleanVar_whenBound(swigCPtr, this, Demon.getCPtr(d), d);
80  }
81 
82  public void whenRange(Demon d) {
83  mainJNI.BooleanVar_whenRange(swigCPtr, this, Demon.getCPtr(d), d);
84  }
85 
86  public void whenDomain(Demon d) {
87  mainJNI.BooleanVar_whenDomain(swigCPtr, this, Demon.getCPtr(d), d);
88  }
89 
90  public java.math.BigInteger size() {
91  return mainJNI.BooleanVar_size(swigCPtr, this);
92  }
93 
94  public boolean contains(long v) {
95  return mainJNI.BooleanVar_contains(swigCPtr, this, v);
96  }
97 
98  public IntVarIterator makeHoleIterator(boolean reversible) {
99  long cPtr = mainJNI.BooleanVar_makeHoleIterator(swigCPtr, this, reversible);
100  return (cPtr == 0) ? null : new IntVarIterator(cPtr, false);
101  }
102 
103  public IntVarIterator makeDomainIterator(boolean reversible) {
104  long cPtr = mainJNI.BooleanVar_makeDomainIterator(swigCPtr, this, reversible);
105  return (cPtr == 0) ? null : new IntVarIterator(cPtr, false);
106  }
107 
108  public String toString() {
109  return mainJNI.BooleanVar_toString(swigCPtr, this);
110  }
111 
112  public int varType() {
113  return mainJNI.BooleanVar_varType(swigCPtr, this);
114  }
115 
116  public IntVar isEqual(long constant) {
117  long cPtr = mainJNI.BooleanVar_isEqual(swigCPtr, this, constant);
118  return (cPtr == 0) ? null : new IntVar(cPtr, false);
119  }
120 
121  public IntVar isDifferent(long constant) {
122  long cPtr = mainJNI.BooleanVar_isDifferent(swigCPtr, this, constant);
123  return (cPtr == 0) ? null : new IntVar(cPtr, false);
124  }
125 
126  public IntVar isGreaterOrEqual(long constant) {
127  long cPtr = mainJNI.BooleanVar_isGreaterOrEqual(swigCPtr, this, constant);
128  return (cPtr == 0) ? null : new IntVar(cPtr, false);
129  }
130 
131  public IntVar isLessOrEqual(long constant) {
132  long cPtr = mainJNI.BooleanVar_isLessOrEqual(swigCPtr, this, constant);
133  return (cPtr == 0) ? null : new IntVar(cPtr, false);
134  }
135 
136  public void restoreValue() {
137  mainJNI.BooleanVar_restoreValue(swigCPtr, this);
138  }
139 
140  public String baseName() {
141  return mainJNI.BooleanVar_baseName(swigCPtr, this);
142  }
143 
144  public int rawValue() {
145  return mainJNI.BooleanVar_rawValue(swigCPtr, this);
146  }
147 
148 }
static long getCPtr(Demon obj)
Definition: Demon.java:19
IntVarIterator makeDomainIterator(boolean reversible)
BooleanVar(long cPtr, boolean cMemoryOwn)
Definition: BooleanVar.java:14
IntVarIterator makeHoleIterator(boolean reversible)
Definition: BooleanVar.java:98