Skip to content

Commit

Permalink
Fix LongWrapper comparison issue
Browse files Browse the repository at this point in the history
  • Loading branch information
georgecwan committed Dec 12, 2023
1 parent 1d255d3 commit a05b47d
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,16 @@ public String valueOf() {
public String toString() {
return String.valueOf(value);
}

@JsIgnore
@Override
public boolean equals(Object obj) {
return obj instanceof LongWrapper && ((LongWrapper) obj).value == value;
}

@JsIgnore
@Override
public int hashCode() {
return Long.hashCode(value);
}
}

0 comments on commit a05b47d

Please sign in to comment.