1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
8 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
9 public class NetworkGraph extends CommonBase {
10 NetworkGraph(Object _dummy, long ptr) { super(ptr); }
11 @Override @SuppressWarnings("deprecation")
12 protected void finalize() throws Throwable {
14 if (ptr != 0) { bindings.NetworkGraph_free(ptr); }
17 public byte[] write(NetworkGraph obj) {
18 byte[] ret = bindings.NetworkGraph_write(obj == null ? 0 : obj.ptr & ~1);
19 this.ptrs_to.add(obj);
23 public static NetworkGraph constructor_read(byte[] ser) {
24 long ret = bindings.NetworkGraph_read(ser);
25 NetworkGraph ret_hu_conv = new NetworkGraph(null, ret);
29 public static NetworkGraph constructor_new() {
30 long ret = bindings.NetworkGraph_new();
31 NetworkGraph ret_hu_conv = new NetworkGraph(null, ret);
35 public void close_channel_from_update(long short_channel_id, boolean is_permanent) {
36 bindings.NetworkGraph_close_channel_from_update(this.ptr, short_channel_id, is_permanent);