1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
7 import javax.annotation.Nullable;
13 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
14 public class PayeePubKey extends CommonBase {
15 PayeePubKey(Object _dummy, long ptr) { super(ptr); }
16 @Override @SuppressWarnings("deprecation")
17 protected void finalize() throws Throwable {
19 if (ptr != 0) { bindings.PayeePubKey_free(ptr); }
22 public byte[] get_a() {
23 byte[] ret = bindings.PayeePubKey_get_a(this.ptr);
27 public void set_a(byte[] val) {
28 bindings.PayeePubKey_set_a(this.ptr, val);
32 * Constructs a new PayeePubKey given each field
34 public static PayeePubKey of(byte[] a_arg) {
35 long ret = bindings.PayeePubKey_new(a_arg);
36 if (ret >= 0 && ret <= 4096) { return null; }
37 PayeePubKey ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new PayeePubKey(null, ret); }
38 ret_hu_conv.ptrs_to.add(ret_hu_conv);
43 * Creates a copy of the PayeePubKey
45 public PayeePubKey clone() {
46 long ret = bindings.PayeePubKey_clone(this.ptr);
47 if (ret >= 0 && ret <= 4096) { return null; }
48 PayeePubKey ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new PayeePubKey(null, ret); }
49 ret_hu_conv.ptrs_to.add(this);
54 * Checks if two PayeePubKeys contain equal inner contents.
57 long ret = bindings.PayeePubKey_hash(this.ptr);
62 * Checks if two PayeePubKeys contain equal inner contents.
63 * This ignores pointers and is_owned flags and looks at the values in fields.
64 * Two objects with NULL inner values will be considered "equal" here.
66 public boolean eq(PayeePubKey b) {
67 boolean ret = bindings.PayeePubKey_eq(this.ptr, b == null ? 0 : b.ptr & ~1);