由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - Collection return type and web service
相关主题
HashMap cache问个数组问题
Java里有没有象cell array一样的东西java collections framework 是啥?
interview question薄一点的java书
HashMap 怎样循环用更快?求C++的书, 本人会Core Java (转载)
Simple question: delete element from collection on condition?java servlet httpsession问题求教
你们有人测试过这种语法么?另一个入门问题。
[转载] Java 1.5 Generic 问题memcached
java知道一个reference怎么删掉它指向的内存空间? (转载)Show off一下一天画出来的,欢迎拍砖
相关话题的讨论汇总
话题: collection话题: hashmap话题: java话题: service话题: array
进入Java版参与讨论
1 (共1页)
g*****g
发帖数: 34805
1
Any WS expert gives me some update on whether C++ can
process Java collecion types with ease, such as HashMap
Or we have to fall back to array for everything?
Is an interface like this compliant?
public HashMap service()
c*****t
发帖数: 1879
2
C++ doesn't have HashMap by default; SGI / GNU implementations have
a version of it, but even then you cant' use it directly because
std::string etc do not have hash functions as part of their interface.

【在 g*****g 的大作中提到】
: Any WS expert gives me some update on whether C++ can
: process Java collecion types with ease, such as HashMap
: Or we have to fall back to array for everything?
: Is an interface like this compliant?
: public HashMap service()

g*****g
发帖数: 34805
3
Let me get my question straight, I read a tip below today.
http://www.ibm.com/developerworks/webservices/library/ws-tip-coding.html
It suggested using array to wrap any collection I'd have in Java, which's
fine. But the article was 4 years old, any improvement between then and now?

【在 c*****t 的大作中提到】
: C++ doesn't have HashMap by default; SGI / GNU implementations have
: a version of it, but even then you cant' use it directly because
: std::string etc do not have hash functions as part of their interface.

m******t
发帖数: 2416
4

now?
None that I know of. IIUC, the limitation on having any interoperable
dictionary type is kind of intrinsic, in that it's hard to standardize on
how null values are handled. IOW, when you get null back by looking up a key
, does it mean the key is available in the dictionary but with a null value,
or does it mean the key isn't available at all? The answer may not make
much difference in Java, but that's not necessarily true for all other
systems.

【在 g*****g 的大作中提到】
: Let me get my question straight, I read a tip below today.
: http://www.ibm.com/developerworks/webservices/library/ws-tip-coding.html
: It suggested using array to wrap any collection I'd have in Java, which's
: fine. But the article was 4 years old, any improvement between then and now?

g*****g
发帖数: 34805
5
You are talking about map here, how about Array/Set, do I have to convert
them to Array too?

key
value,

【在 m******t 的大作中提到】
:
: now?
: None that I know of. IIUC, the limitation on having any interoperable
: dictionary type is kind of intrinsic, in that it's hard to standardize on
: how null values are handled. IOW, when you get null back by looking up a key
: , does it mean the key is available in the dictionary but with a null value,
: or does it mean the key isn't available at all? The answer may not make
: much difference in Java, but that's not necessarily true for all other
: systems.

m******t
发帖数: 2416
6

I would think so, unless you only need to worry about java clients. It's
probably hard to even come up with a good piece of xml schema to describe
these types.

【在 g*****g 的大作中提到】
: You are talking about map here, how about Array/Set, do I have to convert
: them to Array too?
:
: key
: value,

g*****g
发帖数: 34805
7
OK, many thanks. They should probably standardize some collections though,
write wrapper class for every web service is boiler plate.

【在 m******t 的大作中提到】
:
: I would think so, unless you only need to worry about java clients. It's
: probably hard to even come up with a good piece of xml schema to describe
: these types.

r*****l
发帖数: 2859
8
Maybe my knowledge is old: unless you use generics,
you cannot use Collection in WS.

【在 g*****g 的大作中提到】
: Any WS expert gives me some update on whether C++ can
: process Java collecion types with ease, such as HashMap
: Or we have to fall back to array for everything?
: Is an interface like this compliant?
: public HashMap service()

1 (共1页)
进入Java版参与讨论
相关主题
Show off一下一天画出来的,欢迎拍砖Simple question: delete element from collection on condition?
英汉翻译求教你们有人测试过这种语法么?
求SCWCD复习资料![转载] Java 1.5 Generic 问题
Java 2D help..java知道一个reference怎么删掉它指向的内存空间? (转载)
HashMap cache问个数组问题
Java里有没有象cell array一样的东西java collections framework 是啥?
interview question薄一点的java书
HashMap 怎样循环用更快?求C++的书, 本人会Core Java (转载)
相关话题的讨论汇总
话题: collection话题: hashmap话题: java话题: service话题: array