/*******************************************************************************
 * Copyright (c) 2010-2014 Alexander Kerner. All rights reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *   http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 ******************************************************************************/
package net.sf.kerner.utils.collections;

import java.util.Comparator;

import net.sf.kerner.utils.Util;

/**
 * Simple class to invert the comparison logic of another {@link Comparator}.
 * <p>
 * <b>Example:</b><br>
 * </p>
 * <p>
 * 
 * <pre>
 * TODO example
 * </pre>
 * 
 * </p>
 * 
 * @author <a href="mailto:alex.kerner.24@googlemail.com">Alexander Kerner</a>
 * @version 2012-05-23
 * @see Comparator
 * @param <T>
 *            type of elements which are compared
 */
public class ComparatorInverter<T> implements Comparator<T> {

    protected final Comparator<T> c;

    public ComparatorInverter(final Comparator<T> c) {
        Util.checkForNull(c);
        this.c = c;
    }

    public int compare(final T o1, final T o2) {
        return c.compare(o2, o1);
    }

}

@@ -142,18 +142,17 @@
 rved.%0A *
- 
 %0A
+
  * Licen
@@ -323,17 +323,16 @@
 se at%0A *
- 
 %0A *   ht
@@ -374,17 +374,16 @@
 E-2.0%0A *
- 
 %0A * Unle
@@ -1008,25 +1008,24 @@
 p%3E%0A * %3Cp%3E%0A *
- 
 %0A * %3Cpre%3E%0A *
@@ -1046,25 +1046,24 @@
  * %3C/pre%3E%0A *
- 
 %0A * %3C/p%3E%0A * 
@@ -1061,17 +1061,16 @@
  %3C/p%3E%0A *
- 
 %0A * @aut
@@ -1525,32 +1525,67 @@
     
-return c.compare(o2, o1)
+final int result = c.compare(o2, o1);%0A        return result
 ;%0A  

Make debuggable.