commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject cvs commit: jakarta-commons/lang/src/test/org/apache/commons/lang/math IntRangeTest.java FloatRangeTest.java LongRangeTest.java DoubleRangeTest.java NumberRangeTest.java AbstractRangeTest.java
Date Mon, 04 Aug 2003 01:14:02 GMT
scolebourne    2003/08/03 18:14:02

  Modified:    lang/src/java/org/apache/commons/lang/math Range.java
                        IntRange.java NumberRange.java FloatRange.java
                        LongRange.java DoubleRange.java
               lang/src/test/org/apache/commons/lang/math IntRangeTest.java
                        FloatRangeTest.java LongRangeTest.java
                        DoubleRangeTest.java NumberRangeTest.java
                        AbstractRangeTest.java
  Log:
  Rename  includeXxx()  to  containsXxx()
  for consistency with rest of [lang] and Java
  
  Revision  Changes    Path
  1.4       +27 -27    jakarta-commons/lang/src/java/org/apache/commons/lang/math/Range.java
  
  Index: Range.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/math/Range.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Range.java	24 Jun 2003 21:14:50 -0000	1.3
  +++ Range.java	4 Aug 2003 01:14:01 -0000	1.4
  @@ -203,7 +203,7 @@
        * @return <code>true</code> if the specified number occurs within this range
        * @throws IllegalArgumentException if the <code>Number</code> cannot be compared
        */
  -    public abstract boolean includesNumber(Number number);
  +    public abstract boolean containsNumber(Number number);
   
       /**
        * <p>Tests whether the specified <code>Number</code> occurs within
  @@ -211,17 +211,17 @@
        * 
        * <p><code>null</code> is handled and returns <code>false</code>.</p>
        * 
  -     * <p>This implementation forwards to the {@link #includesLong(long)} method.</p>
  +     * <p>This implementation forwards to the {@link #containsLong(long)} method.</p>
        *
        * @param value  the long to test, may be <code>null</code>
        * @return <code>true</code> if the specified number occurs within this
        *  range by <code>long</code> comparison
        */
  -    public boolean includesLong(Number value) {
  +    public boolean containsLong(Number value) {
           if (value == null) {
               return false;
           }
  -        return includesLong(value.longValue());
  +        return containsLong(value.longValue());
       }
   
       /**
  @@ -235,7 +235,7 @@
        * @return <code>true</code> if the specified number occurs within this
        *  range by <code>long</code> comparison
        */
  -    public boolean includesLong(long value) {
  +    public boolean containsLong(long value) {
           return (value >= getMinimumLong() && value <= getMaximumLong());
       }
   
  @@ -245,17 +245,17 @@
        * 
        * <p><code>null</code> is handled and returns <code>false</code>.</p>
        * 
  -     * <p>This implementation forwards to the {@link #includesInteger(int)} method.</p>
  +     * <p>This implementation forwards to the {@link #containsInteger(int)} method.</p>
        *
        * @param value  the integer to test, may be <code>null</code>
        * @return <code>true</code> if the specified number occurs within this
        *  range by <code>int</code> comparison
        */
  -    public boolean includesInteger(Number value) {
  +    public boolean containsInteger(Number value) {
           if (value == null) {
               return false;
           }
  -        return includesInteger(value.intValue());
  +        return containsInteger(value.intValue());
       }
   
       /**
  @@ -269,7 +269,7 @@
        * @return <code>true</code> if the specified number occurs within this
        *  range by <code>int</code> comparison
        */
  -    public boolean includesInteger(int value) {
  +    public boolean containsInteger(int value) {
           return (value >= getMinimumInteger() && value <= getMaximumInteger());
       }
   
  @@ -279,17 +279,17 @@
        * 
        * <p><code>null</code> is handled and returns <code>false</code>.</p>
        * 
  -     * <p>This implementation forwards to the {@link #includesDouble(double)} method.</p>
  +     * <p>This implementation forwards to the {@link #containsDouble(double)} method.</p>
        *
        * @param value  the double to test, may be <code>null</code>
        * @return <code>true</code> if the specified number occurs within this
        *  range by <code>double</code> comparison
        */
  -    public boolean includesDouble(Number value) {
  +    public boolean containsDouble(Number value) {
           if (value == null) {
               return false;
           }
  -        return includesDouble(value.doubleValue());
  +        return containsDouble(value.doubleValue());
       }
   
       /**
  @@ -303,7 +303,7 @@
        * @return <code>true</code> if the specified number occurs within this
        *  range by <code>double</code> comparison
        */
  -    public boolean includesDouble(double value) {
  +    public boolean containsDouble(double value) {
           int compareMin = NumberUtils.compare(getMinimumDouble(), value);
           int compareMax = NumberUtils.compare(getMaximumDouble(), value);
           return (compareMin <= 0 && compareMax >= 0);
  @@ -315,17 +315,17 @@
        * 
        * <p><code>null</code> is handled and returns <code>false</code>.</p>
        * 
  -     * <p>This implementation forwards to the {@link #includesFloat(float)} method.</p>
  +     * <p>This implementation forwards to the {@link #containsFloat(float)} method.</p>
        *
        * @param value  the float to test, may be <code>null</code>
        * @return <code>true</code> if the specified number occurs within this
        *  range by <code>float</code> comparison
        */
  -    public boolean includesFloat(Number value) {
  +    public boolean containsFloat(Number value) {
           if (value == null) {
               return false;
           }
  -        return includesFloat(value.floatValue());
  +        return containsFloat(value.floatValue());
       }
   
       /**
  @@ -339,7 +339,7 @@
        * @return <code>true</code> if the specified number occurs within this
        *  range by <code>float</code> comparison
        */
  -    public boolean includesFloat(float value) {
  +    public boolean containsFloat(float value) {
           int compareMin = NumberUtils.compare(getMinimumFloat(), value);
           int compareMax = NumberUtils.compare(getMaximumFloat(), value);
           return (compareMin <= 0 && compareMax >= 0);
  @@ -357,7 +357,7 @@
        * 
        * <p><code>null</code> is handled and returns <code>false</code>.</p>
        * 
  -     * <p>This implementation uses the {@link #includesNumber(Number)} method.
  +     * <p>This implementation uses the {@link #containsNumber(Number)} method.
        * Subclasses may be able to optimise this.</p>
        *
        * @param range  the range to test, may be <code>null</code>
  @@ -365,12 +365,12 @@
        *  this range; otherwise, <code>false</code>
        * @throws IllegalArgumentException if the <code>Range</code> cannot be compared
        */
  -    public boolean includesRange(Range range) {
  +    public boolean containsRange(Range range) {
           if (range == null) {
               return false;
           }
  -        return includesNumber(range.getMinimumNumber()) &&
  -               includesNumber(range.getMaximumNumber());
  +        return containsNumber(range.getMinimumNumber()) 
  +            && containsNumber(range.getMaximumNumber());
       }
   
       /**
  @@ -382,8 +382,8 @@
        * 
        * <p><code>null</code> is handled and returns <code>false</code>.</p>
        * 
  -     * <p>This implementation uses the {@link #includesNumber(Number)} and
  -     * {@link #includesRange(Range)} methods.
  +     * <p>This implementation uses the {@link #containsNumber(Number)} and
  +     * {@link #containsRange(Range)} methods.
        * Subclasses may be able to optimise this.</p>
        *
        * @param range  the range to test, may be <code>null</code>
  @@ -395,9 +395,9 @@
           if (range == null) {
               return false;
           }
  -        return range.includesNumber(getMinimumNumber()) ||
  -               range.includesNumber(getMaximumNumber()) || 
  -               includesNumber(range.getMinimumNumber());
  +        return range.containsNumber(getMinimumNumber())
  +            || range.containsNumber(getMaximumNumber())
  +            || containsNumber(range.getMinimumNumber());
       }
   
       // Basics
  
  
  
  1.4       +10 -10    jakarta-commons/lang/src/java/org/apache/commons/lang/math/IntRange.java
  
  Index: IntRange.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/math/IntRange.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- IntRange.java	14 Jul 2003 22:25:05 -0000	1.3
  +++ IntRange.java	4 Aug 2003 01:14:01 -0000	1.4
  @@ -295,11 +295,11 @@
        * @param number  the number to test, may be <code>null</code>
        * @return <code>true</code> if the specified number occurs within this range
        */
  -    public boolean includesNumber(Number number) {
  +    public boolean containsNumber(Number number) {
           if (number == null) {
               return false;
           }
  -        return includesInteger(number.intValue());
  +        return containsInteger(number.intValue());
       }
   
       /**
  @@ -313,7 +313,7 @@
        * @return <code>true</code> if the specified number occurs within this
        *  range by <code>int</code> comparison
        */
  -    public boolean includesInteger(int value) {
  +    public boolean containsInteger(int value) {
           return (value >= min && value <= max);
       }
   
  @@ -330,12 +330,12 @@
        * @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 includesRange(Range range) {
  +    public boolean containsRange(Range range) {
           if (range == null) {
               return false;
           }
  -        return includesInteger(range.getMinimumInteger()) &&
  -               includesInteger(range.getMaximumInteger());
  +        return containsInteger(range.getMinimumInteger()) &&
  +               containsInteger(range.getMaximumInteger());
       }
   
       /**
  @@ -351,9 +351,9 @@
           if (range == null) {
               return false;
           }
  -        return range.includesInteger(min) ||
  -               range.includesInteger(max) || 
  -               includesInteger(range.getMinimumInteger());
  +        return range.containsInteger(min) ||
  +               range.containsInteger(max) || 
  +               containsInteger(range.getMinimumInteger());
       }
   
       // Basics
  
  
  
  1.5       +2 -2      jakarta-commons/lang/src/java/org/apache/commons/lang/math/NumberRange.java
  
  Index: NumberRange.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/math/NumberRange.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- NumberRange.java	14 Jul 2003 22:25:05 -0000	1.4
  +++ NumberRange.java	4 Aug 2003 01:14:01 -0000	1.5
  @@ -198,7 +198,7 @@
        * @return <code>true</code> if the specified number occurs within this range
        * @throws IllegalArgumentException if the number is of a different type to the range
        */
  -    public boolean includesNumber(Number number) {
  +    public boolean containsNumber(Number number) {
           if (number == null) {
               return false;
           }
  
  
  
  1.4       +10 -10    jakarta-commons/lang/src/java/org/apache/commons/lang/math/FloatRange.java
  
  Index: FloatRange.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/math/FloatRange.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FloatRange.java	14 Jul 2003 22:25:04 -0000	1.3
  +++ FloatRange.java	4 Aug 2003 01:14:01 -0000	1.4
  @@ -320,11 +320,11 @@
        * @param number  the number to test, may be <code>null</code>
        * @return <code>true</code> if the specified number occurs within this range
        */
  -    public boolean includesNumber(Number number) {
  +    public boolean containsNumber(Number number) {
           if (number == null) {
               return false;
           }
  -        return includesFloat(number.floatValue());
  +        return containsFloat(number.floatValue());
       }
   
       /**
  @@ -338,7 +338,7 @@
        * @return <code>true</code> if the specified number occurs within this
        *  range by <code>float</code> comparison
        */
  -    public boolean includesFloat(float value) {
  +    public boolean containsFloat(float value) {
           return (value >= min && value <= max);
       }
   
  @@ -355,12 +355,12 @@
        * @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 includesRange(Range range) {
  +    public boolean containsRange(Range range) {
           if (range == null) {
               return false;
           }
  -        return includesFloat(range.getMinimumFloat()) &&
  -               includesFloat(range.getMaximumFloat());
  +        return containsFloat(range.getMinimumFloat()) &&
  +               containsFloat(range.getMaximumFloat());
       }
   
       /**
  @@ -376,9 +376,9 @@
           if (range == null) {
               return false;
           }
  -        return range.includesFloat(min) ||
  -               range.includesFloat(max) || 
  -               includesFloat(range.getMinimumFloat());
  +        return range.containsFloat(min) ||
  +               range.containsFloat(max) || 
  +               containsFloat(range.getMinimumFloat());
       }
   
       // Basics
  
  
  
  1.4       +10 -10    jakarta-commons/lang/src/java/org/apache/commons/lang/math/LongRange.java
  
  Index: LongRange.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/math/LongRange.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- LongRange.java	14 Jul 2003 22:25:05 -0000	1.3
  +++ LongRange.java	4 Aug 2003 01:14:02 -0000	1.4
  @@ -302,11 +302,11 @@
        * @param number  the number to test, may be <code>null</code>
        * @return <code>true</code> if the specified number occurs within this range
        */
  -    public boolean includesNumber(Number number) {
  +    public boolean containsNumber(Number number) {
           if (number == null) {
               return false;
           }
  -        return includesLong(number.longValue());
  +        return containsLong(number.longValue());
       }
   
       /**
  @@ -320,7 +320,7 @@
        * @return <code>true</code> if the specified number occurs within this
        *  range by <code>long</code> comparison
        */
  -    public boolean includesLong(long value) {
  +    public boolean containsLong(long value) {
           return (value >= min && value <= max);
       }
   
  @@ -337,12 +337,12 @@
        * @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 includesRange(Range range) {
  +    public boolean containsRange(Range range) {
           if (range == null) {
               return false;
           }
  -        return includesLong(range.getMinimumLong()) &&
  -               includesLong(range.getMaximumLong());
  +        return containsLong(range.getMinimumLong()) &&
  +               containsLong(range.getMaximumLong());
       }
   
       /**
  @@ -358,9 +358,9 @@
           if (range == null) {
               return false;
           }
  -        return range.includesLong(min) ||
  -               range.includesLong(max) || 
  -               includesLong(range.getMinimumLong());
  +        return range.containsLong(min) ||
  +               range.containsLong(max) || 
  +               containsLong(range.getMinimumLong());
       }
   
       // Basics
  
  
  
  1.4       +10 -10    jakarta-commons/lang/src/java/org/apache/commons/lang/math/DoubleRange.java
  
  Index: DoubleRange.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/math/DoubleRange.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DoubleRange.java	14 Jul 2003 22:25:04 -0000	1.3
  +++ DoubleRange.java	4 Aug 2003 01:14:02 -0000	1.4
  @@ -324,11 +324,11 @@
        * @param number  the number to test, may be <code>null</code>
        * @return <code>true</code> if the specified number occurs within this range
        */
  -    public boolean includesNumber(Number number) {
  +    public boolean containsNumber(Number number) {
           if (number == null) {
               return false;
           }
  -        return includesDouble(number.doubleValue());
  +        return containsDouble(number.doubleValue());
       }
   
       /**
  @@ -342,7 +342,7 @@
        * @return <code>true</code> if the specified number occurs within this
        *  range by <code>double</code> comparison
        */
  -    public boolean includesDouble(double value) {
  +    public boolean containsDouble(double value) {
           return (value >= min && value <= max);
       }
   
  @@ -359,12 +359,12 @@
        * @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 includesRange(Range range) {
  +    public boolean containsRange(Range range) {
           if (range == null) {
               return false;
           }
  -        return includesDouble(range.getMinimumDouble()) &&
  -               includesDouble(range.getMaximumDouble());
  +        return containsDouble(range.getMinimumDouble())
  +            && containsDouble(range.getMaximumDouble());
       }
   
       /**
  @@ -380,9 +380,9 @@
           if (range == null) {
               return false;
           }
  -        return range.includesDouble(min) ||
  -               range.includesDouble(max) || 
  -               includesDouble(range.getMinimumDouble());
  +        return range.containsDouble(min)
  +            || range.containsDouble(max)
  +            || containsDouble(range.getMinimumDouble());
       }
   
       // Basics
  
  
  
  1.3       +31 -31    jakarta-commons/lang/src/test/org/apache/commons/lang/math/IntRangeTest.java
  
  Index: IntRangeTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/test/org/apache/commons/lang/math/IntRangeTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- IntRangeTest.java	8 Jun 2003 14:19:43 -0000	1.2
  +++ IntRangeTest.java	4 Aug 2003 01:14:02 -0000	1.3
  @@ -148,39 +148,39 @@
   
       //--------------------------------------------------------------------------
   
  -    public void testIncludesNumber() {
  -        assertEquals(false, tenToTwenty.includesNumber(null));
  -        assertEquals(true, tenToTwenty.includesNumber(nonComparable));
  +    public void testContainsNumber() {
  +        assertEquals(false, tenToTwenty.containsNumber(null));
  +        assertEquals(true, tenToTwenty.containsNumber(nonComparable));
           
  -        assertEquals(false, tenToTwenty.includesNumber(five));
  -        assertEquals(true, tenToTwenty.includesNumber(ten));
  -        assertEquals(true, tenToTwenty.includesNumber(fifteen));
  -        assertEquals(true, tenToTwenty.includesNumber(twenty));
  -        assertEquals(false, tenToTwenty.includesNumber(twentyFive));
  +        assertEquals(false, tenToTwenty.containsNumber(five));
  +        assertEquals(true, tenToTwenty.containsNumber(ten));
  +        assertEquals(true, tenToTwenty.containsNumber(fifteen));
  +        assertEquals(true, tenToTwenty.containsNumber(twenty));
  +        assertEquals(false, tenToTwenty.containsNumber(twentyFive));
           
  -        assertEquals(false, tenToTwenty.includesNumber(long8));
  -        assertEquals(true, tenToTwenty.includesNumber(long10));
  -        assertEquals(true, tenToTwenty.includesNumber(long12));
  -        assertEquals(true, tenToTwenty.includesNumber(long20));
  -        assertEquals(false, tenToTwenty.includesNumber(long21));
  +        assertEquals(false, tenToTwenty.containsNumber(long8));
  +        assertEquals(true, tenToTwenty.containsNumber(long10));
  +        assertEquals(true, tenToTwenty.containsNumber(long12));
  +        assertEquals(true, tenToTwenty.containsNumber(long20));
  +        assertEquals(false, tenToTwenty.containsNumber(long21));
           
  -        assertEquals(false, tenToTwenty.includesNumber(double8));
  -        assertEquals(true, tenToTwenty.includesNumber(double10));
  -        assertEquals(true, tenToTwenty.includesNumber(double12));
  -        assertEquals(true, tenToTwenty.includesNumber(double20));
  -        assertEquals(false, tenToTwenty.includesNumber(double21));
  +        assertEquals(false, tenToTwenty.containsNumber(double8));
  +        assertEquals(true, tenToTwenty.containsNumber(double10));
  +        assertEquals(true, tenToTwenty.containsNumber(double12));
  +        assertEquals(true, tenToTwenty.containsNumber(double20));
  +        assertEquals(false, tenToTwenty.containsNumber(double21));
           
  -        assertEquals(false, tenToTwenty.includesNumber(float8));
  -        assertEquals(true, tenToTwenty.includesNumber(float10));
  -        assertEquals(true, tenToTwenty.includesNumber(float12));
  -        assertEquals(true, tenToTwenty.includesNumber(float20));
  -        assertEquals(false, tenToTwenty.includesNumber(float21));
  +        assertEquals(false, tenToTwenty.containsNumber(float8));
  +        assertEquals(true, tenToTwenty.containsNumber(float10));
  +        assertEquals(true, tenToTwenty.containsNumber(float12));
  +        assertEquals(true, tenToTwenty.containsNumber(float20));
  +        assertEquals(false, tenToTwenty.containsNumber(float21));
       }
   
  -    public void testIncludesIntegerBig() {
  +    public void testContainsIntegerBig() {
           IntRange big = new IntRange(Integer.MAX_VALUE, Integer.MAX_VALUE- 2);
  -        assertEquals(true, big.includesInteger(Integer.MAX_VALUE - 1));
  -        assertEquals(false, big.includesInteger(Integer.MAX_VALUE - 3));
  +        assertEquals(true, big.containsInteger(Integer.MAX_VALUE - 1));
  +        assertEquals(false, big.containsInteger(Integer.MAX_VALUE - 3));
       }
   
       //--------------------------------------------------------------------------
  
  
  
  1.3       +28 -28    jakarta-commons/lang/src/test/org/apache/commons/lang/math/FloatRangeTest.java
  
  Index: FloatRangeTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/test/org/apache/commons/lang/math/FloatRangeTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FloatRangeTest.java	8 Jun 2003 14:19:43 -0000	1.2
  +++ FloatRangeTest.java	4 Aug 2003 01:14:02 -0000	1.3
  @@ -167,33 +167,33 @@
   
       //--------------------------------------------------------------------------
   
  -    public void testIncludesNumber() {
  -        assertEquals(false, tenToTwenty.includesNumber(null));
  -        assertEquals(true, tenToTwenty.includesNumber(nonComparable));
  +    public void testContainsNumber() {
  +        assertEquals(false, tenToTwenty.containsNumber(null));
  +        assertEquals(true, tenToTwenty.containsNumber(nonComparable));
           
  -        assertEquals(false, tenToTwenty.includesNumber(five));
  -        assertEquals(true, tenToTwenty.includesNumber(ten));
  -        assertEquals(true, tenToTwenty.includesNumber(fifteen));
  -        assertEquals(true, tenToTwenty.includesNumber(twenty));
  -        assertEquals(false, tenToTwenty.includesNumber(twentyFive));
  +        assertEquals(false, tenToTwenty.containsNumber(five));
  +        assertEquals(true, tenToTwenty.containsNumber(ten));
  +        assertEquals(true, tenToTwenty.containsNumber(fifteen));
  +        assertEquals(true, tenToTwenty.containsNumber(twenty));
  +        assertEquals(false, tenToTwenty.containsNumber(twentyFive));
           
  -        assertEquals(false, tenToTwenty.includesNumber(long8));
  -        assertEquals(true, tenToTwenty.includesNumber(long10));
  -        assertEquals(true, tenToTwenty.includesNumber(long12));
  -        assertEquals(true, tenToTwenty.includesNumber(long20));
  -        assertEquals(false, tenToTwenty.includesNumber(long21));
  +        assertEquals(false, tenToTwenty.containsNumber(long8));
  +        assertEquals(true, tenToTwenty.containsNumber(long10));
  +        assertEquals(true, tenToTwenty.containsNumber(long12));
  +        assertEquals(true, tenToTwenty.containsNumber(long20));
  +        assertEquals(false, tenToTwenty.containsNumber(long21));
           
  -        assertEquals(false, tenToTwenty.includesNumber(double8));
  -        assertEquals(true, tenToTwenty.includesNumber(double10));
  -        assertEquals(true, tenToTwenty.includesNumber(double12));
  -        assertEquals(true, tenToTwenty.includesNumber(double20));
  -        assertEquals(false, tenToTwenty.includesNumber(double21));
  +        assertEquals(false, tenToTwenty.containsNumber(double8));
  +        assertEquals(true, tenToTwenty.containsNumber(double10));
  +        assertEquals(true, tenToTwenty.containsNumber(double12));
  +        assertEquals(true, tenToTwenty.containsNumber(double20));
  +        assertEquals(false, tenToTwenty.containsNumber(double21));
           
  -        assertEquals(false, tenToTwenty.includesNumber(float8));
  -        assertEquals(true, tenToTwenty.includesNumber(float10));
  -        assertEquals(true, tenToTwenty.includesNumber(float12));
  -        assertEquals(true, tenToTwenty.includesNumber(float20));
  -        assertEquals(false, tenToTwenty.includesNumber(float21));
  +        assertEquals(false, tenToTwenty.containsNumber(float8));
  +        assertEquals(true, tenToTwenty.containsNumber(float10));
  +        assertEquals(true, tenToTwenty.containsNumber(float12));
  +        assertEquals(true, tenToTwenty.containsNumber(float20));
  +        assertEquals(false, tenToTwenty.containsNumber(float21));
       }
   
       public void testToString() {
  
  
  
  1.3       +31 -31    jakarta-commons/lang/src/test/org/apache/commons/lang/math/LongRangeTest.java
  
  Index: LongRangeTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/test/org/apache/commons/lang/math/LongRangeTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LongRangeTest.java	8 Jun 2003 14:19:43 -0000	1.2
  +++ LongRangeTest.java	4 Aug 2003 01:14:02 -0000	1.3
  @@ -148,39 +148,39 @@
   
       //--------------------------------------------------------------------------
   
  -    public void testIncludesNumber() {
  -        assertEquals(false, tenToTwenty.includesNumber(null));
  -        assertEquals(true, tenToTwenty.includesNumber(nonComparable));
  +    public void testContainsNumber() {
  +        assertEquals(false, tenToTwenty.containsNumber(null));
  +        assertEquals(true, tenToTwenty.containsNumber(nonComparable));
           
  -        assertEquals(false, tenToTwenty.includesNumber(five));
  -        assertEquals(true, tenToTwenty.includesNumber(ten));
  -        assertEquals(true, tenToTwenty.includesNumber(fifteen));
  -        assertEquals(true, tenToTwenty.includesNumber(twenty));
  -        assertEquals(false, tenToTwenty.includesNumber(twentyFive));
  +        assertEquals(false, tenToTwenty.containsNumber(five));
  +        assertEquals(true, tenToTwenty.containsNumber(ten));
  +        assertEquals(true, tenToTwenty.containsNumber(fifteen));
  +        assertEquals(true, tenToTwenty.containsNumber(twenty));
  +        assertEquals(false, tenToTwenty.containsNumber(twentyFive));
           
  -        assertEquals(false, tenToTwenty.includesNumber(long8));
  -        assertEquals(true, tenToTwenty.includesNumber(long10));
  -        assertEquals(true, tenToTwenty.includesNumber(long12));
  -        assertEquals(true, tenToTwenty.includesNumber(long20));
  -        assertEquals(false, tenToTwenty.includesNumber(long21));
  +        assertEquals(false, tenToTwenty.containsNumber(long8));
  +        assertEquals(true, tenToTwenty.containsNumber(long10));
  +        assertEquals(true, tenToTwenty.containsNumber(long12));
  +        assertEquals(true, tenToTwenty.containsNumber(long20));
  +        assertEquals(false, tenToTwenty.containsNumber(long21));
           
  -        assertEquals(false, tenToTwenty.includesNumber(double8));
  -        assertEquals(true, tenToTwenty.includesNumber(double10));
  -        assertEquals(true, tenToTwenty.includesNumber(double12));
  -        assertEquals(true, tenToTwenty.includesNumber(double20));
  -        assertEquals(false, tenToTwenty.includesNumber(double21));
  +        assertEquals(false, tenToTwenty.containsNumber(double8));
  +        assertEquals(true, tenToTwenty.containsNumber(double10));
  +        assertEquals(true, tenToTwenty.containsNumber(double12));
  +        assertEquals(true, tenToTwenty.containsNumber(double20));
  +        assertEquals(false, tenToTwenty.containsNumber(double21));
           
  -        assertEquals(false, tenToTwenty.includesNumber(float8));
  -        assertEquals(true, tenToTwenty.includesNumber(float10));
  -        assertEquals(true, tenToTwenty.includesNumber(float12));
  -        assertEquals(true, tenToTwenty.includesNumber(float20));
  -        assertEquals(false, tenToTwenty.includesNumber(float21));
  +        assertEquals(false, tenToTwenty.containsNumber(float8));
  +        assertEquals(true, tenToTwenty.containsNumber(float10));
  +        assertEquals(true, tenToTwenty.containsNumber(float12));
  +        assertEquals(true, tenToTwenty.containsNumber(float20));
  +        assertEquals(false, tenToTwenty.containsNumber(float21));
       }
   
  -    public void testIncludesLongBig() {
  +    public void testContainsLongBig() {
           LongRange big = new LongRange(Long.MAX_VALUE, Long.MAX_VALUE- 2);
  -        assertEquals(true, big.includesLong(Long.MAX_VALUE - 1));
  -        assertEquals(false, big.includesLong(Long.MAX_VALUE - 3));
  +        assertEquals(true, big.containsLong(Long.MAX_VALUE - 1));
  +        assertEquals(false, big.containsLong(Long.MAX_VALUE - 3));
       }
   
       //--------------------------------------------------------------------------
  
  
  
  1.3       +28 -28    jakarta-commons/lang/src/test/org/apache/commons/lang/math/DoubleRangeTest.java
  
  Index: DoubleRangeTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/test/org/apache/commons/lang/math/DoubleRangeTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DoubleRangeTest.java	8 Jun 2003 14:19:43 -0000	1.2
  +++ DoubleRangeTest.java	4 Aug 2003 01:14:02 -0000	1.3
  @@ -167,33 +167,33 @@
   
       //--------------------------------------------------------------------------
   
  -    public void testIncludesNumber() {
  -        assertEquals(false, tenToTwenty.includesNumber(null));
  -        assertEquals(true, tenToTwenty.includesNumber(nonComparable));
  +    public void testContainsNumber() {
  +        assertEquals(false, tenToTwenty.containsNumber(null));
  +        assertEquals(true, tenToTwenty.containsNumber(nonComparable));
           
  -        assertEquals(false, tenToTwenty.includesNumber(five));
  -        assertEquals(true, tenToTwenty.includesNumber(ten));
  -        assertEquals(true, tenToTwenty.includesNumber(fifteen));
  -        assertEquals(true, tenToTwenty.includesNumber(twenty));
  -        assertEquals(false, tenToTwenty.includesNumber(twentyFive));
  +        assertEquals(false, tenToTwenty.containsNumber(five));
  +        assertEquals(true, tenToTwenty.containsNumber(ten));
  +        assertEquals(true, tenToTwenty.containsNumber(fifteen));
  +        assertEquals(true, tenToTwenty.containsNumber(twenty));
  +        assertEquals(false, tenToTwenty.containsNumber(twentyFive));
           
  -        assertEquals(false, tenToTwenty.includesNumber(long8));
  -        assertEquals(true, tenToTwenty.includesNumber(long10));
  -        assertEquals(true, tenToTwenty.includesNumber(long12));
  -        assertEquals(true, tenToTwenty.includesNumber(long20));
  -        assertEquals(false, tenToTwenty.includesNumber(long21));
  +        assertEquals(false, tenToTwenty.containsNumber(long8));
  +        assertEquals(true, tenToTwenty.containsNumber(long10));
  +        assertEquals(true, tenToTwenty.containsNumber(long12));
  +        assertEquals(true, tenToTwenty.containsNumber(long20));
  +        assertEquals(false, tenToTwenty.containsNumber(long21));
           
  -        assertEquals(false, tenToTwenty.includesNumber(double8));
  -        assertEquals(true, tenToTwenty.includesNumber(double10));
  -        assertEquals(true, tenToTwenty.includesNumber(double12));
  -        assertEquals(true, tenToTwenty.includesNumber(double20));
  -        assertEquals(false, tenToTwenty.includesNumber(double21));
  +        assertEquals(false, tenToTwenty.containsNumber(double8));
  +        assertEquals(true, tenToTwenty.containsNumber(double10));
  +        assertEquals(true, tenToTwenty.containsNumber(double12));
  +        assertEquals(true, tenToTwenty.containsNumber(double20));
  +        assertEquals(false, tenToTwenty.containsNumber(double21));
           
  -        assertEquals(false, tenToTwenty.includesNumber(float8));
  -        assertEquals(true, tenToTwenty.includesNumber(float10));
  -        assertEquals(true, tenToTwenty.includesNumber(float12));
  -        assertEquals(true, tenToTwenty.includesNumber(float20));
  -        assertEquals(false, tenToTwenty.includesNumber(float21));
  +        assertEquals(false, tenToTwenty.containsNumber(float8));
  +        assertEquals(true, tenToTwenty.containsNumber(float10));
  +        assertEquals(true, tenToTwenty.containsNumber(float12));
  +        assertEquals(true, tenToTwenty.containsNumber(float20));
  +        assertEquals(false, tenToTwenty.containsNumber(float21));
       }
   
       public void testToString() {
  
  
  
  1.3       +12 -12    jakarta-commons/lang/src/test/org/apache/commons/lang/math/NumberRangeTest.java
  
  Index: NumberRangeTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/test/org/apache/commons/lang/math/NumberRangeTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- NumberRangeTest.java	8 Jun 2003 14:19:43 -0000	1.2
  +++ NumberRangeTest.java	4 Aug 2003 01:14:02 -0000	1.3
  @@ -166,25 +166,25 @@
   
       //--------------------------------------------------------------------------
   
  -    public void testIncludesNumber() {
  -        assertEquals(false, tenToTwenty.includesNumber(null));
  -        assertEquals(false, tenToTwenty.includesNumber(five));
  -        assertEquals(true, tenToTwenty.includesNumber(ten));
  -        assertEquals(true, tenToTwenty.includesNumber(fifteen));
  -        assertEquals(true, tenToTwenty.includesNumber(twenty));
  -        assertEquals(false, tenToTwenty.includesNumber(twentyFive));
  +    public void testContainsNumber() {
  +        assertEquals(false, tenToTwenty.containsNumber(null));
  +        assertEquals(false, tenToTwenty.containsNumber(five));
  +        assertEquals(true, tenToTwenty.containsNumber(ten));
  +        assertEquals(true, tenToTwenty.containsNumber(fifteen));
  +        assertEquals(true, tenToTwenty.containsNumber(twenty));
  +        assertEquals(false, tenToTwenty.containsNumber(twentyFive));
           
           try {
  -            tenToTwenty.includesNumber(long21);
  +            tenToTwenty.containsNumber(long21);
               fail();
           } catch (IllegalArgumentException ex) {}
       }
   
  -    public void testIncludesLongBig() {
  +    public void testContainsLongBig() {
           // original NumberRange class failed this test
           NumberRange big = new NumberRange(new Long(Long.MAX_VALUE), new Long(Long.MAX_VALUE- 2));
  -        assertEquals(true, big.includesLong(Long.MAX_VALUE - 1));
  -        assertEquals(false, big.includesLong(Long.MAX_VALUE - 3));
  +        assertEquals(true, big.containsLong(Long.MAX_VALUE - 1));
  +        assertEquals(false, big.containsLong(Long.MAX_VALUE - 3));
       }
   
       //--------------------------------------------------------------------------
  
  
  
  1.3       +158 -158  jakarta-commons/lang/src/test/org/apache/commons/lang/math/AbstractRangeTest.java
  
  Index: AbstractRangeTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/test/org/apache/commons/lang/math/AbstractRangeTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractRangeTest.java	8 Jun 2003 14:19:43 -0000	1.2
  +++ AbstractRangeTest.java	4 Aug 2003 01:14:02 -0000	1.3
  @@ -153,175 +153,175 @@
   
       //--------------------------------------------------------------------------
   
  -    public void testIncludesLong() {
  -        assertEquals(false, tenToTwenty.includesLong(null));
  -        assertEquals(true, tenToTwenty.includesLong(nonComparable));
  -        
  -        assertEquals(false, tenToTwenty.includesLong(five));
  -        assertEquals(true, tenToTwenty.includesLong(ten));
  -        assertEquals(true, tenToTwenty.includesLong(fifteen));
  -        assertEquals(true, tenToTwenty.includesLong(twenty));
  -        assertEquals(false, tenToTwenty.includesLong(twentyFive));
  -        
  -        assertEquals(false, tenToTwenty.includesLong(long8));
  -        assertEquals(true, tenToTwenty.includesLong(long10));
  -        assertEquals(true, tenToTwenty.includesLong(long12));
  -        assertEquals(true, tenToTwenty.includesLong(long20));
  -        assertEquals(false, tenToTwenty.includesLong(long21));
  -        
  -        assertEquals(false, tenToTwenty.includesLong(double8));
  -        assertEquals(true, tenToTwenty.includesLong(double10));
  -        assertEquals(true, tenToTwenty.includesLong(double12));
  -        assertEquals(true, tenToTwenty.includesLong(double20));
  -        assertEquals(false, tenToTwenty.includesLong(double21));
  -        
  -        assertEquals(false, tenToTwenty.includesLong(float8));
  -        assertEquals(true, tenToTwenty.includesLong(float10));
  -        assertEquals(true, tenToTwenty.includesLong(float12));
  -        assertEquals(true, tenToTwenty.includesLong(float20));
  -        assertEquals(false, tenToTwenty.includesLong(float21));
  -        
  -        assertEquals(false, tenToTwenty.includesLong(9L));
  -        assertEquals(true, tenToTwenty.includesLong(10L));
  -        assertEquals(true, tenToTwenty.includesLong(15L));
  -        assertEquals(true, tenToTwenty.includesLong(20L));
  -        assertEquals(false, tenToTwenty.includesLong(21L));
  +    public void testContainsLong() {
  +        assertEquals(false, tenToTwenty.containsLong(null));
  +        assertEquals(true, tenToTwenty.containsLong(nonComparable));
  +        
  +        assertEquals(false, tenToTwenty.containsLong(five));
  +        assertEquals(true, tenToTwenty.containsLong(ten));
  +        assertEquals(true, tenToTwenty.containsLong(fifteen));
  +        assertEquals(true, tenToTwenty.containsLong(twenty));
  +        assertEquals(false, tenToTwenty.containsLong(twentyFive));
  +        
  +        assertEquals(false, tenToTwenty.containsLong(long8));
  +        assertEquals(true, tenToTwenty.containsLong(long10));
  +        assertEquals(true, tenToTwenty.containsLong(long12));
  +        assertEquals(true, tenToTwenty.containsLong(long20));
  +        assertEquals(false, tenToTwenty.containsLong(long21));
  +        
  +        assertEquals(false, tenToTwenty.containsLong(double8));
  +        assertEquals(true, tenToTwenty.containsLong(double10));
  +        assertEquals(true, tenToTwenty.containsLong(double12));
  +        assertEquals(true, tenToTwenty.containsLong(double20));
  +        assertEquals(false, tenToTwenty.containsLong(double21));
  +        
  +        assertEquals(false, tenToTwenty.containsLong(float8));
  +        assertEquals(true, tenToTwenty.containsLong(float10));
  +        assertEquals(true, tenToTwenty.containsLong(float12));
  +        assertEquals(true, tenToTwenty.containsLong(float20));
  +        assertEquals(false, tenToTwenty.containsLong(float21));
  +        
  +        assertEquals(false, tenToTwenty.containsLong(9L));
  +        assertEquals(true, tenToTwenty.containsLong(10L));
  +        assertEquals(true, tenToTwenty.containsLong(15L));
  +        assertEquals(true, tenToTwenty.containsLong(20L));
  +        assertEquals(false, tenToTwenty.containsLong(21L));
       }
           
  -    public void testIncludesInteger() {
  -        assertEquals(false, tenToTwenty.includesInteger(null));
  -        assertEquals(true, tenToTwenty.includesInteger(nonComparable));
  -        
  -        assertEquals(false, tenToTwenty.includesInteger(five));
  -        assertEquals(true, tenToTwenty.includesInteger(ten));
  -        assertEquals(true, tenToTwenty.includesInteger(fifteen));
  -        assertEquals(true, tenToTwenty.includesInteger(twenty));
  -        assertEquals(false, tenToTwenty.includesInteger(twentyFive));
  -        
  -        assertEquals(false, tenToTwenty.includesInteger(long8));
  -        assertEquals(true, tenToTwenty.includesInteger(long10));
  -        assertEquals(true, tenToTwenty.includesInteger(long12));
  -        assertEquals(true, tenToTwenty.includesInteger(long20));
  -        assertEquals(false, tenToTwenty.includesInteger(long21));
  -        
  -        assertEquals(false, tenToTwenty.includesInteger(double8));
  -        assertEquals(true, tenToTwenty.includesInteger(double10));
  -        assertEquals(true, tenToTwenty.includesInteger(double12));
  -        assertEquals(true, tenToTwenty.includesInteger(double20));
  -        assertEquals(false, tenToTwenty.includesInteger(double21));
  -        
  -        assertEquals(false, tenToTwenty.includesInteger(float8));
  -        assertEquals(true, tenToTwenty.includesInteger(float10));
  -        assertEquals(true, tenToTwenty.includesInteger(float12));
  -        assertEquals(true, tenToTwenty.includesInteger(float20));
  -        assertEquals(false, tenToTwenty.includesInteger(float21));
  -        
  -        assertEquals(false, tenToTwenty.includesInteger(9));
  -        assertEquals(true, tenToTwenty.includesInteger(10));
  -        assertEquals(true, tenToTwenty.includesInteger(15));
  -        assertEquals(true, tenToTwenty.includesInteger(20));
  -        assertEquals(false, tenToTwenty.includesInteger(21));
  +    public void testContainsInteger() {
  +        assertEquals(false, tenToTwenty.containsInteger(null));
  +        assertEquals(true, tenToTwenty.containsInteger(nonComparable));
  +        
  +        assertEquals(false, tenToTwenty.containsInteger(five));
  +        assertEquals(true, tenToTwenty.containsInteger(ten));
  +        assertEquals(true, tenToTwenty.containsInteger(fifteen));
  +        assertEquals(true, tenToTwenty.containsInteger(twenty));
  +        assertEquals(false, tenToTwenty.containsInteger(twentyFive));
  +        
  +        assertEquals(false, tenToTwenty.containsInteger(long8));
  +        assertEquals(true, tenToTwenty.containsInteger(long10));
  +        assertEquals(true, tenToTwenty.containsInteger(long12));
  +        assertEquals(true, tenToTwenty.containsInteger(long20));
  +        assertEquals(false, tenToTwenty.containsInteger(long21));
  +        
  +        assertEquals(false, tenToTwenty.containsInteger(double8));
  +        assertEquals(true, tenToTwenty.containsInteger(double10));
  +        assertEquals(true, tenToTwenty.containsInteger(double12));
  +        assertEquals(true, tenToTwenty.containsInteger(double20));
  +        assertEquals(false, tenToTwenty.containsInteger(double21));
  +        
  +        assertEquals(false, tenToTwenty.containsInteger(float8));
  +        assertEquals(true, tenToTwenty.containsInteger(float10));
  +        assertEquals(true, tenToTwenty.containsInteger(float12));
  +        assertEquals(true, tenToTwenty.containsInteger(float20));
  +        assertEquals(false, tenToTwenty.containsInteger(float21));
  +        
  +        assertEquals(false, tenToTwenty.containsInteger(9));
  +        assertEquals(true, tenToTwenty.containsInteger(10));
  +        assertEquals(true, tenToTwenty.containsInteger(15));
  +        assertEquals(true, tenToTwenty.containsInteger(20));
  +        assertEquals(false, tenToTwenty.containsInteger(21));
       }
   
  -    public void testIncludesDouble() {
  -        assertEquals(false, tenToTwenty.includesDouble(null));
  -        assertEquals(true, tenToTwenty.includesDouble(nonComparable));
  -        
  -        assertEquals(false, tenToTwenty.includesDouble(five));
  -        assertEquals(true, tenToTwenty.includesDouble(ten));
  -        assertEquals(true, tenToTwenty.includesDouble(fifteen));
  -        assertEquals(true, tenToTwenty.includesDouble(twenty));
  -        assertEquals(false, tenToTwenty.includesDouble(twentyFive));
  -        
  -        assertEquals(false, tenToTwenty.includesDouble(long8));
  -        assertEquals(true, tenToTwenty.includesDouble(long10));
  -        assertEquals(true, tenToTwenty.includesDouble(long12));
  -        assertEquals(true, tenToTwenty.includesDouble(long20));
  -        assertEquals(false, tenToTwenty.includesDouble(long21));
  -        
  -        assertEquals(false, tenToTwenty.includesDouble(double8));
  -        assertEquals(true, tenToTwenty.includesDouble(double10));
  -        assertEquals(true, tenToTwenty.includesDouble(double12));
  -        assertEquals(true, tenToTwenty.includesDouble(double20));
  -        assertEquals(false, tenToTwenty.includesDouble(double21));
  -        
  -        assertEquals(false, tenToTwenty.includesDouble(float8));
  -        assertEquals(true, tenToTwenty.includesDouble(float10));
  -        assertEquals(true, tenToTwenty.includesDouble(float12));
  -        assertEquals(true, tenToTwenty.includesDouble(float20));
  -        assertEquals(false, tenToTwenty.includesDouble(float21));
  -        
  -        assertEquals(false, tenToTwenty.includesDouble(9d));
  -        assertEquals(true, tenToTwenty.includesDouble(10d));
  -        assertEquals(true, tenToTwenty.includesDouble(15d));
  -        assertEquals(true, tenToTwenty.includesDouble(20d));
  -        assertEquals(false, tenToTwenty.includesDouble(21d));
  +    public void testContainsDouble() {
  +        assertEquals(false, tenToTwenty.containsDouble(null));
  +        assertEquals(true, tenToTwenty.containsDouble(nonComparable));
  +        
  +        assertEquals(false, tenToTwenty.containsDouble(five));
  +        assertEquals(true, tenToTwenty.containsDouble(ten));
  +        assertEquals(true, tenToTwenty.containsDouble(fifteen));
  +        assertEquals(true, tenToTwenty.containsDouble(twenty));
  +        assertEquals(false, tenToTwenty.containsDouble(twentyFive));
  +        
  +        assertEquals(false, tenToTwenty.containsDouble(long8));
  +        assertEquals(true, tenToTwenty.containsDouble(long10));
  +        assertEquals(true, tenToTwenty.containsDouble(long12));
  +        assertEquals(true, tenToTwenty.containsDouble(long20));
  +        assertEquals(false, tenToTwenty.containsDouble(long21));
  +        
  +        assertEquals(false, tenToTwenty.containsDouble(double8));
  +        assertEquals(true, tenToTwenty.containsDouble(double10));
  +        assertEquals(true, tenToTwenty.containsDouble(double12));
  +        assertEquals(true, tenToTwenty.containsDouble(double20));
  +        assertEquals(false, tenToTwenty.containsDouble(double21));
  +        
  +        assertEquals(false, tenToTwenty.containsDouble(float8));
  +        assertEquals(true, tenToTwenty.containsDouble(float10));
  +        assertEquals(true, tenToTwenty.containsDouble(float12));
  +        assertEquals(true, tenToTwenty.containsDouble(float20));
  +        assertEquals(false, tenToTwenty.containsDouble(float21));
  +        
  +        assertEquals(false, tenToTwenty.containsDouble(9d));
  +        assertEquals(true, tenToTwenty.containsDouble(10d));
  +        assertEquals(true, tenToTwenty.containsDouble(15d));
  +        assertEquals(true, tenToTwenty.containsDouble(20d));
  +        assertEquals(false, tenToTwenty.containsDouble(21d));
       }
   
  -    public void testIncludesFloat() {
  -        assertEquals(false, tenToTwenty.includesFloat(null));
  -        assertEquals(true, tenToTwenty.includesFloat(nonComparable));
  -        
  -        assertEquals(false, tenToTwenty.includesFloat(five));
  -        assertEquals(true, tenToTwenty.includesFloat(ten));
  -        assertEquals(true, tenToTwenty.includesFloat(fifteen));
  -        assertEquals(true, tenToTwenty.includesFloat(twenty));
  -        assertEquals(false, tenToTwenty.includesFloat(twentyFive));
  -        
  -        assertEquals(false, tenToTwenty.includesFloat(long8));
  -        assertEquals(true, tenToTwenty.includesFloat(long10));
  -        assertEquals(true, tenToTwenty.includesFloat(long12));
  -        assertEquals(true, tenToTwenty.includesFloat(long20));
  -        assertEquals(false, tenToTwenty.includesFloat(long21));
  -        
  -        assertEquals(false, tenToTwenty.includesFloat(double8));
  -        assertEquals(true, tenToTwenty.includesFloat(double10));
  -        assertEquals(true, tenToTwenty.includesFloat(double12));
  -        assertEquals(true, tenToTwenty.includesFloat(double20));
  -        assertEquals(false, tenToTwenty.includesFloat(double21));
  -        
  -        assertEquals(false, tenToTwenty.includesFloat(float8));
  -        assertEquals(true, tenToTwenty.includesFloat(float10));
  -        assertEquals(true, tenToTwenty.includesFloat(float12));
  -        assertEquals(true, tenToTwenty.includesFloat(float20));
  -        assertEquals(false, tenToTwenty.includesFloat(float21));
  -        
  -        assertEquals(false, tenToTwenty.includesFloat(9f));
  -        assertEquals(true, tenToTwenty.includesFloat(10f));
  -        assertEquals(true, tenToTwenty.includesFloat(15f));
  -        assertEquals(true, tenToTwenty.includesFloat(20f));
  -        assertEquals(false, tenToTwenty.includesFloat(21f));
  +    public void testContainsFloat() {
  +        assertEquals(false, tenToTwenty.containsFloat(null));
  +        assertEquals(true, tenToTwenty.containsFloat(nonComparable));
  +        
  +        assertEquals(false, tenToTwenty.containsFloat(five));
  +        assertEquals(true, tenToTwenty.containsFloat(ten));
  +        assertEquals(true, tenToTwenty.containsFloat(fifteen));
  +        assertEquals(true, tenToTwenty.containsFloat(twenty));
  +        assertEquals(false, tenToTwenty.containsFloat(twentyFive));
  +        
  +        assertEquals(false, tenToTwenty.containsFloat(long8));
  +        assertEquals(true, tenToTwenty.containsFloat(long10));
  +        assertEquals(true, tenToTwenty.containsFloat(long12));
  +        assertEquals(true, tenToTwenty.containsFloat(long20));
  +        assertEquals(false, tenToTwenty.containsFloat(long21));
  +        
  +        assertEquals(false, tenToTwenty.containsFloat(double8));
  +        assertEquals(true, tenToTwenty.containsFloat(double10));
  +        assertEquals(true, tenToTwenty.containsFloat(double12));
  +        assertEquals(true, tenToTwenty.containsFloat(double20));
  +        assertEquals(false, tenToTwenty.containsFloat(double21));
  +        
  +        assertEquals(false, tenToTwenty.containsFloat(float8));
  +        assertEquals(true, tenToTwenty.containsFloat(float10));
  +        assertEquals(true, tenToTwenty.containsFloat(float12));
  +        assertEquals(true, tenToTwenty.containsFloat(float20));
  +        assertEquals(false, tenToTwenty.containsFloat(float21));
  +        
  +        assertEquals(false, tenToTwenty.containsFloat(9f));
  +        assertEquals(true, tenToTwenty.containsFloat(10f));
  +        assertEquals(true, tenToTwenty.containsFloat(15f));
  +        assertEquals(true, tenToTwenty.containsFloat(20f));
  +        assertEquals(false, tenToTwenty.containsFloat(21f));
       }
   
       //--------------------------------------------------------------------------
   
  -    public void testIncludesRange() {
  -        assertEquals(false, tenToTwenty.includesRange(createRange(five, five)));
  -        assertEquals(false, tenToTwenty.includesRange(createRange(five, ten)));
  -        assertEquals(false, tenToTwenty.includesRange(createRange(five, twelve)));
  -        assertEquals(false, tenToTwenty.includesRange(createRange(five, fifteen)));
  -        assertEquals(false, tenToTwenty.includesRange(createRange(five, twenty)));
  -        assertEquals(false, tenToTwenty.includesRange(createRange(five, twentyFive)));
  -        
  -        assertEquals(true, tenToTwenty.includesRange(createRange(ten, ten)));
  -        assertEquals(true, tenToTwenty.includesRange(createRange(ten, twelve)));
  -        assertEquals(true, tenToTwenty.includesRange(createRange(ten, fifteen)));
  -        assertEquals(true, tenToTwenty.includesRange(createRange(ten, twenty)));
  -        assertEquals(false, tenToTwenty.includesRange(createRange(ten, twentyFive)));
  -        
  -        assertEquals(true, tenToTwenty.includesRange(createRange(twelve, twelve)));
  -        assertEquals(true, tenToTwenty.includesRange(createRange(twelve, fifteen)));
  -        assertEquals(true, tenToTwenty.includesRange(createRange(twelve, twenty)));
  -        assertEquals(false, tenToTwenty.includesRange(createRange(twelve, twentyFive)));
  -        
  -        assertEquals(true, tenToTwenty.includesRange(createRange(fifteen, fifteen)));
  -        assertEquals(true, tenToTwenty.includesRange(createRange(fifteen, twenty)));
  -        assertEquals(false, tenToTwenty.includesRange(createRange(fifteen, twentyFive)));
  +    public void testContainsRange() {
  +        assertEquals(false, tenToTwenty.containsRange(createRange(five, five)));
  +        assertEquals(false, tenToTwenty.containsRange(createRange(five, ten)));
  +        assertEquals(false, tenToTwenty.containsRange(createRange(five, twelve)));
  +        assertEquals(false, tenToTwenty.containsRange(createRange(five, fifteen)));
  +        assertEquals(false, tenToTwenty.containsRange(createRange(five, twenty)));
  +        assertEquals(false, tenToTwenty.containsRange(createRange(five, twentyFive)));
  +        
  +        assertEquals(true, tenToTwenty.containsRange(createRange(ten, ten)));
  +        assertEquals(true, tenToTwenty.containsRange(createRange(ten, twelve)));
  +        assertEquals(true, tenToTwenty.containsRange(createRange(ten, fifteen)));
  +        assertEquals(true, tenToTwenty.containsRange(createRange(ten, twenty)));
  +        assertEquals(false, tenToTwenty.containsRange(createRange(ten, twentyFive)));
  +        
  +        assertEquals(true, tenToTwenty.containsRange(createRange(twelve, twelve)));
  +        assertEquals(true, tenToTwenty.containsRange(createRange(twelve, fifteen)));
  +        assertEquals(true, tenToTwenty.containsRange(createRange(twelve, twenty)));
  +        assertEquals(false, tenToTwenty.containsRange(createRange(twelve, twentyFive)));
  +        
  +        assertEquals(true, tenToTwenty.containsRange(createRange(fifteen, fifteen)));
  +        assertEquals(true, tenToTwenty.containsRange(createRange(fifteen, twenty)));
  +        assertEquals(false, tenToTwenty.containsRange(createRange(fifteen, twentyFive)));
           
  -        assertEquals(true, tenToTwenty.includesRange(createRange(twenty, twenty)));
  -        assertEquals(false, tenToTwenty.includesRange(createRange(twenty, twentyFive)));
  +        assertEquals(true, tenToTwenty.containsRange(createRange(twenty, twenty)));
  +        assertEquals(false, tenToTwenty.containsRange(createRange(twenty, twentyFive)));
           
  -        assertEquals(false, tenToTwenty.includesRange(createRange(twentyFive, twentyFive)));
  +        assertEquals(false, tenToTwenty.containsRange(createRange(twentyFive, twentyFive)));
       }
   
       public void testOverlapsRange() {
  
  
  

Mime
View raw message