X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FSpendableOutputDescriptor.java;fp=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FSpendableOutputDescriptor.java;h=e2cf0b2ffbe6163a75e4b40885a265adffb1f4c5;hb=5e9de82b3a7712a41189756d9d16d946142b2ac5;hp=902795cabeafd5ebf073a14dac8e4cd1855fc853;hpb=4ea6734c714946d737c5f43dde2a7ba12fc733cc;p=ldk-java diff --git a/src/main/java/org/ldk/structs/SpendableOutputDescriptor.java b/src/main/java/org/ldk/structs/SpendableOutputDescriptor.java index 902795ca..e2cf0b2f 100644 --- a/src/main/java/org/ldk/structs/SpendableOutputDescriptor.java +++ b/src/main/java/org/ldk/structs/SpendableOutputDescriptor.java @@ -181,6 +181,21 @@ public class SpendableOutputDescriptor extends CommonBase { return ret_hu_conv; } + /** + * Checks if two SpendableOutputDescriptors contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ + public boolean eq(SpendableOutputDescriptor b) { + boolean ret = bindings.SpendableOutputDescriptor_eq(this.ptr, b == null ? 0 : b.ptr); + Reference.reachabilityFence(this); + Reference.reachabilityFence(b); + return ret; + } + + @Override public boolean equals(Object o) { + if (!(o instanceof SpendableOutputDescriptor)) return false; + return this.eq((SpendableOutputDescriptor)o); + } /** * Serialize the SpendableOutputDescriptor object into a byte array which can be read by SpendableOutputDescriptor_read */