public int compareTo(Delayed o) { if (o == this) { return(0); } long diff = getDelay() - o.getDelay(); if (diff == 0) { if (o is OperationAndData) { diff = ordinal.Get() - ((OperationAndData)o).ordinal.Get(); } } return((diff < 0) ? -1 : ((diff > 0) ? 1 : 0)); }