1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
7 import java.lang.ref.Reference;
8 import javax.annotation.Nullable;
12 * The minimum amount required for an item in an [`Offer`], denominated in either bitcoin or
15 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
16 public class Amount extends CommonBase {
17 Amount(Object _dummy, long ptr) { super(ptr); }
18 @Override @SuppressWarnings("deprecation")
19 protected void finalize() throws Throwable {
21 if (ptr != 0) { bindings.Amount_free(ptr); }
25 long ret = bindings.Amount_clone_ptr(this.ptr);
26 Reference.reachabilityFence(this);
31 * Creates a copy of the Amount
33 public Amount clone() {
34 long ret = bindings.Amount_clone(this.ptr);
35 Reference.reachabilityFence(this);
36 if (ret >= 0 && ret <= 4096) { return null; }
37 org.ldk.structs.Amount ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Amount(null, ret); }
38 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };