You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sc...@apache.org on 2004/04/28 00:57:01 UTC
cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/comparators BooleanComparator.java
scolebourne 2004/04/27 15:57:00
Modified: collections/src/java/org/apache/commons/collections/comparators
BooleanComparator.java
Log:
Javadoc
Revision Changes Path
1.12 +19 -17 jakarta-commons/collections/src/java/org/apache/commons/collections/comparators/BooleanComparator.java
Index: BooleanComparator.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/comparators/BooleanComparator.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- BooleanComparator.java 18 Feb 2004 00:59:06 -0000 1.11
+++ BooleanComparator.java 27 Apr 2004 22:57:00 -0000 1.12
@@ -33,45 +33,47 @@
public final class BooleanComparator implements Comparator, Serializable {
/**
- * Creates a <code>BooleanComparator</code>
- * that sorts <code>false</code> values before
- * <code>true</code> values.
- *
+ * Creates a <code>BooleanComparator</code> that sorts
+ * <code>false</code> values before <code>true</code> values.
+ * <p>
* Equivalent to {@link #BooleanComparator(boolean) BooleanComparator(false)}.
+ * <p>
+ * Please use the static factory instead whenever possible.
*/
public BooleanComparator() {
this(false);
}
/**
- * Creates a <code>BooleanComparator</code>
- * that sorts <code><i>trueFirst</i></code> values before
+ * Creates a <code>BooleanComparator</code> that sorts
+ * <code><i>trueFirst</i></code> values before
* <code>!<i>trueFirst</i></code> values.
+ * <p>
+ * Please use the static factories instead whenever possible.
*
* @param trueFirst when <code>true</code>, sort
- * <code>true</code> {@link Boolean}s before
- * <code>false</code> {@link Boolean}s.
+ * <code>true</code> boolean values before <code>false</code>
*/
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 <code>Boolean</code>, this method is equivalent to
* {@link #compare(Boolean,Boolean) compare((Boolean)<i>o1</i>,(Boolean)<i>o2</i>)}.
- * When either argument is not a {@link Boolean}, this methods throws
+ * When either argument is not a <code>Boolean</code>, this methods throws
* a {@link ClassCastException}.
*
- * @throws ClassCastException when either argument is not
- * a {@link Boolean}
+ * @throws ClassCastException when either argument is not <code>Boolean</code>
*/
public int compare(Object o1, Object o2) {
return compare((Boolean)o1,(Boolean)o2);
}
/**
- * Compares two non-<code>null</code> {@link Boolean}s
+ * Compares two non-<code>null</code> <code>Boolean</code> objects
* according to the value of {@link #sortsTrueFirst}.
*
* @throws NullPointerException when either argument <code>null</code>
@@ -121,6 +123,7 @@
return trueFirst;
}
+ //-----------------------------------------------------------------------
/**
* Returns a BooleanComparator instance that sorts
* <code>true</code> values before <code>false</code> values.
@@ -161,8 +164,7 @@
* virtual machine.
*
* @param trueFirst when <code>true</code>, sort
- * <code>true</code> {@link Boolean}s before
- * <code>false</code> {@link Boolean}s.
+ * <code>true</code> <code>Boolean</code>s before <code>false</code>
* @return a cached BooleanComparator instance
*/
public static BooleanComparator getBooleanComparator(boolean trueFirst) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org