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_Z extends CommonBase {
16 TwoTuple_Z(Object _dummy, long ptr) { super(ptr); }
17 @Override @SuppressWarnings("deprecation")
18 protected void finalize() throws Throwable {
20 if (ptr != 0) { bindings.C2Tuple_Z_free(ptr); }
26 public short[] get_a() {
27 short[] ret = bindings.C2Tuple_Z_get_a(this.ptr);
28 Reference.reachabilityFence(this);
35 public short[] get_b() {
36 short[] ret = bindings.C2Tuple_Z_get_b(this.ptr);
37 Reference.reachabilityFence(this);
42 * Creates a new C2Tuple_Z from the contained elements.
44 public static TwoTuple_Z of(short[] a, short[] b) {
45 long ret = bindings.C2Tuple_Z_new(InternalUtils.check_arr_16_len(a, 32), InternalUtils.check_arr_16_len(b, 32));
46 Reference.reachabilityFence(a);
47 Reference.reachabilityFence(b);
48 if (ret >= 0 && ret <= 4096) { return null; }
49 TwoTuple_Z ret_hu_conv = new TwoTuple_Z(null, ret);
50 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };