9package com.google.ortools.graph;
 
   12  private transient long swigCPtr;
 
   15  protected MaxFlow(
long cPtr, 
boolean cMemoryOwn) {
 
 
   21    return (obj == 
null) ? 0 : obj.swigCPtr;
 
 
   28        throw new RuntimeException(
"Cannot release ownership as memory is not owned");
 
   30      obj.swigCMemOwn = 
false;
 
 
   36  @SuppressWarnings({
"deprecation", 
"removal"})
 
   45        mainJNI.delete_MaxFlow(swigCPtr);
 
 
   52    this(mainJNI.new_MaxFlow(), 
true);
 
 
   56    return mainJNI.MaxFlow_addArcWithCapacity(swigCPtr, 
this, tail, head, capacity);
 
 
   60    return mainJNI.MaxFlow_getNumNodes(swigCPtr, 
this);
 
 
   64    return mainJNI.MaxFlow_getNumArcs(swigCPtr, 
this);
 
 
   68    return mainJNI.MaxFlow_getTail(swigCPtr, 
this, arc);
 
 
   72    return mainJNI.MaxFlow_getHead(swigCPtr, 
this, arc);
 
 
   76    return mainJNI.MaxFlow_getCapacity(swigCPtr, 
this, arc);
 
 
   80    return MaxFlow.Status.swigToEnum(mainJNI.MaxFlow_solve(swigCPtr, 
this, source, sink));
 
 
   84    return mainJNI.MaxFlow_getOptimalFlow(swigCPtr, 
this);
 
 
   88    return mainJNI.MaxFlow_getFlow(swigCPtr, 
this, arc);
 
 
   92    mainJNI.MaxFlow_setArcCapacity(swigCPtr, 
this, arc, capacity);
 
 
  106      Status[] swigValues = Status.class.getEnumConstants();
 
  107      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
 
  108        return swigValues[swigValue];
 
  109      for (Status swigEnum : swigValues)
 
  110        if (swigEnum.swigValue == swigValue)
 
  112      throw new IllegalArgumentException(
"No enum " + Status.class + 
" with value " + swigValue);
 
 
  115    @SuppressWarnings(
"unused")
 
  117      this.swigValue = SwigNext.next++;
 
  120    @SuppressWarnings(
"unused")
 
  121    private Status(
int swigValue) {
 
  122      this.swigValue = swigValue;
 
  123      SwigNext.next = swigValue+1;
 
  126    @SuppressWarnings(
"unused")
 
  127    private Status(Status swigEnum) {
 
  128      this.swigValue = swigEnum.swigValue;
 
  129      SwigNext.next = this.swigValue+1;
 
  132    private final int swigValue;
 
  134    private static class SwigNext {
 
  135      private static int next = 0;