Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
IntVarIterator.java
Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (https://www.swig.org).
3 * Version 4.2.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
9package com.google.ortools.constraintsolver;
10
27public class IntVarIterator extends BaseObject {
28 private transient long swigCPtr;
29
30 protected IntVarIterator(long cPtr, boolean cMemoryOwn) {
31 super(mainJNI.IntVarIterator_SWIGUpcast(cPtr), cMemoryOwn);
32 swigCPtr = cPtr;
33 }
34
35 protected static long getCPtr(IntVarIterator obj) {
36 return (obj == null) ? 0 : obj.swigCPtr;
37 }
38
39 protected static long swigRelease(IntVarIterator obj) {
40 long ptr = 0;
41 if (obj != null) {
42 if (!obj.swigCMemOwn)
43 throw new RuntimeException("Cannot release ownership as memory is not owned");
44 ptr = obj.swigCPtr;
45 obj.swigCMemOwn = false;
46 obj.delete();
47 }
48 return ptr;
49 }
50
51 @SuppressWarnings({"deprecation", "removal"})
52 protected void finalize() {
53 delete();
54 }
55
56 public synchronized void delete() {
57 if (swigCPtr != 0) {
58 if (swigCMemOwn) {
59 swigCMemOwn = false;
60 mainJNI.delete_IntVarIterator(swigCPtr);
61 }
62 swigCPtr = 0;
63 }
64 super.delete();
65 }
66
70 public void init() {
71 mainJNI.IntVarIterator_init(swigCPtr, this);
72 }
73
77 public boolean ok() {
78 return mainJNI.IntVarIterator_ok(swigCPtr, this);
79 }
80
84 public long value() {
85 return mainJNI.IntVarIterator_value(swigCPtr, this);
86 }
87
91 public void next() {
92 mainJNI.IntVarIterator_next(swigCPtr, this);
93 }
94
98 public String toString() {
99 return mainJNI.IntVarIterator_toString(swigCPtr, this);
100 }
101
102}