01: /*
02: * JFox - The most lightweight Java EE Application Server!
03: * more details please visit http://www.huihoo.org/jfox or http://www.jfox.org.cn.
04: *
05: * JFox is licenced and re-distributable under GNU LGPL.
06: */
07: package org.jfox.entity.cache;
08:
09: import java.util.Comparator;
10:
11: /**
12: * @author <a href="mailto:jfox.young@gmail.com">Young Yang</a>
13: */
14: public class FIFOComparator implements Comparator<CachedObject> {
15:
16: public int compare(CachedObject this CachedObject,
17: CachedObject thatCachedObject) {
18: return Long.valueOf(this CachedObject.getCreateTime())
19: .compareTo(this CachedObject.getCreateTime());
20: }
21:
22: public static void main(String[] args) {
23:
24: }
25: }
|