(Tab other)
| 506 | |
| 507 | // sort by the last time visited |
| 508 | public int compareTo(Tab other) { |
| 509 | // do this here to deal with situation where both are 0 |
| 510 | if (lastVisited == other.lastVisited) { |
| 511 | return 0; |
| 512 | } |
| 513 | if (lastVisited == 0) { |
| 514 | return -1; |
| 515 | } |
| 516 | if (other.lastVisited == 0) { |
| 517 | return 1; |
| 518 | } |
| 519 | return (int) (lastVisited - other.lastVisited); |
| 520 | } |
| 521 | } |
| 522 | } |