X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FPaymentPurpose.java;h=7c83eec9c0a479ac0b33f258f292a5de11b4de1b;hb=eab9331afd014558a982441138e222999a9955d1;hp=636ffec5a4454e93543f3d1151183f84cf42b830;hpb=397201c278ded558e45d406967f153770784ff88;p=ldk-java diff --git a/src/main/java/org/ldk/structs/PaymentPurpose.java b/src/main/java/org/ldk/structs/PaymentPurpose.java index 636ffec5..7c83eec9 100644 --- a/src/main/java/org/ldk/structs/PaymentPurpose.java +++ b/src/main/java/org/ldk/structs/PaymentPurpose.java @@ -119,6 +119,21 @@ public class PaymentPurpose extends CommonBase { return ret_hu_conv; } + /** + * Checks if two PaymentPurposes contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ + public boolean eq(org.ldk.structs.PaymentPurpose b) { + boolean ret = bindings.PaymentPurpose_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 PaymentPurpose)) return false; + return this.eq((PaymentPurpose)o); + } /** * Serialize the PaymentPurpose object into a byte array which can be read by PaymentPurpose_read */