Exemplo n.º 1
0
 /**
  * Compares the given TimeInstant to this TimeInstant. This method implements the
  * Comparable<TimeInstant> Interface
  *
  * @param anotherInstant : The TimeInstant to be compared to this TimeInstant
  * @return: int: Returns a negative integer, zero, or a positive integer as this TimeInstant is
  *     before, at the same time, or after the given TimeInstant.
  */
 public int compareTo(TimeInstant anotherInstant) {
   long difference = this.getTimeInEpsilon() - anotherInstant.getTimeInEpsilon();
   if (difference < 0) return -1;
   if (difference > 0) return 1;
   return 0;
 }