Google OR-Tools v9.12
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.3.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
11// Types from ConstraintSolver
12import com.google.ortools.constraintsolver.Constraint;
13
27 private transient long swigCPtr;
28
29 public GlobalVehicleBreaksConstraint(long cPtr, boolean cMemoryOwn) {
30 super(mainJNI.GlobalVehicleBreaksConstraint_SWIGUpcast(cPtr), cMemoryOwn);
31 swigCPtr = cPtr;
32 }
33
34 public static long getCPtr(GlobalVehicleBreaksConstraint obj) {
35 return (obj == null) ? 0 : obj.swigCPtr;
36 }
37
39 long ptr = 0;
40 if (obj != null) {
41 if (!obj.swigCMemOwn)
42 throw new RuntimeException("Cannot release ownership as memory is not owned");
43 ptr = obj.swigCPtr;
44 obj.swigCMemOwn = false;
45 obj.delete();
46 }
47 return ptr;
48 }
49
50 @SuppressWarnings({"deprecation", "removal"})
51 protected void finalize() {
52 delete();
53 }
54
55 public synchronized void delete() {
56 if (swigCPtr != 0) {
57 if (swigCMemOwn) {
58 swigCMemOwn = false;
59 mainJNI.delete_GlobalVehicleBreaksConstraint(swigCPtr);
60 }
61 swigCPtr = 0;
62 }
63 super.delete();
64 }
65
67 this(mainJNI.new_GlobalVehicleBreaksConstraint(RoutingDimension.getCPtr(dimension), dimension), true);
68 }
69
70 public String toString() {
71 return mainJNI.GlobalVehicleBreaksConstraint_toString(swigCPtr, this);
72 }
73
74 public void post() {
75 mainJNI.GlobalVehicleBreaksConstraint_post(swigCPtr, this);
76 }
77
78 public void initialPropagate() {
79 mainJNI.GlobalVehicleBreaksConstraint_initialPropagate(swigCPtr, this);
80 }
81
82}
Constraint(long cPtr, boolean cMemoryOwn)