DisjunctiveConstraint.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 // Used to wrap IndexEvaluator2
12 // see https://docs.oracle.com/javase/8/docs/api/java/util/function/LongBinaryOperator.html
13 import java.util.function.LongBinaryOperator;
14 
15 public class DisjunctiveConstraint extends Constraint {
16  private transient long swigCPtr;
17 
18  protected DisjunctiveConstraint(long cPtr, boolean cMemoryOwn) {
19  super(mainJNI.DisjunctiveConstraint_SWIGUpcast(cPtr), cMemoryOwn);
20  swigCPtr = cPtr;
21  }
22 
23  protected static long getCPtr(DisjunctiveConstraint obj) {
24  return (obj == null) ? 0 : obj.swigCPtr;
25  }
26 
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_DisjunctiveConstraint(swigCPtr);
36  }
37  swigCPtr = 0;
38  }
39  super.delete();
40  }
41 
43  long cPtr = mainJNI.DisjunctiveConstraint_makeSequenceVar(swigCPtr, this);
44  return (cPtr == 0) ? null : new SequenceVar(cPtr, false);
45  }
46 
47  public void setTransitionTime(LongBinaryOperator transition_time) {
48  mainJNI.DisjunctiveConstraint_setTransitionTime(swigCPtr, this, transition_time);
49  }
50 
51  public long transitionTime(int before_index, int after_index) {
52  return mainJNI.DisjunctiveConstraint_transitionTime(swigCPtr, this, before_index, after_index);
53  }
54 
55 }
void setTransitionTime(LongBinaryOperator transition_time)