Java Reference

Java Reference

RevBool.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 RevBool {
19 private transient long swigCPtr;
20 protected transient boolean swigCMemOwn;
21
22 protected RevBool(long cPtr, boolean cMemoryOwn) {
23 swigCMemOwn = cMemoryOwn;
24 swigCPtr = cPtr;
25 }
26
27 protected static long getCPtr(RevBool 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_RevBool(swigCPtr);
41 }
42 swigCPtr = 0;
43 }
44 }
45
46 public RevBool(boolean val) {
47 this(mainJNI.new_RevBool(val), true);
48 }
49
50 public boolean value() {
51 return mainJNI.RevBool_value(swigCPtr, this);
52 }
53
54 public void setValue(Solver s, boolean val) {
55 mainJNI.RevBool_setValue(swigCPtr, this, Solver.getCPtr(s), s, val);
56 }
57
58}
This class adds reversibility to a POD type.
Definition: RevBool.java:18
RevBool(long cPtr, boolean cMemoryOwn)
Definition: RevBool.java:22
void setValue(Solver s, boolean val)
Definition: RevBool.java:54
Solver Class A solver represents the main computation engine.
Definition: Solver.java:76