Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
SequenceVarElement.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
27 private transient long swigCPtr;
28
29 protected SequenceVarElement(long cPtr, boolean cMemoryOwn) {
30 super(mainJNI.SequenceVarElement_SWIGUpcast(cPtr), cMemoryOwn);
31 swigCPtr = cPtr;
32 }
33
34 protected static long getCPtr(SequenceVarElement obj) {
35 return (obj == null) ? 0 : obj.swigCPtr;
36 }
37
38 protected static long swigRelease(SequenceVarElement obj) {
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_SequenceVarElement(swigCPtr);
60 }
61 swigCPtr = 0;
62 }
63 super.delete();
64 }
65
67 this(mainJNI.new_SequenceVarElement__SWIG_0(), true);
68 }
69
71 this(mainJNI.new_SequenceVarElement__SWIG_1(SequenceVar.getCPtr(var), var), true);
72 }
73
74 public void reset(SequenceVar var) {
75 mainJNI.SequenceVarElement_reset(swigCPtr, this, SequenceVar.getCPtr(var), var);
76 }
77
79 long cPtr = mainJNI.SequenceVarElement_clone(swigCPtr, this);
80 return (cPtr == 0) ? null : new SequenceVarElement(cPtr, false);
81 }
82
83 public void copy(SequenceVarElement element) {
84 mainJNI.SequenceVarElement_copy(swigCPtr, this, SequenceVarElement.getCPtr(element), element);
85 }
86
87 public SequenceVar var() {
88 long cPtr = mainJNI.SequenceVarElement_var(swigCPtr, this);
89 return (cPtr == 0) ? null : new SequenceVar(cPtr, false);
90 }
91
92 public void store() {
93 mainJNI.SequenceVarElement_store(swigCPtr, this);
94 }
95
96 public void restore() {
97 mainJNI.SequenceVarElement_restore(swigCPtr, this);
98 }
99
100 public int[] forwardSequence() {
101 return mainJNI.SequenceVarElement_forwardSequence(swigCPtr, this);
102}
103
104 public int[] backwardSequence() {
105 return mainJNI.SequenceVarElement_backwardSequence(swigCPtr, this);
106}
107
108 public int[] unperformed() {
109 return mainJNI.SequenceVarElement_unperformed(swigCPtr, this);
110}
111
112 public void setSequence(int[] forward_sequence, int[] backward_sequence, int[] unperformed) {
113 mainJNI.SequenceVarElement_setSequence(swigCPtr, this, forward_sequence, backward_sequence, unperformed);
114 }
115
116 public void setForwardSequence(int[] forward_sequence) {
117 mainJNI.SequenceVarElement_setForwardSequence(swigCPtr, this, forward_sequence);
118 }
119
120 public void setBackwardSequence(int[] backward_sequence) {
121 mainJNI.SequenceVarElement_setBackwardSequence(swigCPtr, this, backward_sequence);
122 }
123
124 public void setUnperformed(int[] unperformed) {
125 mainJNI.SequenceVarElement_setUnperformed(swigCPtr, this, unperformed);
126 }
127
128 public boolean bound() {
129 return mainJNI.SequenceVarElement_bound(swigCPtr, this);
130 }
131
132 public String toString() {
133 return mainJNI.SequenceVarElement_toString(swigCPtr, this);
134 }
135
136}
void setSequence(int[] forward_sequence, int[] backward_sequence, int[] unperformed)