1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
7 import java.lang.ref.Reference;
8 import javax.annotation.Nullable;
12 * A [`CandidateRouteHop::PublicHop`] entry.
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 {
20 if (ptr != 0) { bindings.PublicHopCandidate_free(ptr); }
24 * The short channel ID of the channel, i.e. the identifier by which we refer to this
27 public long get_short_channel_id() {
28 long ret = bindings.PublicHopCandidate_get_short_channel_id(this.ptr);
29 Reference.reachabilityFence(this);
34 * The short channel ID of the channel, i.e. the identifier by which we refer to this
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);
44 long ret = bindings.PublicHopCandidate_clone_ptr(this.ptr);
45 Reference.reachabilityFence(this);
50 * Creates a copy of the PublicHopCandidate
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); };