黑莓 JDE ArrayList?
Blackberry JDE 不包含 java.util.ArrayList
,即使它了解 java.util
?这是怎么回事? BB 有同等级别吗?我真的不想使用数组,因为我正在处理的对象数量未知。为什么 Blackberry JDE 遗漏了这么多内容?
The Blackberry JDE does not include java.util.ArrayList
, even though it knows about java.util
? What's up with that? Is there an equivalent class for BB? I don't want to use an array, really, because I have an unknown number of objects I'm dealing with. why does the Blackberry JDE leave so much out?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
从语言的角度来看,它们是 Java。它只是不支持所有标准版软件包。它更符合微版本标准,但从包的角度来看远远超出了 J2ME。他们没有到处说他们符合 J2SE 1.6,但它仍然是 Java。
当然它也有数组,除非你指的是类
Arrays
。但是,他们也有。它位于包net.rim.device.api.util
中。Well they are Java from a language standpoint. It just doesn't support all of the standard edition packages. It falls more inline with the microedition standards, but is way beyond J2ME from a package standpoint. They don't go around saying they're in compliance with J2SE 1.6, but it's still Java.
And of course it has arrays, unless you mean the class,
Arrays
. But, they have that too. It's located in packagenet.rim.device.api.util
.是的,Blackberry 不是 J2SE,但也不是 J2ME。
查看:
我怀疑用这些类不可能做一些你可以用 ArrayList 做的事情。
很棒的文章:BlackBerry API 隐藏的瑰宝(第二部分)
Yeah, Blackberry isn't J2SE, but it's not J2ME neither.
Check out:
I have doubts about impossibility of doing with those classes something you can do with ArrayList.
Great article: BlackBerry API Hidden Gems (Part Two)
您可以自己将其添加到您的包中。获取 ArrayList 实现并将其添加到您的项目中。您还需要获取 AbstractCollection、AbstractList、Collection、Comparable、ConcurrentModificationException、Iterator、List 和 ListIterator 的实现。
我有一个包含 java.util 包的项目,我已将所有这些类放入其中,现在我可以使用 ArrayList :)。必要时,您必须稍微修改类以使用 rim 导入而不是标准 java 导入,但如果您确实想要 ArrayList,则可以这样做。
You can add it into your package yourself. Get the ArrayList implementation and just add it into your project. You will also need to get the implementation for AbstractCollection, AbstractList, Collection, Comparable, ConcurrentModificationException, Iterator, List and ListIterator.
I have a project that has a java.util package and I have put all of these classes in there and I can now use ArrayList :). You will have to modify the classes slightly to use rim imports rather than standard java imports where necessary, but it can be done if you really want ArrayLists.