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_u32TxOutZ extends CommonBase {
16 TwoTuple_u32TxOutZ(Object _dummy, long ptr) { super(ptr); }
17 @Override @SuppressWarnings("deprecation")
18 protected void finalize() throws Throwable {
20 if (ptr != 0) { bindings.C2Tuple_u32TxOutZ_free(ptr); }
27 int ret = bindings.C2Tuple_u32TxOutZ_get_a(this.ptr);
28 Reference.reachabilityFence(this);
35 public TxOut get_b() {
36 long ret = bindings.C2Tuple_u32TxOutZ_get_b(this.ptr);
37 Reference.reachabilityFence(this);
38 if (ret >= 0 && ret <= 4096) { return null; }
39 TxOut ret_conv = new TxOut(null, ret);
44 long ret = bindings.C2Tuple_u32TxOutZ_clone_ptr(this.ptr);
45 Reference.reachabilityFence(this);
50 * Creates a new tuple which has the same data as `orig`
51 * but with all dynamically-allocated buffers duplicated in new buffers.
53 public TwoTuple_u32TxOutZ clone() {
54 long ret = bindings.C2Tuple_u32TxOutZ_clone(this.ptr);
55 Reference.reachabilityFence(this);
56 if (ret >= 0 && ret <= 4096) { return null; }
57 TwoTuple_u32TxOutZ ret_hu_conv = new TwoTuple_u32TxOutZ(null, ret);
58 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
63 * Creates a new C2Tuple_u32TxOutZ from the contained elements.
65 public static TwoTuple_u32TxOutZ of(int a, TxOut b) {
66 long ret = bindings.C2Tuple_u32TxOutZ_new(a, b.ptr);
67 Reference.reachabilityFence(a);
68 Reference.reachabilityFence(b);
69 if (ret >= 0 && ret <= 4096) { return null; }
70 TwoTuple_u32TxOutZ ret_hu_conv = new TwoTuple_u32TxOutZ(null, ret);
71 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };