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