/** * 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 FloatingPointInterval<T> less(final T n) { if (n == null) throw new NullPointerException(); if (_type.isNaN(n)) throw new IllegalArgumentException(); if (getUpper().compareTo(n) <= 0) return this; else if (getLower().compareTo(n) >= 0) return null; else return create(getLower(), _type.decrement(n)); }
/** * 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 FloatingPointInterval<T> less(final T n) { if (n == null) throw new NullPointerException(); if (_type.isNaN(n)) throw new IllegalArgumentException(); if (getUpper().compareTo(n) <= 0) return this; else if (getLower().compareTo(n) >= 0) return null; else return create(getLower(), _type.decrement(n)); }
final T f = _type.decrement(other._lower); if (f.equals(_type.getNegativeInfinity())) before = null;
final T f = _type.decrement(other._lower); if (f.equals(_type.getNegativeInfinity())) before = null;
return _empty; else upper = _type.decrement(n);
return _empty; else upper = _type.decrement(n);