]> git.bitcoin.ninja Git - ldk-java/blob - src/main/java/org/ldk/structs/Result_SecretKeySecpErrorZ.java
Fix race in tests
[ldk-java] / src / main / java / org / ldk / structs / Result_SecretKeySecpErrorZ.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5 import org.ldk.util.*;
6 import java.util.Arrays;
7
8 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
9 public class Result_SecretKeySecpErrorZ extends CommonBase {
10         private Result_SecretKeySecpErrorZ(Object _dummy, long ptr) { super(ptr); }
11         protected void finalize() throws Throwable {
12                 if (ptr != 0) { bindings.CResult_SecretKeySecpErrorZ_free(ptr); } super.finalize();
13         }
14
15         static Result_SecretKeySecpErrorZ constr_from_ptr(long ptr) {
16                 if (bindings.LDKCResult_SecretKeySecpErrorZ_result_ok(ptr)) {
17                         return new Result_SecretKeySecpErrorZ_OK(null, ptr);
18                 } else {
19                         return new Result_SecretKeySecpErrorZ_Err(null, ptr);
20                 }
21         }
22         public static final class Result_SecretKeySecpErrorZ_OK extends Result_SecretKeySecpErrorZ {
23                 public final byte[] res;
24                 private Result_SecretKeySecpErrorZ_OK(Object _dummy, long ptr) {
25                         super(_dummy, ptr);
26                         this.res = bindings.LDKCResult_SecretKeySecpErrorZ_get_ok(ptr);
27                 }
28                 public Result_SecretKeySecpErrorZ_OK(byte[] res) {
29                         this(null, bindings.CResult_SecretKeySecpErrorZ_ok(res));
30                 }
31         }
32
33         public static final class Result_SecretKeySecpErrorZ_Err extends Result_SecretKeySecpErrorZ {
34                 public final LDKSecp256k1Error err;
35                 private Result_SecretKeySecpErrorZ_Err(Object _dummy, long ptr) {
36                         super(_dummy, ptr);
37                         this.err = bindings.LDKCResult_SecretKeySecpErrorZ_get_err(ptr);
38                 }
39                 public Result_SecretKeySecpErrorZ_Err(LDKSecp256k1Error err) {
40                         this(null, bindings.CResult_SecretKeySecpErrorZ_err(err));
41                 }
42         }
43 }