@ Override public int compareTo ( Timestamp other ) { if ( unixSec < other . unixSec ) { return - 1 ; } else if ( unixSec == other . unixSec ) { if ( nanoSec < other . nanoSec ) { return - 1 ; } else if ( nanoSec == other . nanoSec ) { return 0 ; } else { return 1 ; } } else { return 1 ; } }
Defines the natural ordering for timestamp as forward in time .