Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
TypeRegulationsConstraint.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
54 private transient long swigCPtr;
55
56 public TypeRegulationsConstraint(long cPtr, boolean cMemoryOwn) {
57 super(mainJNI.TypeRegulationsConstraint_SWIGUpcast(cPtr), cMemoryOwn);
58 swigCPtr = cPtr;
59 }
60
61 public static long getCPtr(TypeRegulationsConstraint obj) {
62 return (obj == null) ? 0 : obj.swigCPtr;
63 }
64
65 public static long swigRelease(TypeRegulationsConstraint obj) {
66 long ptr = 0;
67 if (obj != null) {
68 if (!obj.swigCMemOwn)
69 throw new RuntimeException("Cannot release ownership as memory is not owned");
70 ptr = obj.swigCPtr;
71 obj.swigCMemOwn = false;
72 obj.delete();
73 }
74 return ptr;
75 }
76
77 @SuppressWarnings({"deprecation", "removal"})
78 protected void finalize() {
79 delete();
80 }
81
82 public synchronized void delete() {
83 if (swigCPtr != 0) {
84 if (swigCMemOwn) {
85 swigCMemOwn = false;
86 mainJNI.delete_TypeRegulationsConstraint(swigCPtr);
87 }
88 swigCPtr = 0;
89 }
90 super.delete();
91 }
92
94 this(mainJNI.new_TypeRegulationsConstraint(RoutingModel.getCPtr(model), model), true);
95 }
96
97 public void post() {
98 mainJNI.TypeRegulationsConstraint_post(swigCPtr, this);
99 }
100
101 public void initialPropagate() {
102 mainJNI.TypeRegulationsConstraint_initialPropagate(swigCPtr, this);
103 }
104
105}