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 TwoTuple_OutPointChannelIdZ extends CommonBase {
16 TwoTuple_OutPointChannelIdZ(Object _dummy, long ptr) { super(ptr); }
17 @Override @SuppressWarnings("deprecation")
18 protected void finalize() throws Throwable {
20 if (ptr != 0) { bindings.C2Tuple_OutPointChannelIdZ_free(ptr); }
26 public OutPoint get_a() {
27 long ret = bindings.C2Tuple_OutPointChannelIdZ_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 ChannelId get_b() {
39 long ret = bindings.C2Tuple_OutPointChannelIdZ_get_b(this.ptr);
40 Reference.reachabilityFence(this);
41 if (ret >= 0 && ret <= 4096) { return null; }
42 org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); }
43 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
48 long ret = bindings.C2Tuple_OutPointChannelIdZ_clone_ptr(this.ptr);
49 Reference.reachabilityFence(this);
54 * Creates a new tuple which has the same data as `orig`
55 * but with all dynamically-allocated buffers duplicated in new buffers.
57 public TwoTuple_OutPointChannelIdZ clone() {
58 long ret = bindings.C2Tuple_OutPointChannelIdZ_clone(this.ptr);
59 Reference.reachabilityFence(this);
60 if (ret >= 0 && ret <= 4096) { return null; }
61 TwoTuple_OutPointChannelIdZ ret_hu_conv = new TwoTuple_OutPointChannelIdZ(null, ret);
62 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
67 * Creates a new C2Tuple_OutPointChannelIdZ from the contained elements.
69 public static TwoTuple_OutPointChannelIdZ of(org.ldk.structs.OutPoint a, org.ldk.structs.ChannelId b) {
70 long ret = bindings.C2Tuple_OutPointChannelIdZ_new(a.ptr, b.ptr);
71 Reference.reachabilityFence(a);
72 Reference.reachabilityFence(b);
73 if (ret >= 0 && ret <= 4096) { return null; }
74 TwoTuple_OutPointChannelIdZ ret_hu_conv = new TwoTuple_OutPointChannelIdZ(null, ret);
75 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
76 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(a); };
77 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(b); };