1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
10 * Features used within an invoice.
12 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
13 public class InvoiceFeatures extends CommonBase {
14 InvoiceFeatures(Object _dummy, long ptr) { super(ptr); }
15 @Override @SuppressWarnings("deprecation")
16 protected void finalize() throws Throwable {
18 if (ptr != 0) { bindings.InvoiceFeatures_free(ptr); }
22 * Creates a copy of the InvoiceFeatures
24 public InvoiceFeatures clone() {
25 long ret = bindings.InvoiceFeatures_clone(this.ptr);
26 InvoiceFeatures ret_hu_conv = new InvoiceFeatures(null, ret);
27 ret_hu_conv.ptrs_to.add(this);
32 * Create a blank Features with no features set
34 public static InvoiceFeatures constructor_empty() {
35 long ret = bindings.InvoiceFeatures_empty();
36 InvoiceFeatures ret_hu_conv = new InvoiceFeatures(null, ret);
37 ret_hu_conv.ptrs_to.add(ret_hu_conv);
42 * Creates a Features with the bits set which are known by the implementation
44 public static InvoiceFeatures constructor_known() {
45 long ret = bindings.InvoiceFeatures_known();
46 InvoiceFeatures ret_hu_conv = new InvoiceFeatures(null, ret);
47 ret_hu_conv.ptrs_to.add(ret_hu_conv);
52 * Serialize the InvoiceFeatures object into a byte array which can be read by InvoiceFeatures_read
54 public byte[] write() {
55 byte[] ret = bindings.InvoiceFeatures_write(this.ptr);
60 * Read a InvoiceFeatures from a byte array, created by InvoiceFeatures_write
62 public static Result_InvoiceFeaturesDecodeErrorZ constructor_read(byte[] ser) {
63 long ret = bindings.InvoiceFeatures_read(ser);
64 Result_InvoiceFeaturesDecodeErrorZ ret_hu_conv = Result_InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret);