Java Reference

Java Reference

SequenceVar.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.2
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 SequenceVar extends PropagationBaseObject {
12  private transient long swigCPtr;
13 
14  protected SequenceVar(long cPtr, boolean cMemoryOwn) {
15  super(mainJNI.SequenceVar_SWIGUpcast(cPtr), cMemoryOwn);
16  swigCPtr = cPtr;
17  }
18 
19  protected static long getCPtr(SequenceVar obj) {
20  return (obj == null) ? 0 : obj.swigCPtr;
21  }
22 
23  @SuppressWarnings("deprecation")
24  protected void finalize() {
25  delete();
26  }
27 
28  public synchronized void delete() {
29  if (swigCPtr != 0) {
30  if (swigCMemOwn) {
31  swigCMemOwn = false;
32  mainJNI.delete_SequenceVar(swigCPtr);
33  }
34  swigCPtr = 0;
35  }
36  super.delete();
37  }
38 
39  public SequenceVar(Solver s, IntervalVar[] intervals, IntVar[] nexts, String name) {
40  this(mainJNI.new_SequenceVar(Solver.getCPtr(s), s, intervals, nexts, name), true);
41  }
42 
43  public String toString() {
44  return mainJNI.SequenceVar_toString(swigCPtr, this);
45  }
46 
47  public void rankFirst(int index) {
48  mainJNI.SequenceVar_rankFirst(swigCPtr, this, index);
49  }
50 
51  public void rankNotFirst(int index) {
52  mainJNI.SequenceVar_rankNotFirst(swigCPtr, this, index);
53  }
54 
55  public void rankLast(int index) {
56  mainJNI.SequenceVar_rankLast(swigCPtr, this, index);
57  }
58 
59  public void rankNotLast(int index) {
60  mainJNI.SequenceVar_rankNotLast(swigCPtr, this, index);
61  }
62 
63  public void rankSequence(int[] rank_first, int[] rank_last, int[] unperformed) {
64  mainJNI.SequenceVar_rankSequence(swigCPtr, this, rank_first, rank_last, unperformed);
65  }
66 
67  public IntervalVar interval(int index) {
68  long cPtr = mainJNI.SequenceVar_interval(swigCPtr, this, index);
69  return (cPtr == 0) ? null : new IntervalVar(cPtr, false);
70  }
71 
72  public IntVar next(int index) {
73  long cPtr = mainJNI.SequenceVar_next(swigCPtr, this, index);
74  return (cPtr == 0) ? null : new IntVar(cPtr, false);
75  }
76 
77  public long size() {
78  return mainJNI.SequenceVar_size(swigCPtr, this);
79  }
80 
81  public void accept(ModelVisitor visitor) {
82  mainJNI.SequenceVar_accept(swigCPtr, this, ModelVisitor.getCPtr(visitor), visitor);
83  }
84 
85 }
SequenceVar(Solver s, IntervalVar[] intervals, IntVar[] nexts, String name)
IntervalVar interval(int index)
IntVar next(int index)
void rankFirst(int index)
String toString()
void rankLast(int index)
SequenceVar(long cPtr, boolean cMemoryOwn)
void rankNotFirst(int index)
void accept(ModelVisitor visitor)
void rankNotLast(int index)
String name()
void rankSequence(int[] rank_first, int[] rank_last, int[] unperformed)
long size()
Definition: Solver.java:54