com.google.ortools.util.Domain Maven / Gradle / Ivy
The newest version!
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.google.ortools.util;
public class Domain {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
/*PTRCTOR_VISIBILITY=*/public Domain(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
/*CPTR_VISIBILITY=*/protected static long getCPtr(Domain obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
mainJNI.delete_Domain(swigCPtr);
}
swigCPtr = 0;
}
}
public Domain() {
this(mainJNI.new_Domain__SWIG_0(), true);
}
public Domain(long value) {
this(mainJNI.new_Domain__SWIG_1(value), true);
}
public Domain(long left, long right) {
this(mainJNI.new_Domain__SWIG_2(left, right), true);
}
public static Domain allValues() {
return new Domain(mainJNI.Domain_allValues(), true);
}
public static Domain fromValues(long[] values) {
return new Domain(mainJNI.Domain_fromValues(values), true);
}
public static Domain fromIntervals(long[][] intervals) {
return new Domain(mainJNI.Domain_fromIntervals(intervals), true);
}
public static Domain fromFlatIntervals(long[] flat_intervals) {
return new Domain(mainJNI.Domain_fromFlatIntervals(flat_intervals), true);
}
public long[] flattenedIntervals() {
return mainJNI.Domain_flattenedIntervals(swigCPtr, this);
}
public boolean isEmpty() {
return mainJNI.Domain_isEmpty(swigCPtr, this);
}
public long size() {
return mainJNI.Domain_size(swigCPtr, this);
}
public long min() {
return mainJNI.Domain_min(swigCPtr, this);
}
public long max() {
return mainJNI.Domain_max(swigCPtr, this);
}
public boolean contains(long value) {
return mainJNI.Domain_contains(swigCPtr, this, value);
}
public Domain complement() {
return new Domain(mainJNI.Domain_complement(swigCPtr, this), true);
}
public Domain negation() {
return new Domain(mainJNI.Domain_negation(swigCPtr, this), true);
}
public Domain intersectionWith(Domain domain) {
return new Domain(mainJNI.Domain_intersectionWith(swigCPtr, this, Domain.getCPtr(domain), domain), true);
}
public Domain unionWith(Domain domain) {
return new Domain(mainJNI.Domain_unionWith(swigCPtr, this, Domain.getCPtr(domain), domain), true);
}
public Domain additionWith(Domain domain) {
return new Domain(mainJNI.Domain_additionWith(swigCPtr, this, Domain.getCPtr(domain), domain), true);
}
public String toString() {
return mainJNI.Domain_toString(swigCPtr, this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy