Java Reference

Java Reference

AssignmentSequenceContainer.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
9package com.google.ortools.constraintsolver;
10
12 private transient long swigCPtr;
13 protected transient boolean swigCMemOwn;
14
15 protected AssignmentSequenceContainer(long cPtr, boolean cMemoryOwn) {
16 swigCMemOwn = cMemoryOwn;
17 swigCPtr = cPtr;
18 }
19
20 protected static long getCPtr(AssignmentSequenceContainer obj) {
21 return (obj == null) ? 0 : obj.swigCPtr;
22 }
23
24 @SuppressWarnings("deprecation")
25 protected void finalize() {
26 delete();
27 }
28
29 public synchronized void delete() {
30 if (swigCPtr != 0) {
31 if (swigCMemOwn) {
32 swigCMemOwn = false;
33 mainJNI.delete_AssignmentSequenceContainer(swigCPtr);
34 }
35 swigCPtr = 0;
36 }
37 }
38
40 this(mainJNI.new_AssignmentSequenceContainer(), true);
41 }
42
44 long cPtr = mainJNI.AssignmentSequenceContainer_add(swigCPtr, this, SequenceVar.getCPtr(var), var);
45 return (cPtr == 0) ? null : new SequenceVarElement(cPtr, false);
46 }
47
52 long cPtr = mainJNI.AssignmentSequenceContainer_fastAdd(swigCPtr, this, SequenceVar.getCPtr(var), var);
53 return (cPtr == 0) ? null : new SequenceVarElement(cPtr, false);
54 }
55
60 public SequenceVarElement addAtPosition(SequenceVar var, int position) {
61 long cPtr = mainJNI.AssignmentSequenceContainer_addAtPosition(swigCPtr, this, SequenceVar.getCPtr(var), var, position);
62 return (cPtr == 0) ? null : new SequenceVarElement(cPtr, false);
63 }
64
65 public void clear() {
66 mainJNI.AssignmentSequenceContainer_clear(swigCPtr, this);
67 }
68
73 public void resize(long size) {
74 mainJNI.AssignmentSequenceContainer_resize(swigCPtr, this, size);
75 }
76
77 public boolean empty() {
78 return mainJNI.AssignmentSequenceContainer_empty(swigCPtr, this);
79 }
80
86 mainJNI.AssignmentSequenceContainer_copyIntersection(swigCPtr, this, AssignmentSequenceContainer.getCPtr(container), container);
87 }
88
93 public void copy(AssignmentSequenceContainer container) {
94 mainJNI.AssignmentSequenceContainer_copy(swigCPtr, this, AssignmentSequenceContainer.getCPtr(container), container);
95 }
96
97 public boolean contains(SequenceVar var) {
98 return mainJNI.AssignmentSequenceContainer_contains(swigCPtr, this, SequenceVar.getCPtr(var), var);
99 }
100
102 long cPtr = mainJNI.AssignmentSequenceContainer_mutableElement__SWIG_0(swigCPtr, this, SequenceVar.getCPtr(var), var);
103 return (cPtr == 0) ? null : new SequenceVarElement(cPtr, false);
104 }
105
107 return new SequenceVarElement(mainJNI.AssignmentSequenceContainer_element__SWIG_0(swigCPtr, this, SequenceVar.getCPtr(var), var), false);
108 }
109
111 long cPtr = mainJNI.AssignmentSequenceContainer_mutableElement__SWIG_1(swigCPtr, this, index);
112 return (cPtr == 0) ? null : new SequenceVarElement(cPtr, false);
113 }
114
115 public SequenceVarElement element(int index) {
116 return new SequenceVarElement(mainJNI.AssignmentSequenceContainer_element__SWIG_1(swigCPtr, this, index), false);
117 }
118
119 public int size() {
120 return mainJNI.AssignmentSequenceContainer_size(swigCPtr, this);
121 }
122
123 public void store() {
124 mainJNI.AssignmentSequenceContainer_store(swigCPtr, this);
125 }
126
127 public void restore() {
128 mainJNI.AssignmentSequenceContainer_restore(swigCPtr, this);
129 }
130
131 public boolean AreAllElementsBound() {
132 return mainJNI.AssignmentSequenceContainer_AreAllElementsBound(swigCPtr, this);
133 }
134
135}
SequenceVarElement fastAdd(SequenceVar var)
Adds element without checking its presence in the container.
SequenceVarElement addAtPosition(SequenceVar var, int position)
Advanced usage: Adds element at a given position; position has to have been allocated with Assignmen...
void copy(AssignmentSequenceContainer container)
Copies all the elements of 'container' to this container, clearing its previous content.
void resize(long size)
Advanced usage: Resizes the container, potentially adding elements with null variables.
void copyIntersection(AssignmentSequenceContainer container)
Copies the elements of 'container' which are already in the calling container.
The SequenceVarElement stores a partial representation of ranked interval variables in the underlyin...
A sequence variable is a variable whose domain is a set of possible orderings of the interval variab...