Flex 空整数 [英] Flex Null Integer

查看:22
本文介绍了Flex 空整数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过 AMF (BlazeDS) 将数据从 Java 传输到 Flex

I take data from Java to Flex by AMF (BlazeDS)

在java端对象有Integer字段.所以它可以为空.

In java side object has Integer field. So it can be null.

在 Flex 端对象是 int.所以空值被反序列化为 0.

In Flex side object is int. So null values are deserialized as 0.

这不是我想要的,我想看看是0还是null.

This is not what I want, I want to see whether it is 0 or null.

是否有 Flex 之类的包装器(Java 中的整数)?谢谢

Is there wrapper like (Integer in Java) for Flex? Thanks

推荐答案

据我所知,没有这样的包装器.如果构造函数的参数为​​ null

As far as I can tell, there is no such wrapper. You can write one that assigns NaN to the internal int if the argument to the constructor is null

这篇关于Flex 空整数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆