예제 #1
0
 /**
  * Tests whether the specified range overlaps with this range using <code>float</code> comparison.
  *
  * <p><code>null</code> is handled and returns <code>false</code>.
  *
  * @param range the range to test, may be <code>null</code>
  * @return <code>true</code> if the specified range overlaps with this range
  */
 public boolean overlapsRange(Range range) {
   if (range == null) {
     return false;
   }
   return range.containsFloat(min)
       || range.containsFloat(max)
       || containsFloat(range.getMinimumFloat());
 }
예제 #2
0
 /**
  * Tests whether the specified range occurs entirely within this range using <code>float</code>
  * comparison.
  *
  * <p><code>null</code> is handled and returns <code>false</code>.
  *
  * @param range the range to test, may be <code>null</code>
  * @return <code>true</code> if the specified range occurs entirely within this range
  * @throws IllegalArgumentException if the range is not of this type
  */
 public boolean containsRange(Range range) {
   if (range == null) {
     return false;
   }
   return containsFloat(range.getMinimumFloat()) && containsFloat(range.getMaximumFloat());
 }