local.tomas.util.collections
Class MappedComparator<F,T>
java.lang.Object
local.tomas.util.collections.MappedComparator<F,T>
- Type Parameters:
F - original operand typeT - mapped operand type
- All Implemented Interfaces:
- Comparator<F>
public class MappedComparator<F,T>
- extends Object
- implements Comparator<F>
Mapped comparator.
A mapped comparator maps each operand through a mapping before comparing them.
- Author:
- tomas.teubner
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MappedComparator
public MappedComparator(Comparator<? super T> comp,
ObjectMapping<T> mapping)
- Construct mapped comparator.
- Parameters:
comp - the original comparatormapping - the mapping
compare
public int compare(F o1,
F o2)
- Specified by:
compare in interface Comparator<F>
Copyright © 2005-2007 Tomas Teubner. All Rights Reserved.