[Java] Update auto-generated Java bindings to LDK 0.0.121
[ldk-java] / src / main / java / org / ldk / structs / PublicHopCandidate.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 [`CandidateRouteHop::PublicHop`] entry.
13  */
14 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
15 public class PublicHopCandidate extends CommonBase {
16         PublicHopCandidate(Object _dummy, long ptr) { super(ptr); }
17         @Override @SuppressWarnings("deprecation")
18         protected void finalize() throws Throwable {
19                 super.finalize();
20                 if (ptr != 0) { bindings.PublicHopCandidate_free(ptr); }
21         }
22
23         /**
24          * The short channel ID of the channel, i.e. the identifier by which we refer to this
25          * channel.
26          */
27         public long get_short_channel_id() {
28                 long ret = bindings.PublicHopCandidate_get_short_channel_id(this.ptr);
29                 Reference.reachabilityFence(this);
30                 return ret;
31         }
32
33         /**
34          * The short channel ID of the channel, i.e. the identifier by which we refer to this
35          * channel.
36          */
37         public void set_short_channel_id(long val) {
38                 bindings.PublicHopCandidate_set_short_channel_id(this.ptr, val);
39                 Reference.reachabilityFence(this);
40                 Reference.reachabilityFence(val);
41         }
42
43         long clone_ptr() {
44                 long ret = bindings.PublicHopCandidate_clone_ptr(this.ptr);
45                 Reference.reachabilityFence(this);
46                 return ret;
47         }
48
49         /**
50          * Creates a copy of the PublicHopCandidate
51          */
52         public PublicHopCandidate clone() {
53                 long ret = bindings.PublicHopCandidate_clone(this.ptr);
54                 Reference.reachabilityFence(this);
55                 if (ret >= 0 && ret <= 4096) { return null; }
56                 org.ldk.structs.PublicHopCandidate ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PublicHopCandidate(null, ret); }
57                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
58                 return ret_hu_conv;
59         }
60
61 }