public RestrictedRealDatatype(final Datatype<? extends Number> datatype, final OWLRealInterval interval) { _datatype = datatype; _empty = new EmptyRestrictedDatatype<>(datatype); _intervals = Collections.singletonList(interval); _finite = interval.isFinite(); _enumerable = interval.isPoint() || interval.getType().equals(OWLRealInterval.LineType.INTEGER_ONLY); }
public RestrictedRealDatatype(final Datatype<? extends Number> datatype, final OWLRealInterval interval) { _datatype = datatype; _empty = new EmptyRestrictedDatatype<>(datatype); _intervals = Collections.singletonList(interval); _finite = interval.isFinite(); _enumerable = interval.isPoint() || interval.getType().equals(OWLRealInterval.LineType.INTEGER_ONLY); }
if (!i.isPoint() && !i.getType().equals(OWLRealInterval.LineType.INTEGER_ONLY))
if (!i.isPoint() && !i.getType().equals(OWLRealInterval.LineType.INTEGER_ONLY))
return Collections.singletonList(getUpper()).iterator(); else if (LineType.INTEGER_ONLY.equals(getType()))
return Collections.singletonList(getUpper()).iterator(); else if (LineType.INTEGER_ONLY.equals(getType()))
/** * Get the subinterval less than n * * @param n * @return a new interval, formed by intersecting this interval with (-inf,n) or <code>null</code> if that intersection is empty */ public OWLRealInterval less(final Number n) { if (boundUpper() && OWLRealUtils.compare(n, getUpper()) > 0) return this; else if (boundLower() && OWLRealUtils.compare(n, getLower()) <= 0) return null; return new OWLRealInterval(getLower(), n, inclusiveLower(), false, getType()); }
/** * Get the subinterval greater than n * * @param n * @return a new interval, formed by intersecting this interval with (n,+inf) or <code>null</code> if that intersection is empty */ public OWLRealInterval greater(final Number n) { if (boundLower() && OWLRealUtils.compare(n, getLower()) < 0) return this; else if (boundUpper() && OWLRealUtils.compare(n, getUpper()) >= 0) return null; return new OWLRealInterval(n, getUpper(), false, inclusiveUpper(), getType()); }
/** * Get the subinterval less than n * * @param n * @return a new interval, formed by intersecting this interval with (-inf,n) or <code>null</code> if that intersection is empty */ public OWLRealInterval less(final Number n) { if (boundUpper() && OWLRealUtils.compare(n, getUpper()) > 0) return this; else if (boundLower() && OWLRealUtils.compare(n, getLower()) <= 0) return null; return new OWLRealInterval(getLower(), n, inclusiveLower(), false, getType()); }
/** * Get the subinterval greater than n * * @param n * @return a new interval, formed by intersecting this interval with (n,+inf) or <code>null</code> if that intersection is empty */ public OWLRealInterval greater(final Number n) { if (boundLower() && OWLRealUtils.compare(n, getLower()) < 0) return this; else if (boundUpper() && OWLRealUtils.compare(n, getUpper()) >= 0) return null; return new OWLRealInterval(n, getUpper(), false, inclusiveUpper(), getType()); }