diff --git a/src/java/org/apache/commons/collections/comparators/BooleanComparator.java b/src/java/org/apache/commons/collections/comparators/BooleanComparator.java
index d10211934..95a96e285 100644
--- a/src/java/org/apache/commons/collections/comparators/BooleanComparator.java
+++ b/src/java/org/apache/commons/collections/comparators/BooleanComparator.java
@@ -26,52 +26,54 @@ import java.util.Comparator;
* @see #getBooleanComparator
*
* @since Commons Collections 3.0
- * @version $Revision: 1.11 $ $Date: 2004/02/18 00:59:06 $
+ * @version $Revision: 1.12 $ $Date: 2004/04/27 22:57:00 $
*
* @author Rodney Waldhoff
*/
public final class BooleanComparator implements Comparator, Serializable {
/**
- * Creates a BooleanComparator
- * that sorts false
values before
- * true
values.
- *
+ * Creates a BooleanComparator
that sorts
+ * false
values before true
values.
+ *
* Equivalent to {@link #BooleanComparator(boolean) BooleanComparator(false)}. + *
+ * Please use the static factory instead whenever possible.
*/
public BooleanComparator() {
this(false);
}
/**
- * Creates a BooleanComparator
- * that sorts trueFirst
values before
+ * Creates a BooleanComparator
that sorts
+ * trueFirst
values before
* !trueFirst
values.
+ *
+ * Please use the static factories instead whenever possible.
*
* @param trueFirst when true
, sort
- * true
{@link Boolean}s before
- * false
{@link Boolean}s.
+ * true
boolean values before false
*/
public BooleanComparator(boolean trueFirst) {
this.trueFirst = trueFirst;
}
+ //-----------------------------------------------------------------------
/**
- * Compares two arbitrary Objects. When both arguments
- * are {@link Boolean}, this method is equivalent to
+ * Compares two arbitrary Objects.
+ * When both arguments are Boolean
, this method is equivalent to
* {@link #compare(Boolean,Boolean) compare((Boolean)o1,(Boolean)o2)}.
- * When either argument is not a {@link Boolean}, this methods throws
+ * When either argument is not a Boolean
, this methods throws
* a {@link ClassCastException}.
*
- * @throws ClassCastException when either argument is not
- * a {@link Boolean}
+ * @throws ClassCastException when either argument is not Boolean
*/
public int compare(Object o1, Object o2) {
return compare((Boolean)o1,(Boolean)o2);
}
/**
- * Compares two non-null
{@link Boolean}s
+ * Compares two non-null
Boolean
objects
* according to the value of {@link #sortsTrueFirst}.
*
* @throws NullPointerException when either argument null
@@ -121,6 +123,7 @@ public final class BooleanComparator implements Comparator, Serializable {
return trueFirst;
}
+ //-----------------------------------------------------------------------
/**
* Returns a BooleanComparator instance that sorts
* true
values before false
values.
@@ -161,8 +164,7 @@ public final class BooleanComparator implements Comparator, Serializable {
* virtual machine.
*
* @param trueFirst when true
, sort
- * true
{@link Boolean}s before
- * false
{@link Boolean}s.
+ * true
Boolean
s before false
* @return a cached BooleanComparator instance
*/
public static BooleanComparator getBooleanComparator(boolean trueFirst) {