9package com.google.ortools.util;
22 private transient long swigCPtr;
25 public Domain(
long cPtr,
boolean cMemoryOwn) {
31 return (obj ==
null) ? 0 : obj.swigCPtr;
38 throw new RuntimeException(
"Cannot release ownership as memory is not owned");
40 obj.swigCMemOwn =
false;
46 @SuppressWarnings({
"deprecation",
"removal"})
55 mainJNI.delete_Domain(swigCPtr);
65 this(mainJNI.new_Domain__SWIG_0(),
true);
72 this(mainJNI.new_Domain__SWIG_1(value),
true);
79 public Domain(
long left,
long right) {
80 this(mainJNI.new_Domain__SWIG_2(left, right),
true);
87 return new Domain(mainJNI.Domain_allValues(),
true);
95 return new Domain(mainJNI.Domain_fromValues(values),
true);
104 return new Domain(mainJNI.Domain_fromIntervals(intervals),
true);
113 return new Domain(mainJNI.Domain_fromFlatIntervals(flat_intervals),
true);
124 return mainJNI.Domain_flattenedIntervals(swigCPtr,
this);
131 return mainJNI.Domain_isEmpty(swigCPtr,
this);
138 return mainJNI.Domain_size(swigCPtr,
this);
146 return mainJNI.Domain_min(swigCPtr,
this);
154 return mainJNI.Domain_max(swigCPtr,
this);
161 return mainJNI.Domain_contains(swigCPtr,
this, value);
168 return new Domain(mainJNI.Domain_complement(swigCPtr,
this),
true);
178 return new Domain(mainJNI.Domain_negation(swigCPtr,
this),
true);
185 return new Domain(mainJNI.Domain_intersectionWith(swigCPtr,
this,
Domain.
getCPtr(domain), domain),
true);
192 return new Domain(mainJNI.Domain_unionWith(swigCPtr,
this,
Domain.
getCPtr(domain), domain),
true);
199 return new Domain(mainJNI.Domain_additionWith(swigCPtr,
this,
Domain.
getCPtr(domain), domain),
true);
206 return mainJNI.Domain_toString(swigCPtr,
this);
static Domain fromFlatIntervals(long[] flat_intervals)
Domain unionWith(Domain domain)
static Domain fromIntervals(long[][] intervals)
boolean contains(long value)
static Domain fromValues(long[] values)
transient boolean swigCMemOwn
static long swigRelease(Domain obj)
long[] flattenedIntervals()
Domain intersectionWith(Domain domain)
static long getCPtr(Domain obj)
synchronized void delete()
Domain(long cPtr, boolean cMemoryOwn)
Domain(long left, long right)
static Domain allValues()
Domain additionWith(Domain domain)