1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
7 import java.lang.ref.Reference;
8 import javax.annotation.Nullable;
14 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
15 public class ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ extends CommonBase {
16 ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ(Object _dummy, long ptr) { super(ptr); }
17 @Override @SuppressWarnings("deprecation")
18 protected void finalize() throws Throwable {
20 if (ptr != 0) { bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(ptr); }
26 public OutPoint get_a() {
27 long ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(this.ptr);
28 Reference.reachabilityFence(this);
29 if (ret >= 0 && ret <= 4096) { return null; }
30 org.ldk.structs.OutPoint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OutPoint(null, ret); }
31 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
38 public MonitorEvent[] get_b() {
39 long[] ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(this.ptr);
40 Reference.reachabilityFence(this);
41 int ret_conv_14_len = ret.length;
42 MonitorEvent[] ret_conv_14_arr = new MonitorEvent[ret_conv_14_len];
43 for (int o = 0; o < ret_conv_14_len; o++) {
44 long ret_conv_14 = ret[o];
45 org.ldk.structs.MonitorEvent ret_conv_14_hu_conv = org.ldk.structs.MonitorEvent.constr_from_ptr(ret_conv_14);
46 if (ret_conv_14_hu_conv != null) { ret_conv_14_hu_conv.ptrs_to.add(this); };
47 ret_conv_14_arr[o] = ret_conv_14_hu_conv;
49 return ret_conv_14_arr;
55 public byte[] get_c() {
56 byte[] ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(this.ptr);
57 Reference.reachabilityFence(this);
62 long ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(this.ptr);
63 Reference.reachabilityFence(this);
68 * Creates a new tuple which has the same data as `orig`
69 * but with all dynamically-allocated buffers duplicated in new buffers.
71 public ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ clone() {
72 long ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(this.ptr);
73 Reference.reachabilityFence(this);
74 if (ret >= 0 && ret <= 4096) { return null; }
75 ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ ret_hu_conv = new ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ(null, ret);
76 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
81 * Creates a new C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ from the contained elements.
83 public static ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ of(OutPoint a, MonitorEvent[] b, byte[] c) {
84 long ret = bindings.C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(a == null ? 0 : a.ptr, b != null ? Arrays.stream(b).mapToLong(b_conv_14 -> b_conv_14.ptr).toArray() : null, InternalUtils.check_arr_len(c, 33));
85 Reference.reachabilityFence(a);
86 Reference.reachabilityFence(b);
87 Reference.reachabilityFence(c);
88 if (ret >= 0 && ret <= 4096) { return null; }
89 ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ ret_hu_conv = new ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ(null, ret);
90 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
91 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); };