MCPcopy Create free account
hub / github.com/MenoData/Time4J / equals

Method equals

base/src/main/java/net/time4j/Duration.java:2422–2437  ·  view source on GitHub ↗
(Object obj)

Source from the content-addressed store, hash-verified

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>

Callers 8

fromMethod · 0.45
containsMethod · 0.45
getPartialAmountMethod · 0.45
replaceFractionMethod · 0.45
updateMethod · 0.45
resolveMethod · 0.45
normalizeMethod · 0.45

Calls 3

getTotalLengthMethod · 0.95
getTotalLengthMethod · 0.65
castMethod · 0.45

Tested by

no test coverage detected