jvanzyl     01/04/20 09:15:44

  Modified:    xdocs    user-guide.xml
  Log:
  - adding a note about [..] operator and the ArrayList. just got another
    question about it on the turbine list :-)
  
  Revision  Changes    Path
  1.40      +14 -6     jakarta-velocity/xdocs/user-guide.xml
  
  Index: user-guide.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity/xdocs/user-guide.xml,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- user-guide.xml    2001/03/28 04:05:06     1.39
  +++ user-guide.xml    2001/04/20 16:15:39     1.40
  @@ -811,7 +811,7 @@
           <li>Property reference</li>
           <li>Method reference</li>
           <li>Number literal</li>
  -        <li>Object array</li>
  +        <li>ArrayList</li>
       </ul>
    </p>
   
  @@ -820,13 +820,21 @@
    </p>
   
   <source><![CDATA[
  -#set( $monkey = $bill ) ##variable reference
  -#set( $monkey.Friend = "monica" ) ##string literal
  -#set( $monkey.Blame = $whitehouse.Leak ) ##property reference
  -#set( $monkey.Plan = $spindoctor.weave($web) ) ##method reference
  +#set( $monkey = $bill ) ## variable reference
  +#set( $monkey.Friend = "monica" ) ## string literal
  +#set( $monkey.Blame = $whitehouse.Leak ) ## property reference
  +#set( $monkey.Plan = $spindoctor.weave($web) ) ## method reference
   #set( $monkey.Number = 123 ) ##number literal
  -#set( $monkey.Say = ["Not", $my, "fault"] ) ##object array
  +#set( $monkey.Say = ["Not", $my, "fault"] ) ## ArrayList
   ]]></source>
  +
  + <p>
  +   NOTE: In the last example the elements defined with the
  +   [..] operator are accessible using the methods defined
  +   in the ArrayList class. So, for example, you could access
  +   the first element above using $monkey.Say.get(0).
  + </p>
  +
   
    <p>
       The RHS can also be a simple arithmetic expression:
  
  
  

Reply via email to