import org.ldk.enums.*;
import org.ldk.util.*;
import java.util.Arrays;
+import javax.annotation.Nullable;
/**
*/
public ChannelFeatures get_features() {
long ret = bindings.UnsignedChannelAnnouncement_get_features(this.ptr);
- ChannelFeatures ret_hu_conv = new ChannelFeatures(null, ret);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ ChannelFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new ChannelFeatures(null, ret); }
ret_hu_conv.ptrs_to.add(this);
return ret_hu_conv;
}
*/
public void set_features(ChannelFeatures val) {
bindings.UnsignedChannelAnnouncement_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
- this.ptrs_to.add(val);
}
/**
*/
public UnsignedChannelAnnouncement clone() {
long ret = bindings.UnsignedChannelAnnouncement_clone(this.ptr);
- UnsignedChannelAnnouncement ret_hu_conv = new UnsignedChannelAnnouncement(null, ret);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ UnsignedChannelAnnouncement ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new UnsignedChannelAnnouncement(null, ret); }
ret_hu_conv.ptrs_to.add(this);
return ret_hu_conv;
}
*/
public static Result_UnsignedChannelAnnouncementDecodeErrorZ read(byte[] ser) {
long ret = bindings.UnsignedChannelAnnouncement_read(ser);
+ if (ret >= 0 && ret <= 4096) { return null; }
Result_UnsignedChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}