1 package org.columba.calendar.store; 19 20 import java.util.Comparator ; 21 22 import org.columba.calendar.store.api.StoreEvent; 23 24 class StoreEventComparator implements Comparator { 25 26 private static StoreEventComparator instance = new StoreEventComparator(); 27 28 private StoreEventComparator() { 29 } 30 31 public static StoreEventComparator getInstance() { 32 return instance; 33 } 34 35 38 public int compare(Object arg0, Object arg1) { 39 40 StoreEvent a = (StoreEvent) arg0; 41 StoreEvent b = (StoreEvent) arg1; 42 43 return (a.getSource() != b.getSource()) ? 0 : 1; 44 } 45 46 } | Popular Tags |