a whole bunch of stuff
[ephemerata.git] / KezvhLib / src-lib / net / kezvh / collections / ComparableComparator.java
blob4c2c32627b91f43032e9c13a799e135602d00d2f
1 package net.kezvh.collections;
3 import java.util.Comparator;
5 /**
6 * @author mjacob
8 * Useful when we can assume our parameter is comparable
10 * @param <T> comparable type
12 public class ComparableComparator<T> implements Comparator<T> {
14 @SuppressWarnings("unchecked")
15 @Override
16 public int compare(final T o1, final T o2) {
17 return ((Comparable<T>) o1).compareTo(o2);