@Override public int compareTo(DatedMFile o) { return cdate.compareTo(o.cdate); } }
public int compare(MFile m1, MFile m2) { return extractRunDateWithError(m1).compareTo(extractRunDateWithError(m2)); } }
public int compare(MFile m1, MFile m2) { CalendarDate cd1 = extractRunDateWithError(m1); CalendarDate cd2 = extractRunDateWithError(m2); if ((cd1 == null) || (cd2 == null)) { //cd1 = extractRunDateWithError(m1); //debug //cd2 = extractRunDateWithError(m2); throw new IllegalStateException(); } return cd1.compareTo(cd2); } }
@Override public int compareTo(Partition o) { if (partitionDate != null && o.partitionDate != null) return partitionDate.compareTo(o.partitionDate); return name.compareTo(o.name); }
@Override public int compareTo(Val o) { if (val != null) return val.compareTo(o.val); else return tinv.compareTo(o.tinv); } }
@Override public int compareTo(FmrInv fmr) { return runtime.compareTo(fmr.getRunDate()); }
@Override public int compareTo(FmrInv fmr) { return runtime.compareTo(fmr.getRunDate()); }
@Override public int compareTo(FmrInv fmr) { return runtime.compareTo(fmr.getRunDate()); }
public int compare(MFile m1, MFile m2) { CalendarDate cd1 = extractRunDateWithError(m1); CalendarDate cd2 = extractRunDateWithError(m2); if ((cd1 == null) || (cd2 == null)) { //cd1 = extractRunDateWithError(m1); //debug //cd2 = extractRunDateWithError(m2); throw new IllegalStateException(); } return cd1.compareTo(cd2); } }
/** * Given a Date, find the corresponding time index on the time coordinate axis. * Can only call this is hasDate() is true. * This will return * <ul> * <li> i, if time(i) <= d < time(i+1). * <li> 0, if d < time(0) * <li> n-1, if d > time(n-1), where n is length of time coordinates * </ul> * * @param d date to look for * @return corresponding time index on the time coordinate axis * @throws UnsupportedOperationException is no time axis or isDate() false */ public int findTimeIndexFromCalendarDate(CalendarDate d) { List<CalendarDate> cdates = getCalendarDates(); // LOOK linear search, switch to binary int index = 0; while (index < cdates.size()) { if (d.compareTo(cdates.get(index)) < 0) break; index++; } return Math.max(0, index - 1); }
/** * Given a Date, find the corresponding time index on the time coordinate axis. * Can only call this is hasDate() is true. * This will return * <ul> * <li> i, if time(i) <= d < time(i+1). * <li> 0, if d < time(0) * <li> n-1, if d > time(n-1), where n is length of time coordinates * </ul> * * @param d date to look for * @return corresponding time index on the time coordinate axis * @throws UnsupportedOperationException is no time axis or isDate() false */ public int findTimeIndexFromCalendarDate(CalendarDate d) { List<CalendarDate> cdates = getCalendarDates(); int index = 0; while (index < cdates.size()) { if (d.compareTo(cdates.get(index)) < 0) break; index++; } return Math.max(0, index - 1); }
/** * Given a Date, find the corresponding time index on the time coordinate axis. * Can only call this is hasDate() is true. * This will return * <ul> * <li> i, if time(i) <= d < time(i+1). * <li> 0, if d < time(0) * <li> n-1, if d > time(n-1), where n is length of time coordinates * </ul> * * @param d date to look for * @return corresponding time index on the time coordinate axis * @throws UnsupportedOperationException is no time axis or isDate() false */ public int findTimeIndexFromCalendarDate(CalendarDate d) { List<CalendarDate> cdates = getCalendarDates(); // LOOK linear search, switch to binary int index = 0; while (index < cdates.size()) { if (d.compareTo(cdates.get(index)) < 0) break; index++; } return Math.max(0, index - 1); }
public int compare(CollectionManager o1, CollectionManager o2) { return o1.getStartCollection().compareTo(o2.getStartCollection()); } });
public int compare(TimeCoord o1, TimeCoord o2) { if (o1 == null || o1.getRunDate() == null) return -1; if (o2 == null || o2.getRunDate() == null) return 1; return o1.getRunDate().compareTo(o2.getRunDate()); } });
public int compare(TimeCoord o1, TimeCoord o2) { if (o1 == null || o1.getRunDate() == null) return -1; if (o2 == null || o2.getRunDate() == null) return 1; return o1.getRunDate().compareTo(o2.getRunDate()); } });
public int compare(TimeCoord o1, TimeCoord o2) { if (o1 == null || o1.getRunDate() == null) return -1; if (o2 == null || o2.getRunDate() == null) return 1; return o1.getRunDate().compareTo(o2.getRunDate()); } });