sorry to be a pain… I have: HashMap<String, String> o
o.get('uses_votes'); // "1"
Yet…
Boolean.parseBoolean(o.get('uses_votes')); // "false"
I’m guessing that ....parseBoolean doesn’t accept the standard 0 = false 1 = true?
Am I doing something wrong or will I have to wrap my code in:
boolean uses_votes = false;
if(o.get('uses_votes').equals("1")) {
uses_votes = true;
}
Thanks
It accepts only a string value of
"true"to represent booleantrue. Best what you can do isOr if the
Mapactually represents an “entitiy”, I think a Javabean is way much better. Or if it represents configuration settings, you may want to take a look into Apache Commons Configuration.