(Object obj)
| 2420 | * @see #isNegative() |
| 2421 | */ |
| 2422 | @Override |
| 2423 | public boolean equals(Object obj) { |
| 2424 | |
| 2425 | if (this == obj) { |
| 2426 | return true; |
| 2427 | } else if (obj instanceof Duration) { |
| 2428 | Duration<?> that = Duration.class.cast(obj); |
| 2429 | return ( |
| 2430 | (this.negative == that.negative) |
| 2431 | && this.getTotalLength().equals(that.getTotalLength()) |
| 2432 | ); |
| 2433 | } else { |
| 2434 | return false; |
| 2435 | } |
| 2436 | |
| 2437 | } |
| 2438 | |
| 2439 | /** |
| 2440 | * <p>Computes the hash code. </p> |
no test coverage detected