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.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 
14 public class BaseIntExpr extends IntExpr {
15  private transient long swigCPtr;
16 
17  protected BaseIntExpr(long cPtr, boolean cMemoryOwn) {
18  super(mainJNI.BaseIntExpr_SWIGUpcast(cPtr), cMemoryOwn);
19  swigCPtr = cPtr;
20  }
21 
22  protected static long getCPtr(BaseIntExpr obj) {
23  return (obj == null) ? 0 : obj.swigCPtr;
24  }
25 
26  @SuppressWarnings("deprecation")
27  protected void finalize() {
28  delete();
29  }
30 
31  public synchronized void delete() {
32  if (swigCPtr != 0) {
33  if (swigCMemOwn) {
34  swigCMemOwn = false;
35  mainJNI.delete_BaseIntExpr(swigCPtr);
36  }
37  swigCPtr = 0;
38  }
39  super.delete();
40  }
41 
42  public IntVar var() {
43  long cPtr = mainJNI.BaseIntExpr_var(swigCPtr, this);
44  return (cPtr == 0) ? null : new IntVar(cPtr, false);
45  }
46 
47  public IntVar castToVar() {
48  long cPtr = mainJNI.BaseIntExpr_castToVar(swigCPtr, this);
49  return (cPtr == 0) ? null : new IntVar(cPtr, false);
50  }
51 
52 }
IntVar var()
Creates a variable from the expression.
The class IntExpr is the base of all integer expressions in constraint programming.
Definition: IntExpr.java:14
This is the base class for all expressions that are not variables.
The class IntVar is a subset of IntExpr.
BaseIntExpr(long cPtr, boolean cMemoryOwn)
IntVar castToVar()