Author: bayard Date: Thu Dec 17 11:13:39 2009 New Revision: 891635 URL: http://svn.apache.org/viewvc?rev=891635&view=rev Log: Improving doc to indicate null->false for elementBefore(T) and elementAfter(T). LANG-551
Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang3/Range.java Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang3/Range.java URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang3/Range.java?rev=891635&r1=891634&r2=891635&view=diff ============================================================================== --- commons/proper/lang/trunk/src/java/org/apache/commons/lang3/Range.java (original) +++ commons/proper/lang/trunk/src/java/org/apache/commons/lang3/Range.java Thu Dec 17 11:13:39 2009 @@ -180,12 +180,14 @@ /** * <p>Tests whether the specified element occurs before this range.</p> * - * @param element the element to test + * <p><code>null</code> is handled and returns <code>false</code>.</p> + * + * @param element the element to test, may be <code>null</code> * @return <code>true</code> if the specified element occurs before this range */ public boolean elementBefore(T element) { if (element == null) { - return false; // ?? + return false; } return this.comparator.compare(element, getMinimum()) < 0; @@ -194,12 +196,14 @@ /** * <p>Tests whether the specified element occurs after this range.</p> * - * @param element the element to test + * <p><code>null</code> is handled and returns <code>false</code>.</p> + * + * @param element the element to test, may be <code>null</code> * @return <code>true</code> if the specified element occurs after this range */ public boolean elementAfter(T element) { if (element == null) { - return false; // ?? + return false; } return this.comparator.compare(element, getMaximum()) > 0;