Google OR-Tools
v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
Decision.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.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
15
public
class
Decision
extends
BaseObject
{
16
private
transient
long
swigCPtr;
17
18
protected
Decision
(
long
cPtr,
boolean
cMemoryOwn) {
19
super(mainJNI.Decision_SWIGUpcast(cPtr), cMemoryOwn);
20
swigCPtr = cPtr;
21
}
22
23
protected
static
long
getCPtr
(
Decision
obj) {
24
return
(obj ==
null
) ? 0 : obj.swigCPtr;
25
}
26
27
protected
static
long
swigRelease
(
Decision
obj) {
28
long
ptr = 0;
29
if
(obj !=
null
) {
30
if
(!obj.
swigCMemOwn
)
31
throw
new
RuntimeException(
"Cannot release ownership as memory is not owned"
);
32
ptr = obj.swigCPtr;
33
obj.swigCMemOwn =
false
;
34
obj.
delete
();
35
}
36
return
ptr;
37
}
38
39
@SuppressWarnings({
"deprecation"
,
"removal"
})
40
protected
void
finalize
() {
41
delete
();
42
}
43
44
public
synchronized
void
delete
() {
45
if
(swigCPtr != 0) {
46
if
(
swigCMemOwn
) {
47
swigCMemOwn
=
false
;
48
mainJNI.delete_Decision(swigCPtr);
49
}
50
swigCPtr = 0;
51
}
52
super.delete();
53
}
54
55
protected
void
swigDirectorDisconnect
() {
56
swigCMemOwn
=
false
;
57
delete
();
58
}
59
60
public
void
swigReleaseOwnership
() {
61
swigCMemOwn
=
false
;
62
mainJNI.Decision_change_ownership(
this
, swigCPtr,
false
);
63
}
64
65
public
void
swigTakeOwnership
() {
66
swigCMemOwn
=
true
;
67
mainJNI.Decision_change_ownership(
this
, swigCPtr,
true
);
68
}
69
70
public
Decision
() {
71
this
(mainJNI.new_Decision(),
true
);
72
mainJNI.Decision_director_connect(
this
, swigCPtr,
true
,
true
);
73
}
74
78
public
void
apply
(
Solver
s) {
79
mainJNI.Decision_apply(swigCPtr,
this
,
Solver
.
getCPtr
(s), s);
80
}
81
85
public
void
refute
(
Solver
s) {
86
mainJNI.Decision_refute(swigCPtr,
this
,
Solver
.
getCPtr
(s), s);
87
}
88
89
public
String
toString
() {
90
return
(getClass() ==
Decision
.class) ? mainJNI.Decision_toString(swigCPtr,
this
) : mainJNI.Decision_toStringSwigExplicitDecision(swigCPtr,
this
);
91
}
92
96
public
void
accept
(
DecisionVisitor
visitor) {
97
if
(getClass() ==
Decision
.class) mainJNI.Decision_accept(swigCPtr,
this
,
DecisionVisitor
.
getCPtr
(visitor), visitor);
else
mainJNI.Decision_acceptSwigExplicitDecision(swigCPtr,
this
,
DecisionVisitor
.
getCPtr
(visitor), visitor);
98
}
99
100
}
com.google.ortools.constraintsolver.BaseObject
Definition
BaseObject.java:16
com.google.ortools.constraintsolver.BaseObject.swigCMemOwn
transient boolean swigCMemOwn
Definition
BaseObject.java:18
com.google.ortools.constraintsolver.DecisionVisitor
Definition
DecisionVisitor.java:15
com.google.ortools.constraintsolver.DecisionVisitor.getCPtr
static long getCPtr(DecisionVisitor obj)
Definition
DecisionVisitor.java:23
com.google.ortools.constraintsolver.Decision
Definition
Decision.java:15
com.google.ortools.constraintsolver.Decision.finalize
void finalize()
Definition
Decision.java:40
com.google.ortools.constraintsolver.Decision.swigRelease
static long swigRelease(Decision obj)
Definition
Decision.java:27
com.google.ortools.constraintsolver.Decision.Decision
Decision()
Definition
Decision.java:70
com.google.ortools.constraintsolver.Decision.swigTakeOwnership
void swigTakeOwnership()
Definition
Decision.java:65
com.google.ortools.constraintsolver.Decision.refute
void refute(Solver s)
Definition
Decision.java:85
com.google.ortools.constraintsolver.Decision.Decision
Decision(long cPtr, boolean cMemoryOwn)
Definition
Decision.java:18
com.google.ortools.constraintsolver.Decision.swigReleaseOwnership
void swigReleaseOwnership()
Definition
Decision.java:60
com.google.ortools.constraintsolver.Decision.getCPtr
static long getCPtr(Decision obj)
Definition
Decision.java:23
com.google.ortools.constraintsolver.Decision.toString
String toString()
Definition
Decision.java:89
com.google.ortools.constraintsolver.Decision.accept
void accept(DecisionVisitor visitor)
Definition
Decision.java:96
com.google.ortools.constraintsolver.Decision.swigDirectorDisconnect
void swigDirectorDisconnect()
Definition
Decision.java:55
com.google.ortools.constraintsolver.Decision.delete
synchronized void delete()
Definition
Decision.java:44
com.google.ortools.constraintsolver.Decision.apply
void apply(Solver s)
Definition
Decision.java:78
com.google.ortools.constraintsolver.Solver
Definition
Solver.java:76
com.google.ortools.constraintsolver.Solver.getCPtr
static long getCPtr(Solver obj)
Definition
Solver.java:85
build
java
ortools-java
src
main
java
com
google
ortools
constraintsolver
Decision.java
Generated by
1.12.0