1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
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 bindings.RouteHop_free(ptr); super.finalize();
13 public RouteHop(RouteHop orig) {
14 super(bindings.RouteHop_clone(orig == null ? 0 : orig.ptr & ~1));
15 this.ptrs_to.add(orig);
18 public byte[] get_pubkey(RouteHop this_ptr) {
19 byte[] ret = bindings.RouteHop_get_pubkey(this_ptr == null ? 0 : this_ptr.ptr & ~1);
20 this.ptrs_to.add(this_ptr);
24 public void set_pubkey(RouteHop this_ptr, byte[] val) {
25 bindings.RouteHop_set_pubkey(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
26 this.ptrs_to.add(this_ptr);
29 public NodeFeatures get_node_features(RouteHop this_ptr) {
30 NodeFeatures ret = new NodeFeatures(null, bindings.RouteHop_get_node_features(this_ptr == null ? 0 : this_ptr.ptr & ~1));
31 this.ptrs_to.add(this_ptr);
35 public void set_node_features(RouteHop this_ptr, NodeFeatures val) {
36 bindings.RouteHop_set_node_features(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
37 this.ptrs_to.add(this_ptr);
38 this.ptrs_to.add(val);
41 public long get_short_channel_id(RouteHop this_ptr) {
42 long ret = bindings.RouteHop_get_short_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
43 this.ptrs_to.add(this_ptr);
47 public void set_short_channel_id(RouteHop this_ptr, long val) {
48 bindings.RouteHop_set_short_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
49 this.ptrs_to.add(this_ptr);
52 public ChannelFeatures get_channel_features(RouteHop this_ptr) {
53 ChannelFeatures ret = new ChannelFeatures(null, bindings.RouteHop_get_channel_features(this_ptr == null ? 0 : this_ptr.ptr & ~1));
54 this.ptrs_to.add(this_ptr);
58 public void set_channel_features(RouteHop this_ptr, ChannelFeatures val) {
59 bindings.RouteHop_set_channel_features(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
60 this.ptrs_to.add(this_ptr);
61 this.ptrs_to.add(val);
64 public long get_fee_msat(RouteHop this_ptr) {
65 long ret = bindings.RouteHop_get_fee_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1);
66 this.ptrs_to.add(this_ptr);
70 public void set_fee_msat(RouteHop this_ptr, long val) {
71 bindings.RouteHop_set_fee_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
72 this.ptrs_to.add(this_ptr);
75 public int get_cltv_expiry_delta(RouteHop this_ptr) {
76 int ret = bindings.RouteHop_get_cltv_expiry_delta(this_ptr == null ? 0 : this_ptr.ptr & ~1);
77 this.ptrs_to.add(this_ptr);
81 public void set_cltv_expiry_delta(RouteHop this_ptr, int val) {
82 bindings.RouteHop_set_cltv_expiry_delta(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
83 this.ptrs_to.add(this_ptr);
86 public RouteHop(byte[] pubkey_arg, NodeFeatures node_features_arg, long short_channel_id_arg, ChannelFeatures channel_features_arg, long fee_msat_arg, int cltv_expiry_delta_arg) {
87 super(bindings.RouteHop_new(pubkey_arg, node_features_arg == null ? 0 : node_features_arg.ptr & ~1, short_channel_id_arg, channel_features_arg == null ? 0 : channel_features_arg.ptr & ~1, fee_msat_arg, cltv_expiry_delta_arg));
88 this.ptrs_to.add(node_features_arg);
89 this.ptrs_to.add(channel_features_arg);