X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FResult_QueryChannelRangeDecodeErrorZ.java;h=802f94a997665f17054ce94f8d1e3a1a40042d2b;hb=a442b8532ad57aed1fc740141189899b39a15d79;hp=1bfd4620eeb23eee7866ed00e8c1628a7df2893c;hpb=fed2245c60159f6c074c9ed5c0f3ce273ad9841b;p=ldk-java diff --git a/src/main/java/org/ldk/structs/Result_QueryChannelRangeDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_QueryChannelRangeDecodeErrorZ.java index 1bfd4620..802f94a9 100644 --- a/src/main/java/org/ldk/structs/Result_QueryChannelRangeDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_QueryChannelRangeDecodeErrorZ.java @@ -5,7 +5,6 @@ import org.ldk.enums.*; import org.ldk.util.*; import java.util.Arrays; -@SuppressWarnings("unchecked") // We correctly assign various generic arrays public class Result_QueryChannelRangeDecodeErrorZ extends CommonBase { private Result_QueryChannelRangeDecodeErrorZ(Object _dummy, long ptr) { super(ptr); } protected void finalize() throws Throwable { @@ -28,10 +27,6 @@ public class Result_QueryChannelRangeDecodeErrorZ extends CommonBase { res_hu_conv.ptrs_to.add(this); this.res = res_hu_conv; } - public Result_QueryChannelRangeDecodeErrorZ_OK(QueryChannelRange res) { - this(null, bindings.CResult_QueryChannelRangeDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1)); - this.ptrs_to.add(res); - } } public static final class Result_QueryChannelRangeDecodeErrorZ_Err extends Result_QueryChannelRangeDecodeErrorZ { @@ -43,9 +38,36 @@ public class Result_QueryChannelRangeDecodeErrorZ extends CommonBase { err_hu_conv.ptrs_to.add(this); this.err = err_hu_conv; } - public Result_QueryChannelRangeDecodeErrorZ_Err(DecodeError err) { - this(null, bindings.CResult_QueryChannelRangeDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1)); - this.ptrs_to.add(err); - } } + + /** + * Creates a new CResult_QueryChannelRangeDecodeErrorZ in the success state. + */ + public static Result_QueryChannelRangeDecodeErrorZ ok(QueryChannelRange o) { + long ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); + Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret); + ret_hu_conv.ptrs_to.add(o); + return ret_hu_conv; + } + + /** + * Creates a new CResult_QueryChannelRangeDecodeErrorZ in the error state. + */ + public static Result_QueryChannelRangeDecodeErrorZ err(DecodeError e) { + long ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_err(e == null ? 0 : e.ptr & ~1); + Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret); + ret_hu_conv.ptrs_to.add(e); + return ret_hu_conv; + } + + /** + * Creates a new CResult_QueryChannelRangeDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_QueryChannelRangeDecodeErrorZ clone() { + long ret = bindings.CResult_QueryChannelRangeDecodeErrorZ_clone(this.ptr); + Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + }