mirror of
https://github.com/sparrowwallet/drongo.git
synced 2025-01-12 08:21:11 +00:00
add equals and hashcode to output descriptor
This commit is contained in:
parent
a90d553f1e
commit
817458a0c3
1 changed files with 17 additions and 0 deletions
|
@ -654,4 +654,21 @@ public class OutputDescriptor {
|
|||
|
||||
return keyBuilder.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean equals(Object o) {
|
||||
if(this == o) {
|
||||
return true;
|
||||
}
|
||||
if(!(o instanceof OutputDescriptor that)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return toString().equals(that.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return toString().hashCode();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue