@Override
    public int compare(Event<?, ?> e1, Event<?, ?> e2)
    {
      Interval<?> i1 = e1.getInterval();
      Interval<?> i2 = e2.getInterval();
      return ComparisonChain.start()
          .compare(i1.getFrom(), i2.getFrom())
          .compare(i1.getTo(), i2.getTo())
          .compare(e1.getPayload(), e2.getPayload())
          .result();
    }