Java Reference

Java Reference

IntExpr.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.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 
9 package com.google.ortools.constraintsolver;
10 
11 public class IntExpr extends PropagationBaseObject {
12  private transient long swigCPtr;
13 
14  protected IntExpr(long cPtr, boolean cMemoryOwn) {
15  super(mainJNI.IntExpr_SWIGUpcast(cPtr), cMemoryOwn);
16  swigCPtr = cPtr;
17  }
18 
19  protected static long getCPtr(IntExpr obj) {
20  return (obj == null) ? 0 : obj.swigCPtr;
21  }
22 
23  @SuppressWarnings("deprecation")
24  protected void finalize() {
25  delete();
26  }
27 
28  public synchronized void delete() {
29  if (swigCPtr != 0) {
30  if (swigCMemOwn) {
31  swigCMemOwn = false;
32  mainJNI.delete_IntExpr(swigCPtr);
33  }
34  swigCPtr = 0;
35  }
36  super.delete();
37  }
38 
39  public long min() {
40  return mainJNI.IntExpr_min(swigCPtr, this);
41  }
42 
43  public void setMin(long m) {
44  mainJNI.IntExpr_setMin(swigCPtr, this, m);
45  }
46 
47  public long max() {
48  return mainJNI.IntExpr_max(swigCPtr, this);
49  }
50 
51  public void setMax(long m) {
52  mainJNI.IntExpr_setMax(swigCPtr, this, m);
53  }
54 
55  public void range(long[] l, long[] u) {
56  mainJNI.IntExpr_range(swigCPtr, this, l, u);
57  }
58 
59  public void setRange(long l, long u) {
60  mainJNI.IntExpr_setRange(swigCPtr, this, l, u);
61  }
62 
63  public void setValue(long v) {
64  mainJNI.IntExpr_setValue(swigCPtr, this, v);
65  }
66 
67  public boolean bound() {
68  return mainJNI.IntExpr_bound(swigCPtr, this);
69  }
70 
71  public boolean isVar() {
72  return mainJNI.IntExpr_isVar(swigCPtr, this);
73  }
74 
75  public IntVar var() {
76  long cPtr = mainJNI.IntExpr_var(swigCPtr, this);
77  return (cPtr == 0) ? null : new IntVar(cPtr, false);
78  }
79 
80  public IntVar varWithName(String name) {
81  long cPtr = mainJNI.IntExpr_varWithName(swigCPtr, this, name);
82  return (cPtr == 0) ? null : new IntVar(cPtr, false);
83  }
84 
85  public void whenRange(Demon d) {
86  mainJNI.IntExpr_whenRange__SWIG_0(swigCPtr, this, Demon.getCPtr(d), d);
87  }
88 
89  public void whenRange(Runnable closure) {
90  mainJNI.IntExpr_whenRange__SWIG_1(swigCPtr, this, closure);
91  }
92 
93  public void accept(ModelVisitor visitor) {
94  mainJNI.IntExpr_accept(swigCPtr, this, ModelVisitor.getCPtr(visitor), visitor);
95  }
96 
97 }
boolean bound()
Definition: IntExpr.java:67
Definition: IntExpr.java:11
void whenRange(Runnable closure)
Definition: IntExpr.java:89
IntExpr(long cPtr, boolean cMemoryOwn)
Definition: IntExpr.java:14
void accept(ModelVisitor visitor)
Definition: IntExpr.java:93
long max()
Definition: IntExpr.java:47
void setMax(long m)
Definition: IntExpr.java:51
void setRange(long l, long u)
Definition: IntExpr.java:59
Definition: Demon.java:11
void whenRange(Demon d)
Definition: IntExpr.java:85
long min()
Definition: IntExpr.java:39
String name()
void setMin(long m)
Definition: IntExpr.java:43
IntVar varWithName(String name)
Definition: IntExpr.java:80
void setValue(long v)
Definition: IntExpr.java:63
IntVar var()
Definition: IntExpr.java:75
boolean isVar()
Definition: IntExpr.java:71
void range(long[] l, long[] u)
Definition: IntExpr.java:55