commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r1154833 - in /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare: ComparableComparator.java ComparatorChain.java ComparatorUtils.java FixedOrderComparator.java NullComparator.java ReverseComparator.java
Date Mon, 08 Aug 2011 05:15:51 GMT
Author: bayard
Date: Mon Aug  8 05:15:51 2011
New Revision: 1154833

URL: http://svn.apache.org/viewvc?rev=1154833&view=rev
Log:
Fixing package names so things compile. Removing Boolean and Transform usages in ComparatorUtils
as those classes didn't come accross

Modified:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/ComparableComparator.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/ComparatorChain.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/ComparatorUtils.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/FixedOrderComparator.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/NullComparator.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/ReverseComparator.java

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/ComparableComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/ComparableComparator.java?rev=1154833&r1=1154832&r2=1154833&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/ComparableComparator.java
(original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/ComparableComparator.java
Mon Aug  8 05:15:51 2011
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.collections.comparators;
+package org.apache.commons.lang3.compare;
 
 import java.io.Serializable;
 import java.util.Comparator;

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/ComparatorChain.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/ComparatorChain.java?rev=1154833&r1=1154832&r2=1154833&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/ComparatorChain.java
(original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/ComparatorChain.java
Mon Aug  8 05:15:51 2011
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.collections.comparators;
+package org.apache.commons.lang3.compare;
 
 import java.io.Serializable;
 import java.util.ArrayList;

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/ComparatorUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/ComparatorUtils.java?rev=1154833&r1=1154832&r2=1154833&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/ComparatorUtils.java
(original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/ComparatorUtils.java
Mon Aug  8 05:15:51 2011
@@ -14,18 +14,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.collections;
+package org.apache.commons.lang3.compare;
 
 import java.util.Collection;
 import java.util.Comparator;
 
-import org.apache.commons.collections.comparators.BooleanComparator;
-import org.apache.commons.collections.comparators.ComparableComparator;
-import org.apache.commons.collections.comparators.ComparatorChain;
-import org.apache.commons.collections.comparators.NullComparator;
-import org.apache.commons.collections.comparators.ReverseComparator;
-import org.apache.commons.collections.comparators.TransformingComparator;
-
 /**
  * Provides convenient static utility methods for <Code>Comparator</Code>
  * objects.
@@ -133,22 +126,6 @@ public class ComparatorUtils {
     }
 
     /**
-     * Gets a Comparator that can sort Boolean objects.
-     * <p>
-     * The parameter specifies whether true or false is sorted first.
-     * <p>
-     * The comparator throws NullPointerException if a null value is compared.
-     * 
-     * @param trueFirst  when <code>true</code>, sort 
-     *        <code>true</code> {@link Boolean}s before
-     *        <code>false</code> {@link Boolean}s.
-     * @return  a comparator that sorts booleans
-     */
-    public static Comparator<Boolean> booleanComparator(boolean trueFirst) {
-        return BooleanComparator.booleanComparator(trueFirst);
-    }
-    
-    /**
      * Gets a Comparator that controls the comparison of <code>null</code> values.
      * <p>
      * The returned comparator will consider a null value to be less than
@@ -187,26 +164,6 @@ public class ComparatorUtils {
     }
 
     /**
-     * Gets a Comparator that passes transformed objects to the given comparator.
-     * <p>
-     * Objects passed to the returned comparator will first be transformed
-     * by the given transformer before they are compared by the given
-     * comparator.
-     *
-     * @param comparator  the sort order to use
-     * @param transformer  the transformer to use
-     * @return  a comparator that transforms its input objects before comparing them
-     * @see  TransformingComparator
-     */
-    @SuppressWarnings("unchecked")
-    public static <E> Comparator<E> transformedComparator(Comparator<E>
comparator, Transformer<? super E, ? extends E> transformer) {
-        if (comparator == null) {
-            comparator = NATURAL_COMPARATOR;
-        }
-        return new TransformingComparator<E>(transformer, comparator);
-    }
-
-    /**
      *  Returns the smaller of the given objects according to the given 
      *  comparator, returning the second object if the comparator
      *  returns equal.

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/FixedOrderComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/FixedOrderComparator.java?rev=1154833&r1=1154832&r2=1154833&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/FixedOrderComparator.java
(original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/FixedOrderComparator.java
Mon Aug  8 05:15:51 2011
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.collections.comparators;
+package org.apache.commons.lang3.compare;
 
 import java.util.Comparator;
 import java.util.HashMap;

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/NullComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/NullComparator.java?rev=1154833&r1=1154832&r2=1154833&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/NullComparator.java
(original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/NullComparator.java
Mon Aug  8 05:15:51 2011
@@ -14,13 +14,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.collections.comparators;
+package org.apache.commons.lang3.compare;
 
 import java.io.Serializable;
 import java.util.Comparator;
 
-import org.apache.commons.collections.ComparatorUtils;
-
 /**
  * A Comparator that will compare nulls to be either lower or higher than
  * other objects.

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/ReverseComparator.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/ReverseComparator.java?rev=1154833&r1=1154832&r2=1154833&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/ReverseComparator.java
(original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/compare/ReverseComparator.java
Mon Aug  8 05:15:51 2011
@@ -14,13 +14,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.collections.comparators;
+package org.apache.commons.lang3.compare;
 
 import java.io.Serializable;
 import java.util.Comparator;
 
-import org.apache.commons.collections.ComparatorUtils;
-
 /**
  * Reverses the order of another comparator by reversing the arguments
  * to its {@link #compare(Object, Object) compare} method.



Mime
View raw message