net.sf.javagimmicks.collections.transformer.TransformingComparator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gimmicks Show documentation
Show all versions of gimmicks Show documentation
Utility classes, APIs and tools for Java
package net.sf.javagimmicks.collections.transformer;
import java.util.Comparator;
import net.sf.javagimmicks.transform.Transformer;
class TransformingComparator implements Comparator
{
protected final Comparator super F> _internalComparator;
private final Transformer _transformer;
/**
* @deprecated Use TranformerUtils.decorate() instead
*/
@Deprecated
public TransformingComparator(Comparator super F> comparator, Transformer transformer)
{
_internalComparator = comparator;
_transformer = transformer;
}
public int compare(T o1, T o2)
{
return _internalComparator.compare(_transformer.transform(o1), _transformer.transform(o2));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy