Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
GlobalVehicleBreaksConstraint.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.0
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
24 private transient long swigCPtr;
25
26 public GlobalVehicleBreaksConstraint(long cPtr, boolean cMemoryOwn) {
27 super(mainJNI.GlobalVehicleBreaksConstraint_SWIGUpcast(cPtr), cMemoryOwn);
28 swigCPtr = cPtr;
29 }
30
31 public static long getCPtr(GlobalVehicleBreaksConstraint obj) {
32 return (obj == null) ? 0 : obj.swigCPtr;
33 }
34
36 long ptr = 0;
37 if (obj != null) {
38 if (!obj.swigCMemOwn)
39 throw new RuntimeException("Cannot release ownership as memory is not owned");
40 ptr = obj.swigCPtr;
41 obj.swigCMemOwn = false;
42 obj.delete();
43 }
44 return ptr;
45 }
46
47 @SuppressWarnings({"deprecation", "removal"})
48 protected void finalize() {
49 delete();
50 }
51
52 public synchronized void delete() {
53 if (swigCPtr != 0) {
54 if (swigCMemOwn) {
55 swigCMemOwn = false;
56 mainJNI.delete_GlobalVehicleBreaksConstraint(swigCPtr);
57 }
58 swigCPtr = 0;
59 }
60 super.delete();
61 }
62
64 this(mainJNI.new_GlobalVehicleBreaksConstraint(RoutingDimension.getCPtr(dimension), dimension), true);
65 }
66
67 public String toString() {
68 return mainJNI.GlobalVehicleBreaksConstraint_toString(swigCPtr, this);
69 }
70
71 public void post() {
72 mainJNI.GlobalVehicleBreaksConstraint_post(swigCPtr, this);
73 }
74
75 public void initialPropagate() {
76 mainJNI.GlobalVehicleBreaksConstraint_initialPropagate(swigCPtr, this);
77 }
78
79}