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;
14 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
15 public class TwoTuple_u64u16Z extends CommonBase {
16 TwoTuple_u64u16Z(Object _dummy, long ptr) { super(ptr); }
17 @Override @SuppressWarnings("deprecation")
18 protected void finalize() throws Throwable {
20 if (ptr != 0) { bindings.C2Tuple_u64u16Z_free(ptr); }
27 long ret = bindings.C2Tuple_u64u16Z_get_a(this.ptr);
28 Reference.reachabilityFence(this);
35 public short get_b() {
36 short ret = bindings.C2Tuple_u64u16Z_get_b(this.ptr);
37 Reference.reachabilityFence(this);
42 long ret = bindings.C2Tuple_u64u16Z_clone_ptr(this.ptr);
43 Reference.reachabilityFence(this);
48 * Creates a new tuple which has the same data as `orig`
49 * but with all dynamically-allocated buffers duplicated in new buffers.
51 public TwoTuple_u64u16Z clone() {
52 long ret = bindings.C2Tuple_u64u16Z_clone(this.ptr);
53 Reference.reachabilityFence(this);
54 if (ret >= 0 && ret <= 4096) { return null; }
55 TwoTuple_u64u16Z ret_hu_conv = new TwoTuple_u64u16Z(null, ret);
56 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
61 * Creates a new C2Tuple_u64u16Z from the contained elements.
63 public static TwoTuple_u64u16Z of(long a, short b) {
64 long ret = bindings.C2Tuple_u64u16Z_new(a, b);
65 Reference.reachabilityFence(a);
66 Reference.reachabilityFence(b);
67 if (ret >= 0 && ret <= 4096) { return null; }
68 TwoTuple_u64u16Z ret_hu_conv = new TwoTuple_u64u16Z(null, ret);
69 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };