import org.ldk.enums.*;
import org.ldk.util.*;
import java.util.Arrays;
+import javax.annotation.Nullable;
/**
/**
* Constructs a new Pong given each field
*/
- public static Pong constructor_new(short byteslen_arg) {
+ public static Pong of(short byteslen_arg) {
long ret = bindings.Pong_new(byteslen_arg);
+ if (ret < 1024) { return null; }
Pong ret_hu_conv = new Pong(null, ret);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
return ret_hu_conv;
*/
public Pong clone() {
long ret = bindings.Pong_clone(this.ptr);
+ if (ret < 1024) { return null; }
Pong ret_hu_conv = new Pong(null, ret);
ret_hu_conv.ptrs_to.add(this);
return ret_hu_conv;
/**
* Read a Pong from a byte array, created by Pong_write
*/
- public static Result_PongDecodeErrorZ constructor_read(byte[] ser) {
+ public static Result_PongDecodeErrorZ read(byte[] ser) {
long ret = bindings.Pong_read(ser);
+ if (ret < 1024) { return null; }
Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}