Java Reference

Java Reference

RevInteger.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
18public class RevInteger {
19 private transient long swigCPtr;
20 protected transient boolean swigCMemOwn;
21
22 protected RevInteger(long cPtr, boolean cMemoryOwn) {
23 swigCMemOwn = cMemoryOwn;
24 swigCPtr = cPtr;
25 }
26
27 protected static long getCPtr(RevInteger obj) {
28 return (obj == null) ? 0 : obj.swigCPtr;
29 }
30
31 @SuppressWarnings("deprecation")
32 protected void finalize() {
33 delete();
34 }
35
36 public synchronized void delete() {
37 if (swigCPtr != 0) {
38 if (swigCMemOwn) {
39 swigCMemOwn = false;
40 mainJNI.delete_RevInteger(swigCPtr);
41 }
42 swigCPtr = 0;
43 }
44 }
45
46 public RevInteger(int val) {
47 this(mainJNI.new_RevInteger(val), true);
48 }
49
50 public int value() {
51 return mainJNI.RevInteger_value(swigCPtr, this);
52 }
53
54 public void setValue(Solver s, int val) {
55 mainJNI.RevInteger_setValue(swigCPtr, this, Solver.getCPtr(s), s, val);
56 }
57
58}
This class adds reversibility to a POD type.
Definition: RevInteger.java:18
RevInteger(long cPtr, boolean cMemoryOwn)
Definition: RevInteger.java:22
Solver Class A solver represents the main computation engine.
Definition: Solver.java:73