public class Event implements Comparable { Rider rider; int time; byte eventType; //examples of event types, for you to change and/or extend: public static final byte arrivalEvent = 0; public static final byte ridingEvent = 1; // etc... public Event( Rider rider, int time, byte type) { this.rider = rider; this.time = time; eventType = type; } // Apart of the obvious accessors like getRider, getTime, getType, you probably // need to implement only more method for this class, namely the compareTo method. }