PageRenderTime 21ms CodeModel.GetById 16ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/ftr-gwt-library-date/src/main/java/eu/future/earth/gwt/client/date/EventComparator.java

http://ftr-gwt-library.googlecode.com/
Java | 22 lines | 16 code | 6 blank | 0 comment | 2 complexity | 9a96798ed27ec7db0875d08729c9acd9 MD5 | raw file
 1package eu.future.earth.gwt.client.date;
 2
 3import java.util.Comparator;
 4import java.util.Date;
 5
 6
 7public class EventComparator<T> implements Comparator<EventPanel<T>> {
 8
 9	public EventComparator() {
10		super();
11	}
12
13	public int compare(EventPanel<T> arg0, EventPanel<T> arg1) {
14		Date one = arg0.getStart();
15		Date two = arg1.getStart();
16		if (one != null) {
17			return one.compareTo(two);
18		}
19		return 0;
20	}
21
22}