1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
7 import javax.annotation.Nullable;
13 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
14 public class TwoTuple_OutPointScriptZ extends CommonBase {
15 TwoTuple_OutPointScriptZ(Object _dummy, long ptr) { super(ptr); }
16 @Override @SuppressWarnings("deprecation")
17 protected void finalize() throws Throwable {
19 if (ptr != 0) { bindings.C2Tuple_OutPointScriptZ_free(ptr); }
25 public OutPoint get_a() {
26 long ret = bindings.C2Tuple_OutPointScriptZ_get_a(this.ptr);
27 if (ret >= 0 && ret <= 4096) { return null; }
28 OutPoint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new OutPoint(null, ret); }
29 ret_hu_conv.ptrs_to.add(this);
36 public byte[] get_b() {
37 byte[] ret = bindings.C2Tuple_OutPointScriptZ_get_b(this.ptr);
42 long ret = bindings.C2Tuple_OutPointScriptZ_clone_ptr(this.ptr);
47 * Creates a new tuple which has the same data as `orig`
48 * but with all dynamically-allocated buffers duplicated in new buffers.
50 public TwoTuple_OutPointScriptZ clone() {
51 long ret = bindings.C2Tuple_OutPointScriptZ_clone(this.ptr);
52 if (ret >= 0 && ret <= 4096) { return null; }
53 TwoTuple_OutPointScriptZ ret_hu_conv = new TwoTuple_OutPointScriptZ(null, ret);
54 ret_hu_conv.ptrs_to.add(this);
59 * Creates a new C2Tuple_OutPointScriptZ from the contained elements.
61 public static TwoTuple_OutPointScriptZ of(OutPoint a, byte[] b) {
62 long ret = bindings.C2Tuple_OutPointScriptZ_new(a == null ? 0 : a.ptr & ~1, b);
63 if (ret >= 0 && ret <= 4096) { return null; }
64 TwoTuple_OutPointScriptZ ret_hu_conv = new TwoTuple_OutPointScriptZ(null, ret);
65 ret_hu_conv.ptrs_to.add(ret_hu_conv);