[rules-users] Trouble with the MVEL Map syntax
barnesjd
barnesjd+nabble at gmail.com
Tue Mar 20 23:37:39 EDT 2012
Correction.... I didn't paste the whole function the second time. I do have
a return for the else...
/function int englishToInt(String englishNumber)
{
Map m = ["one":1, "two":2, "three":3, "four":4, "five":5];
Object obj = m.get(englishNumber.toLowerCase());
if(obj != null)
return Integer.parseInt(obj.toString());
else
return -1;
}/
--
View this message in context: http://drools.46999.n3.nabble.com/Trouble-with-the-MVEL-Map-syntax-tp3844609p3844617.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
More information about the rules-users
mailing list