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