com.google.ortools.constraintsolver.IntExpr Maven / Gradle / Ivy
The newest version!
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.google.ortools.constraintsolver;
public class IntExpr extends PropagationBaseObject {
private transient long swigCPtr;
protected IntExpr(long cPtr, boolean cMemoryOwn) {
super(mainJNI.IntExpr_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(IntExpr obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
mainJNI.delete_IntExpr(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public long min() {
return mainJNI.IntExpr_min(swigCPtr, this);
}
public void setMin(long m) {
mainJNI.IntExpr_setMin(swigCPtr, this, m);
}
public long max() {
return mainJNI.IntExpr_max(swigCPtr, this);
}
public void setMax(long m) {
mainJNI.IntExpr_setMax(swigCPtr, this, m);
}
public void range(int[] l, int[] u) {
mainJNI.IntExpr_range(swigCPtr, this, l, u);
}
public void setRange(long l, long u) {
mainJNI.IntExpr_setRange(swigCPtr, this, l, u);
}
public void setValue(long v) {
mainJNI.IntExpr_setValue(swigCPtr, this, v);
}
public boolean bound() {
return mainJNI.IntExpr_bound(swigCPtr, this);
}
public boolean isVar() {
return mainJNI.IntExpr_isVar(swigCPtr, this);
}
public IntVar var() {
long cPtr = mainJNI.IntExpr_var(swigCPtr, this);
return (cPtr == 0) ? null : new IntVar(cPtr, false);
}
public IntVar varWithName(String name) {
long cPtr = mainJNI.IntExpr_varWithName(swigCPtr, this, name);
return (cPtr == 0) ? null : new IntVar(cPtr, false);
}
public void whenRange(Demon d) {
mainJNI.IntExpr_whenRange__SWIG_0(swigCPtr, this, Demon.getCPtr(d), d);
}
public void whenRange(Runnable closure) {
mainJNI.IntExpr_whenRange__SWIG_1(swigCPtr, this, closure);
}
public void accept(ModelVisitor visitor) {
mainJNI.IntExpr_accept(swigCPtr, this, ModelVisitor.getCPtr(visitor), visitor);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy