7b10e51bf73b03276b062101feda6a0961b21841
[ldk-java] / src / main / java / org / ldk / structs / ChannelFeatures.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
8 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
9 public class ChannelFeatures extends CommonBase {
10         ChannelFeatures(Object _dummy, long ptr) { super(ptr); }
11         @Override @SuppressWarnings("deprecation")
12         protected void finalize() throws Throwable {
13                 super.finalize();
14                 if (ptr != 0) { bindings.ChannelFeatures_free(ptr); }
15         }
16
17         public ChannelFeatures clone() {
18                 long ret = bindings.ChannelFeatures_clone(this.ptr);
19                 ChannelFeatures ret_hu_conv = new ChannelFeatures(null, ret);
20                 ret_hu_conv.ptrs_to.add(this);
21                 return ret_hu_conv;
22         }
23
24         public static ChannelFeatures constructor_empty() {
25                 long ret = bindings.ChannelFeatures_empty();
26                 ChannelFeatures ret_hu_conv = new ChannelFeatures(null, ret);
27                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
28                 return ret_hu_conv;
29         }
30
31         public static ChannelFeatures constructor_known() {
32                 long ret = bindings.ChannelFeatures_known();
33                 ChannelFeatures ret_hu_conv = new ChannelFeatures(null, ret);
34                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
35                 return ret_hu_conv;
36         }
37
38         public byte[] write() {
39                 byte[] ret = bindings.ChannelFeatures_write(this.ptr);
40                 return ret;
41         }
42
43         public static Result_ChannelFeaturesDecodeErrorZ constructor_read(byte[] ser) {
44                 long ret = bindings.ChannelFeatures_read(ser);
45                 Result_ChannelFeaturesDecodeErrorZ ret_hu_conv = Result_ChannelFeaturesDecodeErrorZ.constr_from_ptr(ret);
46                 return ret_hu_conv;
47         }
48
49 }