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

Method equals

base/src/main/java/net/time4j/Moment.java:1609–1630  ·  view source on GitHub ↗
(Object obj)

Source from the content-addressed store, hash-verified

1607 }
1608
1609 @Override
1610 public boolean equals(Object obj) {
1611
1612 if (this == obj) {
1613 return true;
1614 } else if (obj instanceof Moment) {
1615 Moment that = (Moment) obj;
1616
1617 if (this.posixTime != that.posixTime) {
1618 return false;
1619 }
1620
1621 if (LeapSeconds.getInstance().isEnabled()) {
1622 return (this.fraction == that.fraction);
1623 } else {
1624 return (this.getNanosecond() == that.getNanosecond());
1625 }
1626 } else {
1627 return false;
1628 }
1629
1630 }
1631
1632 @Override
1633 public int hashCode() {

Callers 15

withMinusSignMethod · 0.45
withEmptyUnitMethod · 0.45
withLastListSeparatorMethod · 0.45
printRelativeOrDateMethod · 0.45
printRelativeTimeMethod · 0.45
pushDurationMethod · 0.45
getMethod · 0.45
RoundingOperatorMethod · 0.45
withZoneMethod · 0.45
compareMethod · 0.45

Calls 3

getInstanceMethod · 0.95
getNanosecondMethod · 0.95
isEnabledMethod · 0.45

Tested by

no test coverage detected