You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tn...@apache.org on 2013/04/30 20:16:48 UTC
svn commit: r1477747 -
/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/
Author: tn
Date: Tue Apr 30 18:16:48 2013
New Revision: 1477747
URL: http://svn.apache.org/r1477747
Log:
Remove trailing spaces.
Modified:
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/BooleanComparator.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/ComparableComparator.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/ComparatorChain.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/FixedOrderComparator.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/NullComparator.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/ReverseComparator.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/TransformingComparator.java
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/package-info.java
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/BooleanComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/BooleanComparator.java?rev=1477747&r1=1477746&r2=1477747&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/BooleanComparator.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/BooleanComparator.java Tue Apr 30 18:16:48 2013
@@ -46,49 +46,49 @@ public final class BooleanComparator imp
//-----------------------------------------------------------------------
/**
- * Returns a BooleanComparator instance that sorts
+ * Returns a BooleanComparator instance that sorts
* <code>true</code> values before <code>false</code> values.
* <p />
- * Clients are encouraged to use the value returned from
- * this method instead of constructing a new instance
+ * Clients are encouraged to use the value returned from
+ * this method instead of constructing a new instance
* to reduce allocation and garbage collection overhead when
- * multiple BooleanComparators may be used in the same
+ * multiple BooleanComparators may be used in the same
* virtual machine.
- *
+ *
* @return the true first singleton BooleanComparator
*/
public static BooleanComparator getTrueFirstComparator() {
return TRUE_FIRST;
}
-
+
/**
- * Returns a BooleanComparator instance that sorts
+ * Returns a BooleanComparator instance that sorts
* <code>false</code> values before <code>true</code> values.
* <p />
- * Clients are encouraged to use the value returned from
- * this method instead of constructing a new instance
+ * Clients are encouraged to use the value returned from
+ * this method instead of constructing a new instance
* to reduce allocation and garbage collection overhead when
- * multiple BooleanComparators may be used in the same
+ * multiple BooleanComparators may be used in the same
* virtual machine.
- *
+ *
* @return the false first singleton BooleanComparator
*/
public static BooleanComparator getFalseFirstComparator() {
return FALSE_FIRST;
}
-
+
/**
- * Returns a BooleanComparator instance that sorts
- * <code><i>trueFirst</i></code> values before
+ * Returns a BooleanComparator instance that sorts
+ * <code><i>trueFirst</i></code> values before
* <code>!<i>trueFirst</i></code> values.
* <p />
- * Clients are encouraged to use the value returned from
- * this method instead of constructing a new instance
+ * Clients are encouraged to use the value returned from
+ * this method instead of constructing a new instance
* to reduce allocation and garbage collection overhead when
- * multiple BooleanComparators may be used in the same
+ * multiple BooleanComparators may be used in the same
* virtual machine.
- *
- * @param trueFirst when <code>true</code>, sort
+ *
+ * @param trueFirst when <code>true</code>, sort
* <code>true</code> <code>Boolean</code>s before <code>false</code>
* @return a singleton BooleanComparator instance
*/
@@ -111,12 +111,12 @@ public final class BooleanComparator imp
/**
* Creates a <code>BooleanComparator</code> that sorts
- * <code><i>trueFirst</i></code> values before
+ * <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
+ *
+ * @param trueFirst when <code>true</code>, sort
* <code>true</code> boolean values before <code>false</code>
*/
public BooleanComparator(final boolean trueFirst) {
@@ -127,7 +127,7 @@ public final class BooleanComparator imp
/**
* Compares two non-<code>null</code> <code>Boolean</code> objects
* according to the value of {@link #sortsTrueFirst()}.
- *
+ *
* @param b1 the first boolean to compare
* @param b2 the second boolean to compare
* @return negative if obj1 is less, positive if greater, zero if equal
@@ -154,33 +154,33 @@ public final class BooleanComparator imp
}
/**
- * Returns <code>true</code> iff <i>that</i> Object is
- * is a {@link Comparator} whose ordering is known to be
+ * Returns <code>true</code> iff <i>that</i> Object is
+ * is a {@link Comparator} whose ordering is known to be
* equivalent to mine.
* <p>
* This implementation returns <code>true</code>
- * iff <code><i>that</i></code> is a {@link BooleanComparator}
+ * iff <code><i>that</i></code> is a {@link BooleanComparator}
* whose value of {@link #sortsTrueFirst()} is equal to mine.
- *
+ *
* @param object the object to compare to
* @return true if equal
*/
@Override
public boolean equals(final Object object) {
- return (this == object) ||
- ((object instanceof BooleanComparator) &&
+ return (this == object) ||
+ ((object instanceof BooleanComparator) &&
(this.trueFirst == ((BooleanComparator)object).trueFirst));
}
//-----------------------------------------------------------------------
/**
* Returns <code>true</code> iff
- * I sort <code>true</code> values before
+ * I sort <code>true</code> values before
* <code>false</code> values. In other words,
* returns <code>true</code> iff
* {@link #compare(Boolean,Boolean) compare(Boolean.FALSE,Boolean.TRUE)}
* returns a positive value.
- *
+ *
* @return the trueFirst flag
*/
public boolean sortsTrueFirst() {
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/ComparableComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/ComparableComparator.java?rev=1477747&r1=1477746&r2=1477747&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/ComparableComparator.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/ComparableComparator.java Tue Apr 30 18:16:48 2013
@@ -33,10 +33,10 @@ import java.util.Comparator;
* {@link Comparable#compareTo(Object) compareTo} gave inconsistent results.
* This is no longer the case. See {@link #compare(Object, Object) compare} for
* details.
- *
+ *
* @since 2.0
* @version $Id$
- *
+ *
* @see java.util.Collections#reverseOrder()
*/
public class ComparableComparator<E extends Comparable<? super E>> implements Comparator<E>, Serializable {
@@ -55,7 +55,7 @@ public class ComparableComparator<E exte
* Developers are encouraged to use the comparator returned from this method
* instead of constructing a new instance to reduce allocation and GC overhead
* when multiple comparable comparators may be used in the same VM.
- *
+ *
* @param <E> the element type
* @return the singleton ComparableComparator
*/
@@ -79,11 +79,11 @@ public class ComparableComparator<E exte
* Compare the two {@link Comparable Comparable} arguments.
* This method is equivalent to:
* <pre>((Comparable)obj1).compareTo(obj2)</pre>
- *
+ *
* @param obj1 the first object to compare
* @param obj2 the second object to compare
* @return negative if obj1 is less, positive if greater, zero if equal
- * @throws NullPointerException if <i>obj1</i> is <code>null</code>,
+ * @throws NullPointerException if <i>obj1</i> is <code>null</code>,
* or when <code>((Comparable)obj1).compareTo(obj2)</code> does
* @throws ClassCastException if <i>obj1</i> is not a <code>Comparable</code>,
* or when <code>((Comparable)obj1).compareTo(obj2)</code> does
@@ -113,14 +113,14 @@ public class ComparableComparator<E exte
* <code><i>object</i>.{@link Object#getClass() getClass()}</code> equals
* <code>this.getClass()</code>. Subclasses may want to override this behavior to remain
* consistent with the {@link Comparator#equals(Object)} contract.
- *
+ *
* @param object the object to compare with
* @return {@code true} if equal
* @since 3.0
*/
@Override
public boolean equals(final Object object) {
- return this == object ||
+ return this == object ||
null != object && object.getClass().equals(this.getClass());
}
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/ComparatorChain.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/ComparatorChain.java?rev=1477747&r1=1477746&r2=1477747&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/ComparatorChain.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/ComparatorChain.java Tue Apr 30 18:16:48 2013
@@ -43,7 +43,7 @@ import java.util.List;
* Instances of ComparatorChain are not synchronized. The class is not
* thread-safe at construction time, but it <i>is</i> thread-safe to perform
* multiple comparisons after all the setup operations are complete.
- *
+ *
* @since 2.0
* @version $Id$
*/
@@ -232,7 +232,7 @@ public class ComparatorChain<E> implemen
/**
* Throws an exception if the {@link ComparatorChain} is locked.
- *
+ *
* @throws UnsupportedOperationException if the {@link ComparatorChain} is locked
*/
private void checkLocked() {
@@ -244,7 +244,7 @@ public class ComparatorChain<E> implemen
/**
* Throws an exception if the {@link ComparatorChain} is empty.
- *
+ *
* @throws UnsupportedOperationException if the {@link ComparatorChain} is empty
*/
private void checkChainIntegrity() {
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/FixedOrderComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/FixedOrderComparator.java?rev=1477747&r1=1477746&r2=1477747&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/FixedOrderComparator.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/FixedOrderComparator.java Tue Apr 30 18:16:48 2013
@@ -264,14 +264,14 @@ public class FixedOrderComparator<T> imp
}
/**
- * Returns <code>true</code> iff <i>that</i> Object is
- * is a {@link Comparator} whose ordering is known to be
+ * Returns <code>true</code> iff <i>that</i> Object is
+ * is a {@link Comparator} whose ordering is known to be
* equivalent to mine.
* <p>
* This implementation returns <code>true</code>
- * iff <code><i>that</i></code> is a {@link FixedOrderComparator}
+ * iff <code><i>that</i></code> is a {@link FixedOrderComparator}
* whose attributes are equal to mine.
- *
+ *
* @param object the object to compare to
* @return true if equal
*/
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/NullComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/NullComparator.java?rev=1477747&r1=1477746&r2=1477747&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/NullComparator.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/NullComparator.java Tue Apr 30 18:16:48 2013
@@ -89,7 +89,7 @@ public class NullComparator<E> implement
public NullComparator(final boolean nullsAreHigh) {
this(ComparatorUtils.NATURAL_COMPARATOR, nullsAreHigh);
}
-
+
/**
* Construct an instance that sorts <code>null</code> higher or lower than
* any non-<code>null</code> object it is compared with. When comparing
@@ -112,7 +112,7 @@ public class NullComparator<E> implement
public NullComparator(final Comparator<E> nonNullComparator, final boolean nullsAreHigh) {
this.nonNullComparator = nonNullComparator;
this.nullsAreHigh = nullsAreHigh;
-
+
if (nonNullComparator == null) {
throw new NullPointerException("null nonNullComparator");
}
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/ReverseComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/ReverseComparator.java?rev=1477747&r1=1477746&r2=1477747&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/ReverseComparator.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/ReverseComparator.java Tue Apr 30 18:16:48 2013
@@ -44,7 +44,7 @@ public class ReverseComparator<E> implem
* natural ordering. Using this Constructor will create a ReverseComparator
* that is functionally identical to the Comparator returned by
* java.util.Collections.<b>reverseOrder()</b>.
- *
+ *
* @see java.util.Collections#reverseOrder()
*/
public ReverseComparator() {
@@ -55,9 +55,8 @@ public class ReverseComparator<E> implem
* Creates a comparator that inverts the comparison
* of the given comparator. If you pass in <code>null</code>,
* the ReverseComparator defaults to reversing the
- * natural order, as per
- * {@link java.util.Collections#reverseOrder()}</b>.
- *
+ * natural order, as per {@link java.util.Collections#reverseOrder()}.
+ *
* @param comparator Comparator to reverse
*/
@SuppressWarnings("unchecked")
@@ -68,7 +67,7 @@ public class ReverseComparator<E> implem
//-----------------------------------------------------------------------
/**
* Compares two objects in reverse order.
- *
+ *
* @param obj1 the first object to compare
* @param obj2 the second object to compare
* @return negative if obj1 is less, positive if greater, zero if equal
@@ -81,7 +80,7 @@ public class ReverseComparator<E> implem
/**
* Implement a hash code for this comparator that is consistent with
* {@link #equals(Object) equals}.
- *
+ *
* @return a suitable hash code
* @since 3.0
*/
@@ -91,17 +90,17 @@ public class ReverseComparator<E> implem
}
/**
- * Returns <code>true</code> iff <i>that</i> Object is
- * is a {@link Comparator} whose ordering is known to be
+ * Returns <code>true</code> iff <i>that</i> Object is
+ * is a {@link Comparator} whose ordering is known to be
* equivalent to mine.
* <p>
* This implementation returns <code>true</code>
* iff <code><i>object</i>.{@link Object#getClass() getClass()}</code>
- * equals <code>this.getClass()</code>, and the underlying
+ * equals <code>this.getClass()</code>, and the underlying
* comparators are equal.
* Subclasses may want to override this behavior to remain consistent
* with the {@link Comparator#equals(Object) equals} contract.
- *
+ *
* @param object the object to compare to
* @return true if equal
* @since 3.0
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/TransformingComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/TransformingComparator.java?rev=1477747&r1=1477746&r2=1477747&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/TransformingComparator.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/TransformingComparator.java Tue Apr 30 18:16:48 2013
@@ -36,20 +36,20 @@ import org.apache.commons.collections4.T
* @see org.apache.commons.collections4.comparators.ComparableComparator
*/
public class TransformingComparator<I, O> implements Comparator<I>, Serializable {
-
+
/** Serialization version from Collections 4.0. */
private static final long serialVersionUID = 3456940356043606220L;
/** The decorated comparator. */
private final Comparator<O> decorated;
- /** The transformer being used. */
+ /** The transformer being used. */
private final Transformer<? super I, ? extends O> transformer;
//-----------------------------------------------------------------------
/**
- * Constructs an instance with the given Transformer and a
+ * Constructs an instance with the given Transformer and a
* {@link ComparableComparator ComparableComparator}.
- *
+ *
* @param transformer what will transform the arguments to <code>compare</code>
*/
@SuppressWarnings("unchecked")
@@ -59,7 +59,7 @@ public class TransformingComparator<I, O
/**
* Constructs an instance with the given Transformer and Comparator.
- *
+ *
* @param transformer what will transform the arguments to <code>compare</code>
* @param decorated the decorated Comparator
*/
@@ -72,7 +72,7 @@ public class TransformingComparator<I, O
//-----------------------------------------------------------------------
/**
* Returns the result of comparing the values from the transform operation.
- *
+ *
* @param obj1 the first object to transform then compare
* @param obj2 the second object to transform then compare
* @return negative if obj1 is less, positive if greater, zero if equal
@@ -99,14 +99,14 @@ public class TransformingComparator<I, O
}
/**
- * Returns <code>true</code> iff <i>that</i> Object is
- * is a {@link Comparator} whose ordering is known to be
+ * Returns <code>true</code> iff <i>that</i> Object is
+ * is a {@link Comparator} whose ordering is known to be
* equivalent to mine.
* <p>
* This implementation returns <code>true</code>
- * iff <code><i>that</i></code> is a {@link TransformingComparator}
+ * iff <code><i>that</i></code> is a {@link TransformingComparator}
* whose attributes are equal to mine.
- *
+ *
* @param object the object to compare to
* @return true if equal
*/
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/package-info.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/package-info.java?rev=1477747&r1=1477746&r2=1477747&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/package-info.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/comparators/package-info.java Tue Apr 30 18:16:48 2013
@@ -18,11 +18,11 @@
* This package contains implementations of the
* {@link java.util.Comparator Comparator} interface.
* <p>
- * You may also consider using
+ * You may also consider using
* {@link org.apache.commons.collections4.ComparatorUtils ComparatorUtils},
* which is a single class that uses static methods to construct instances
* of the classes in this package.
- *
+ *
* @version $Id$
*/
package org.apache.commons.collections4.comparators;