Convert slices - requires some machinery to call Release, but otherwise not bad
[ldk-java] / src / main / java / org / ldk / structs / HTLCUpdate.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5
6 public class HTLCUpdate extends CommonBase {
7         HTLCUpdate(Object _dummy, long ptr) { super(ptr); }
8         @Override @SuppressWarnings("deprecation")
9         protected void finalize() throws Throwable {
10                 bindings.HTLCUpdate_free(ptr); super.finalize();
11         }
12
13         public HTLCUpdate(HTLCUpdate orig) {
14                 super(bindings.HTLCUpdate_clone(orig.ptr & ~1));
15                 this.ptrs_to.add(orig);
16         }
17
18         // Skipped HTLCUpdate_write
19         public HTLCUpdate(byte[] ser) {
20                 super(bindings.HTLCUpdate_read(ser));
21         }
22
23 }