Java Reference

Java Reference

BaseIntExpr.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.2
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 BaseIntExpr extends IntExpr {
12 private transient long swigCPtr;
13
14 protected BaseIntExpr(long cPtr, boolean cMemoryOwn) {
15 super(mainJNI.BaseIntExpr_SWIGUpcast(cPtr), cMemoryOwn);
16 swigCPtr = cPtr;
17 }
18
19 protected static long getCPtr(BaseIntExpr 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_BaseIntExpr(swigCPtr);
33 }
34 swigCPtr = 0;
35 }
36 super.delete();
37 }
38
39 public IntVar var() {
40 long cPtr = mainJNI.BaseIntExpr_var(swigCPtr, this);
41 return (cPtr == 0) ? null : new IntVar(cPtr, false);
42 }
43
44 public IntVar castToVar() {
45 long cPtr = mainJNI.BaseIntExpr_castToVar(swigCPtr, this);
46 return (cPtr == 0) ? null : new IntVar(cPtr, false);
47 }
48
49}
BaseIntExpr(long cPtr, boolean cMemoryOwn)
IntVar var()
Creates a variable from the expression.
The class IntExpr is the base of all integer expressions in constraint programming.
Definition: IntExpr.java:20