[Java] Update auto-generated bindings to LDK 0.0.123
[ldk-java] / src / main / java / org / ldk / structs / TwoTuple_OutPointChannelIdZ.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_OutPointChannelIdZ extends CommonBase {
16         TwoTuple_OutPointChannelIdZ(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_OutPointChannelIdZ_free(ptr); }
21         }
22
23         /**
24          * 
25          */
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); };
32                 return ret_hu_conv;
33         }
34
35         /**
36          * 
37          */
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); };
44                 return ret_hu_conv;
45         }
46
47         long clone_ptr() {
48                 long ret = bindings.C2Tuple_OutPointChannelIdZ_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_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); };
63                 return ret_hu_conv;
64         }
65
66         /**
67          * Creates a new C2Tuple_OutPointChannelIdZ from the contained elements.
68          */
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); };
78                 return ret_hu_conv;
79         }
80
81 }