Java Reference

Java Reference

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