import org.ldk.enums.*;
import org.ldk.util.*;
import java.util.Arrays;
+import javax.annotation.Nullable;
/**
*/
public SignOrCreationError clone() {
long ret = bindings.SignOrCreationError_clone(this.ptr);
+ if (ret >= 0 && ret < 1024) { return null; }
SignOrCreationError ret_hu_conv = SignOrCreationError.constr_from_ptr(ret);
ret_hu_conv.ptrs_to.add(this);
return ret_hu_conv;
}
+ /**
+ * Utility method to constructs a new SignError-variant SignOrCreationError
+ */
+ public static SignOrCreationError sign_error() {
+ long ret = bindings.SignOrCreationError_sign_error();
+ if (ret >= 0 && ret < 1024) { return null; }
+ SignOrCreationError ret_hu_conv = SignOrCreationError.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new CreationError-variant SignOrCreationError
+ */
+ public static SignOrCreationError creation_error(org.ldk.enums.CreationError a) {
+ long ret = bindings.SignOrCreationError_creation_error(a);
+ if (ret >= 0 && ret < 1024) { return null; }
+ SignOrCreationError ret_hu_conv = SignOrCreationError.constr_from_ptr(ret);
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;
+ }
+
/**
* Checks if two SignOrCreationErrors contain equal inner contents.
* This ignores pointers and is_owned flags and looks at the values in fields.
*/
public boolean eq(SignOrCreationError b) {
boolean ret = bindings.SignOrCreationError_eq(this.ptr, b == null ? 0 : b.ptr & ~1);
- this.ptrs_to.add(b);
return ret;
}