dion 2004/08/24 01:46:28 Modified: jexl/xdocs/reference examples.xml Log: More on arrays lists and maps Revision Changes Path 1.16 +17 -1 jakarta-commons/jexl/xdocs/reference/examples.xml Index: examples.xml =================================================================== RCS file: /home/cvs/jakarta-commons/jexl/xdocs/reference/examples.xml,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- examples.xml 24 Aug 2004 06:36:54 -0000 1.15 +++ examples.xml 24 Aug 2004 08:46:28 -0000 1.16 @@ -153,7 +153,23 @@ <source>foo.class.name</source> </p> </subsection> - <subsection name="Arrays, Collections and Maps"></subsection> + <subsection name="Arrays, Lists and Maps"> + <p> + Array elements can be accessed using either square brackets or a dotted + index notation, e.g. the following are equivalent + <source>arr[0] +arr.0</source> + The same holds true for lists. + </p> + <p> + For a map, the syntax is very similar, except the 'index' is an object, e.g. + the following are equivalent. + <source>aMap['key'] +aMap.get('key')</source> + Please note that the index does not have to be a string, and + that the string usage above is just one possible option. + </p> + </subsection> </section> </body> </document>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]