[zeromq-dev] Requesting suggestions for getsockopt() in Java

gonzalo diethelm gdiethelm at dcv.cl
Mon Aug 9 16:01:33 CEST 2010


I have two questions:

1. How to properly implement a method that could return two types of
values (int and String)? It could always return Object, but that would
force the caller to use Integer, not int, and to do explicit casts. Or
it could be split into two separate methods: getIntSockopt() and
getStringSockopt(). As I said somewhere else, ugly as a mother in law...
2. Should these methods be "properly" capitalized, Java style? By that I
mean setSockOpt(), getSockOpt(), etc.

Thanks for any ideas and best regards.

-- 
Gonzalo Diethelm 




More information about the zeromq-dev mailing list