IntVarLocalSearchOperator.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.0
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 
15  private transient long swigCPtr;
16 
17  protected IntVarLocalSearchOperator(long cPtr, boolean cMemoryOwn) {
18  super(mainJNI.IntVarLocalSearchOperator_SWIGUpcast(cPtr), cMemoryOwn);
19  swigCPtr = cPtr;
20  }
21 
22  protected static long getCPtr(IntVarLocalSearchOperator 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_IntVarLocalSearchOperator(swigCPtr);
36  }
37  swigCPtr = 0;
38  }
39  super.delete();
40  }
41 
42  protected void swigDirectorDisconnect() {
43  swigCMemOwn = false;
44  delete();
45  }
46 
47  public void swigReleaseOwnership() {
48  swigCMemOwn = false;
49  mainJNI.IntVarLocalSearchOperator_change_ownership(this, swigCPtr, false);
50  }
51 
52  public void swigTakeOwnership() {
53  swigCMemOwn = true;
54  mainJNI.IntVarLocalSearchOperator_change_ownership(this, swigCPtr, true);
55  }
56 
58  this(mainJNI.new_IntVarLocalSearchOperator__SWIG_0(), true);
59  mainJNI.IntVarLocalSearchOperator_director_connect(this, swigCPtr, true, true);
60  }
61 
63  this(mainJNI.new_IntVarLocalSearchOperator__SWIG_1(vars), true);
64  mainJNI.IntVarLocalSearchOperator_director_connect(this, swigCPtr, true, true);
65  }
66 
70  protected boolean oneNeighbor() {
71  return (getClass() == IntVarLocalSearchOperator.class) ? mainJNI.IntVarLocalSearchOperator_oneNeighbor(swigCPtr, this) : mainJNI.IntVarLocalSearchOperator_oneNeighborSwigExplicitIntVarLocalSearchOperator(swigCPtr, this);
72  }
73 
74 }