[Java] Update auto-generated bindings to 0.0.115
[ldk-java] / src / main / java / org / ldk / structs / TwoTuple_BlindedPayInfoBlindedPathZ.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5 import org.ldk.util.*;
6 import java.util.Arrays;
7 import java.lang.ref.Reference;
8 import javax.annotation.Nullable;
9
10
11 /**
12  * A Tuple
13  */
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 {
19                 super.finalize();
20                 if (ptr != 0) { bindings.C2Tuple_BlindedPayInfoBlindedPathZ_free(ptr); }
21         }
22
23         /**
24          * 
25          */
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); };
32                 return ret_hu_conv;
33         }
34
35         /**
36          * 
37          */
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); };
44                 return ret_hu_conv;
45         }
46
47         long clone_ptr() {
48                 long ret = bindings.C2Tuple_BlindedPayInfoBlindedPathZ_clone_ptr(this.ptr);
49                 Reference.reachabilityFence(this);
50                 return ret;
51         }
52
53         /**
54          * Creates a new tuple which has the same data as `orig`
55          * but with all dynamically-allocated buffers duplicated in new buffers.
56          */
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); };
63                 return ret_hu_conv;
64         }
65
66         /**
67          * Creates a new C2Tuple_BlindedPayInfoBlindedPathZ from the contained elements.
68          */
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); };
78                 return ret_hu_conv;
79         }
80
81 }