* This ignores pointers and is_owned flags and looks at the values in fields.
* Two objects with NULL inner values will be considered "equal" here.
*/
- public boolean eq(Invoice b) {
+ public boolean eq(org.ldk.structs.Invoice b) {
boolean ret = bindings.Invoice_eq(this.ptr, b == null ? 0 : b.ptr);
Reference.reachabilityFence(this);
Reference.reachabilityFence(b);
return ret_hu_conv;
}
+ /**
+ * Checks if two Invoices contain equal inner contents.
+ */
+ public long hash() {
+ long ret = bindings.Invoice_hash(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ @Override public int hashCode() {
+ return (int)this.hash();
+ }
/**
* Transform the `Invoice` into it's unchecked version
*/
* assert!(Invoice::from_signed(signed).is_ok());
* ```
*/
- public static Result_InvoiceSemanticErrorZ from_signed(SignedRawInvoice signed_invoice) {
+ public static Result_InvoiceSemanticErrorZ from_signed(org.ldk.structs.SignedRawInvoice signed_invoice) {
long ret = bindings.Invoice_from_signed(signed_invoice == null ? 0 : signed_invoice.ptr);
Reference.reachabilityFence(signed_invoice);
if (ret >= 0 && ret <= 4096) { return null; }