OR-Tools  7.1
MinCostFlowBase.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.graph;
10 
11 public class MinCostFlowBase {
12  private transient long swigCPtr;
13  protected transient boolean swigCMemOwn;
14 
15  protected MinCostFlowBase(long cPtr, boolean cMemoryOwn) {
16  swigCMemOwn = cMemoryOwn;
17  swigCPtr = cPtr;
18  }
19 
20  protected static long getCPtr(MinCostFlowBase obj) {
21  return (obj == null) ? 0 : obj.swigCPtr;
22  }
23 
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_MinCostFlowBase(swigCPtr);
33  }
34  swigCPtr = 0;
35  }
36  }
37 
38  public MinCostFlowBase() {
39  this(mainJNI.new_MinCostFlowBase(), true);
40  }
41 
42  public enum Status {
50 
51  public final int swigValue() {
52  return swigValue;
53  }
54 
55  public static Status swigToEnum(int swigValue) {
56  Status[] swigValues = Status.class.getEnumConstants();
57  if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
58  return swigValues[swigValue];
59  for (Status swigEnum : swigValues)
60  if (swigEnum.swigValue == swigValue)
61  return swigEnum;
62  throw new IllegalArgumentException("No enum " + Status.class + " with value " + swigValue);
63  }
64 
65  @SuppressWarnings("unused")
66  private Status() {
67  this.swigValue = SwigNext.next++;
68  }
69 
70  @SuppressWarnings("unused")
71  private Status(int swigValue) {
72  this.swigValue = swigValue;
73  SwigNext.next = swigValue+1;
74  }
75 
76  @SuppressWarnings("unused")
77  private Status(Status swigEnum) {
78  this.swigValue = swigEnum.swigValue;
79  SwigNext.next = this.swigValue+1;
80  }
81 
82  private final int swigValue;
83 
84  private static class SwigNext {
85  private static int next = 0;
86  }
87  }
88 
89 }
static long getCPtr(MinCostFlowBase obj)
MinCostFlowBase(long cPtr, boolean cMemoryOwn)