1 25 package org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.callbacklogger; 26 27 import java.util.Comparator ; 28 29 import org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.CallbackLogger; 30 31 32 39 public class CallbackLoggerComparator <T extends CallbackLogger> implements Comparator <CallbackLogger> { 40 41 50 public int compare(final CallbackLogger callback1, final CallbackLogger callback2) { 51 if (callback1.getInsertionDate() < callback2.getInsertionDate()) { 52 return -1; 53 } else if (callback1.getInsertionDate() > callback2.getInsertionDate()) { 54 return 1; 55 } else { 56 return 0; 57 } 58 } 59 60 } 61 | Popular Tags |