Skip to content

InscoperAPI/Build/Java/com.inscoper.api/com/inscoper/api/Constraint.java

Packages

Name
com.inscoper.api

Classes

Name
class com.inscoper.api.Constraint
Constraint class defines limits and valid values for a parameter.

Source code

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

package com.inscoper.api;
import com.inscoper.api.logging.*;

public class Constraint {
  private transient long swigCPtr;
  private transient boolean swigCMemOwn;

  protected Constraint(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

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

  protected void swigSetCMemOwn(boolean own) {
    swigCMemOwn = own;
  }

  @SuppressWarnings({"deprecation", "removal"})
  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        InscoperJNI.delete_Constraint(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public boolean isReadOnly() throws com.inscoper.api.InscoperException {
    return InscoperJNI.Constraint_isReadOnly(swigCPtr, this);
  }

  public EParamType getType() throws com.inscoper.api.InscoperException {
    return EParamType.swigToEnum(InscoperJNI.Constraint_getType(swigCPtr, this));
  }

  public boolean hasMin() throws com.inscoper.api.InscoperException {
    return InscoperJNI.Constraint_hasMin(swigCPtr, this);
  }

  public double getMin() throws com.inscoper.api.InscoperException {
    return InscoperJNI.Constraint_getMin(swigCPtr, this);
  }

  public boolean hasMax() throws com.inscoper.api.InscoperException {
    return InscoperJNI.Constraint_hasMax(swigCPtr, this);
  }

  public double getMax() throws com.inscoper.api.InscoperException {
    return InscoperJNI.Constraint_getMax(swigCPtr, this);
  }

  public boolean hasStep() throws com.inscoper.api.InscoperException {
    return InscoperJNI.Constraint_hasStep(swigCPtr, this);
  }

  public double getStep() throws com.inscoper.api.InscoperException {
    return InscoperJNI.Constraint_getStep(swigCPtr, this);
  }

  public boolean hasKeyList() throws com.inscoper.api.InscoperException {
    return InscoperJNI.Constraint_hasKeyList(swigCPtr, this);
  }

  public boolean hasValueList() throws com.inscoper.api.InscoperException {
    return InscoperJNI.Constraint_hasValueList(swigCPtr, this);
  }

  public StringVector getValueList() throws com.inscoper.api.InscoperException {
    return new StringVector(InscoperJNI.Constraint_getValueList(swigCPtr, this), true);
  }

  public StringVector getKeyList() throws com.inscoper.api.InscoperException {
    return new StringVector(InscoperJNI.Constraint_getKeyList(swigCPtr, this), true);
  }

  public EParamType getKeyType() throws com.inscoper.api.InscoperException {
    return EParamType.swigToEnum(InscoperJNI.Constraint_getKeyType(swigCPtr, this));
  }

  public String getValue(String key) throws com.inscoper.api.InscoperException {
    return InscoperJNI.Constraint_getValue(swigCPtr, this, key);
  }

  public boolean hasSubConstraint(String property) throws com.inscoper.api.InscoperException {
    return InscoperJNI.Constraint_hasSubConstraint(swigCPtr, this, property);
  }

  public Constraint getSubConstraint(String property) throws com.inscoper.api.InscoperException {
    long cPtr = InscoperJNI.Constraint_getSubConstraint(swigCPtr, this, property);
    return (cPtr == 0) ? null : new Constraint(cPtr, true);
  }

  public Constraint cloneConstraint() {
    long cPtr = InscoperJNI.Constraint_cloneConstraint(swigCPtr, this);
    return (cPtr == 0) ? null : new Constraint(cPtr, true);
  }

}

Updated on 2026-09-03 at 12:14:19 +0200