commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edwards, Peter" <>
Subject [CLI] Problems with Java-like properties
Date Mon, 10 Feb 2003 13:12:06 GMT
When I use "-Da=1 -Db=2" the method getOptionValues returns an array of [a,
1, b, 2]. Obviously I need to then treat them as pairs. But what if the
command line was used to flag that an option exists but has no value. Then
"-Da -Db=2" returns [a, b, 2] I can no longer treat them as pairs. The user
can solve this by entering "-Da= -Db=2" which returns [a, ,b, 2] but I
wondered if it would be better to return a hashmap of names with a list of
values for that name. There would no longer be any ambiguity for the

Pete Edwards

View raw message