Use AutoCloseable for structs named Locked*
[ldk-java] / src / main / java / org / ldk / structs / RouteHop.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5
6 public class RouteHop extends CommonBase {
7         RouteHop(Object _dummy, long ptr) { super(ptr); }
8         @Override @SuppressWarnings("deprecation")
9         protected void finalize() throws Throwable {
10                 super.finalize();
11                 bindings.RouteHop_free(ptr);
12         }
13
14         public RouteHop(RouteHop orig) {
15                 super(bindings.RouteHop_clone(orig == null ? 0 : orig.ptr & ~1));
16                 this.ptrs_to.add(orig);
17         }
18
19         public byte[] get_pubkey(RouteHop this_ptr) {
20                 byte[] ret = bindings.RouteHop_get_pubkey(this_ptr == null ? 0 : this_ptr.ptr & ~1);
21                 this.ptrs_to.add(this_ptr);
22                 return ret;
23         }
24
25         public void set_pubkey(RouteHop this_ptr, byte[] val) {
26                 bindings.RouteHop_set_pubkey(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
27                 this.ptrs_to.add(this_ptr);
28         }
29
30         public NodeFeatures get_node_features(RouteHop this_ptr) {
31                 NodeFeatures ret = new NodeFeatures(null, bindings.RouteHop_get_node_features(this_ptr == null ? 0 : this_ptr.ptr & ~1));
32                 this.ptrs_to.add(this_ptr);
33                 return ret;
34         }
35
36         // Skipped RouteHop_set_node_features
37         public long get_short_channel_id(RouteHop this_ptr) {
38                 long ret = bindings.RouteHop_get_short_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
39                 this.ptrs_to.add(this_ptr);
40                 return ret;
41         }
42
43         public void set_short_channel_id(RouteHop this_ptr, long val) {
44                 bindings.RouteHop_set_short_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
45                 this.ptrs_to.add(this_ptr);
46         }
47
48         public ChannelFeatures get_channel_features(RouteHop this_ptr) {
49                 ChannelFeatures ret = new ChannelFeatures(null, bindings.RouteHop_get_channel_features(this_ptr == null ? 0 : this_ptr.ptr & ~1));
50                 this.ptrs_to.add(this_ptr);
51                 return ret;
52         }
53
54         // Skipped RouteHop_set_channel_features
55         public long get_fee_msat(RouteHop this_ptr) {
56                 long ret = bindings.RouteHop_get_fee_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1);
57                 this.ptrs_to.add(this_ptr);
58                 return ret;
59         }
60
61         public void set_fee_msat(RouteHop this_ptr, long val) {
62                 bindings.RouteHop_set_fee_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
63                 this.ptrs_to.add(this_ptr);
64         }
65
66         public int get_cltv_expiry_delta(RouteHop this_ptr) {
67                 int ret = bindings.RouteHop_get_cltv_expiry_delta(this_ptr == null ? 0 : this_ptr.ptr & ~1);
68                 this.ptrs_to.add(this_ptr);
69                 return ret;
70         }
71
72         public void set_cltv_expiry_delta(RouteHop this_ptr, int val) {
73                 bindings.RouteHop_set_cltv_expiry_delta(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
74                 this.ptrs_to.add(this_ptr);
75         }
76
77         // Skipped RouteHop_new
78 }