Commit f4d2a18c authored by R.W.Majeed's avatar R.W.Majeed

hashCode implemented

parent 980c3785
......@@ -298,6 +298,14 @@ public class DateTimeAccuracy implements Temporal, Comparable<DateTimeAccuracy>
return dateTime.compareTo(o.dateTime);
}
@Override
public int hashCode() {
final int prime = 37;
int result = 1;
result = prime * result + ((accuracy == null) ? 0 : accuracy.hashCode());
result = prime * result + ((dateTime == null) ? 0 : dateTime.hashCode());
return result;
}
@Override
public boolean equals(Object other){
Objects.requireNonNull(other);
......@@ -306,6 +314,5 @@ public class DateTimeAccuracy implements Temporal, Comparable<DateTimeAccuracy>
if( !o.accuracy.equals(this.accuracy) )return false;
return dateTime.equals(o.dateTime);
}
// TODO implement hashCode
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment