1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
10 * Data of the `RawInvoice` that is encoded in the data part
12 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
13 public class RawDataPart extends CommonBase {
14 RawDataPart(Object _dummy, long ptr) { super(ptr); }
15 @Override @SuppressWarnings("deprecation")
16 protected void finalize() throws Throwable {
18 if (ptr != 0) { bindings.RawDataPart_free(ptr); }
22 * generation time of the invoice
24 public PositiveTimestamp get_timestamp() {
25 long ret = bindings.RawDataPart_get_timestamp(this.ptr);
26 if (ret < 1024) { return null; }
27 PositiveTimestamp ret_hu_conv = new PositiveTimestamp(null, ret);
28 ret_hu_conv.ptrs_to.add(this);
33 * generation time of the invoice
35 public void set_timestamp(PositiveTimestamp val) {
36 bindings.RawDataPart_set_timestamp(this.ptr, val == null ? 0 : val.ptr & ~1);
37 this.ptrs_to.add(val);
41 * Checks if two RawDataParts contain equal inner contents.
42 * This ignores pointers and is_owned flags and looks at the values in fields.
43 * Two objects with NULL inner values will be considered "equal" here.
45 public boolean eq(RawDataPart b) {
46 boolean ret = bindings.RawDataPart_eq(this.ptr, b == null ? 0 : b.ptr & ~1);
52 * Creates a copy of the RawDataPart
54 public RawDataPart clone() {
55 long ret = bindings.RawDataPart_clone(this.ptr);
56 if (ret < 1024) { return null; }
57 RawDataPart ret_hu_conv = new RawDataPart(null, ret);
58 ret_hu_conv.ptrs_to.add(this);