1 package tim.prune.correlate;
4 * Simple class to hold a time and an index.
5 * Used in a TreeSet for calculating median time difference
7 public class TimeIndexPair implements Comparable
10 private long _time = 0L;
12 private int _index = 0;
17 * @param inTime time as long
18 * @param inIndex index as int
20 public TimeIndexPair(long inTime, int inIndex)
37 * Compare two TimeIndexPair objects
38 * @see java.lang.Comparable#compareTo(java.lang.Object)
40 public int compareTo(Object inOther)
42 TimeIndexPair other = (TimeIndexPair) inOther;
43 return (int) (_time - other._time);