edu.tum.cs.commons.collections
Class InvertingComparator<E>
java.lang.Object
edu.tum.cs.commons.collections.InvertingComparator<E>
- All Implemented Interfaces:
- Comparator<E>
public class InvertingComparator<E>
- extends Object
- implements Comparator<E>
This works on another compartor and inverts it.
- Version:
- $Rev: 26283 $
- Author:
- Florian Deissenboeck, $Author: juergens $
- Rating:
- GREEN Hash: 01BC540BD434B1257367A856516E7F2E
|
Method Summary |
int |
compare(E object1,
E object2)
Compares to objects with the orginal comparator and inverts the result |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InvertingComparator
public InvertingComparator(Comparator<? super E> comparator)
- Create a new
InvertingComparator.
- Parameters:
comparator - the comparator to invert.
compare
public int compare(E object1,
E object2)
- Compares to objects with the orginal comparator and inverts the result. *
- Specified by:
compare in interface Comparator<E>
TUM CCSM Commons - 2.7