All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.ortools.constraintsolver.IntExpr Maven / Gradle / Ivy

The newest version!
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 3.0.10
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.google.ortools.constraintsolver;

public class IntExpr extends PropagationBaseObject {
  private transient long swigCPtr;

  protected IntExpr(long cPtr, boolean cMemoryOwn) {
    super(operations_research_constraint_solverJNI.IntExpr_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  protected static long getCPtr(IntExpr obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        operations_research_constraint_solverJNI.delete_IntExpr(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public long min() {
    return operations_research_constraint_solverJNI.IntExpr_min(swigCPtr, this);
  }

  public void setMin(long m) {
    operations_research_constraint_solverJNI.IntExpr_setMin(swigCPtr, this, m);
  }

  public long max() {
    return operations_research_constraint_solverJNI.IntExpr_max(swigCPtr, this);
  }

  public void setMax(long m) {
    operations_research_constraint_solverJNI.IntExpr_setMax(swigCPtr, this, m);
  }

  public void range(SWIGTYPE_p_long_long l, SWIGTYPE_p_long_long u) {
    operations_research_constraint_solverJNI.IntExpr_range(swigCPtr, this, SWIGTYPE_p_long_long.getCPtr(l), SWIGTYPE_p_long_long.getCPtr(u));
  }

  public void setRange(long l, long u) {
    operations_research_constraint_solverJNI.IntExpr_setRange(swigCPtr, this, l, u);
  }

  public void setValue(long v) {
    operations_research_constraint_solverJNI.IntExpr_setValue(swigCPtr, this, v);
  }

  public boolean bound() {
    return operations_research_constraint_solverJNI.IntExpr_bound(swigCPtr, this);
  }

  public boolean isVar() {
    return operations_research_constraint_solverJNI.IntExpr_isVar(swigCPtr, this);
  }

  public IntVar var() {
    long cPtr = operations_research_constraint_solverJNI.IntExpr_var(swigCPtr, this);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public IntVar VarWithName(String name) {
    long cPtr = operations_research_constraint_solverJNI.IntExpr_VarWithName(swigCPtr, this, name);
    return (cPtr == 0) ? null : new IntVar(cPtr, false);
  }

  public void WhenRange(Demon d) {
    operations_research_constraint_solverJNI.IntExpr_WhenRange__SWIG_0(swigCPtr, this, Demon.getCPtr(d), d);
  }

  public void WhenRange(VoidToVoid closure) {
    operations_research_constraint_solverJNI.IntExpr_WhenRange__SWIG_1(swigCPtr, this, closure);
  }

  public void accept(ModelVisitor visitor) {
    operations_research_constraint_solverJNI.IntExpr_accept(swigCPtr, this, ModelVisitor.getCPtr(visitor), visitor);
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy