Java Reference

Java Reference

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