OR-Tools  7.1
SequenceVarElement.java
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 3.0.12
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 
9 package com.google.ortools.constraintsolver;
10 
11 public class SequenceVarElement extends AssignmentElement {
12  private transient long swigCPtr;
13 
14  protected SequenceVarElement(long cPtr, boolean cMemoryOwn) {
15  super(mainJNI.SequenceVarElement_SWIGUpcast(cPtr), cMemoryOwn);
16  swigCPtr = cPtr;
17  }
18 
19  protected static long getCPtr(SequenceVarElement obj) {
20  return (obj == null) ? 0 : obj.swigCPtr;
21  }
22 
23  protected void finalize() {
24  delete();
25  }
26 
27  public synchronized void delete() {
28  if (swigCPtr != 0) {
29  if (swigCMemOwn) {
30  swigCMemOwn = false;
31  mainJNI.delete_SequenceVarElement(swigCPtr);
32  }
33  swigCPtr = 0;
34  }
35  super.delete();
36  }
37 
38  public SequenceVarElement() {
39  this(mainJNI.new_SequenceVarElement__SWIG_0(), true);
40  }
41 
43  this(mainJNI.new_SequenceVarElement__SWIG_1(SequenceVar.getCPtr(var), var), true);
44  }
45 
46  public void reset(SequenceVar var) {
47  mainJNI.SequenceVarElement_reset(swigCPtr, this, SequenceVar.getCPtr(var), var);
48  }
49 
51  long cPtr = mainJNI.SequenceVarElement_clone(swigCPtr, this);
52  return (cPtr == 0) ? null : new SequenceVarElement(cPtr, false);
53  }
54 
55  public void copy(SequenceVarElement element) {
56  mainJNI.SequenceVarElement_copy(swigCPtr, this, SequenceVarElement.getCPtr(element), element);
57  }
58 
59  public SequenceVar var() {
60  long cPtr = mainJNI.SequenceVarElement_var(swigCPtr, this);
61  return (cPtr == 0) ? null : new SequenceVar(cPtr, false);
62  }
63 
64  public void store() {
65  mainJNI.SequenceVarElement_store(swigCPtr, this);
66  }
67 
68  public void restore() {
69  mainJNI.SequenceVarElement_restore(swigCPtr, this);
70  }
71 
72  public int[] forwardSequence() {
73  return mainJNI.SequenceVarElement_forwardSequence(swigCPtr, this);
74 }
75 
76  public int[] backwardSequence() {
77  return mainJNI.SequenceVarElement_backwardSequence(swigCPtr, this);
78 }
79 
80  public int[] unperformed() {
81  return mainJNI.SequenceVarElement_unperformed(swigCPtr, this);
82 }
83 
84  public void setSequence(int[] forward_sequence, int[] backward_sequence, int[] unperformed) {
85  mainJNI.SequenceVarElement_setSequence(swigCPtr, this, forward_sequence, backward_sequence, unperformed);
86  }
87 
88  public void setForwardSequence(int[] forward_sequence) {
89  mainJNI.SequenceVarElement_setForwardSequence(swigCPtr, this, forward_sequence);
90  }
91 
92  public void setBackwardSequence(int[] backward_sequence) {
93  mainJNI.SequenceVarElement_setBackwardSequence(swigCPtr, this, backward_sequence);
94  }
95 
96  public void setUnperformed(int[] unperformed) {
97  mainJNI.SequenceVarElement_setUnperformed(swigCPtr, this, unperformed);
98  }
99 
100  public boolean bound() {
101  return mainJNI.SequenceVarElement_bound(swigCPtr, this);
102  }
103 
104  public String toString() {
105  return mainJNI.SequenceVarElement_toString(swigCPtr, this);
106  }
107 
108 }
void setSequence(int[] forward_sequence, int[] backward_sequence, int[] unperformed)