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_BlindedPayInfoBlindedPathZ extends CommonBase {
16 TwoTuple_BlindedPayInfoBlindedPathZ(Object _dummy, long ptr) { super(ptr); }
17 @Override @SuppressWarnings("deprecation")
18 protected void finalize() throws Throwable {
20 if (ptr != 0) { bindings.C2Tuple_BlindedPayInfoBlindedPathZ_free(ptr); }
26 public BlindedPayInfo get_a() {
27 long ret = bindings.C2Tuple_BlindedPayInfoBlindedPathZ_get_a(this.ptr);
28 Reference.reachabilityFence(this);
29 if (ret >= 0 && ret <= 4096) { return null; }
30 org.ldk.structs.BlindedPayInfo ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BlindedPayInfo(null, ret); }
31 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
38 public BlindedPath get_b() {
39 long ret = bindings.C2Tuple_BlindedPayInfoBlindedPathZ_get_b(this.ptr);
40 Reference.reachabilityFence(this);
41 if (ret >= 0 && ret <= 4096) { return null; }
42 org.ldk.structs.BlindedPath ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BlindedPath(null, ret); }
43 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
48 long ret = bindings.C2Tuple_BlindedPayInfoBlindedPathZ_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_BlindedPayInfoBlindedPathZ clone() {
58 long ret = bindings.C2Tuple_BlindedPayInfoBlindedPathZ_clone(this.ptr);
59 Reference.reachabilityFence(this);
60 if (ret >= 0 && ret <= 4096) { return null; }
61 TwoTuple_BlindedPayInfoBlindedPathZ ret_hu_conv = new TwoTuple_BlindedPayInfoBlindedPathZ(null, ret);
62 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
67 * Creates a new C2Tuple_BlindedPayInfoBlindedPathZ from the contained elements.
69 public static TwoTuple_BlindedPayInfoBlindedPathZ of(org.ldk.structs.BlindedPayInfo a, org.ldk.structs.BlindedPath b) {
70 long ret = bindings.C2Tuple_BlindedPayInfoBlindedPathZ_new(a == null ? 0 : a.ptr, b == null ? 0 : b.ptr);
71 Reference.reachabilityFence(a);
72 Reference.reachabilityFence(b);
73 if (ret >= 0 && ret <= 4096) { return null; }
74 TwoTuple_BlindedPayInfoBlindedPathZ ret_hu_conv = new TwoTuple_BlindedPayInfoBlindedPathZ(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); };