Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > f448deafa1de20c56618e7ac9c6ef5d7 > files > 25

Falcon-doc-0.9.6.6-1.fc14.noarch.rpm

<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <title>Class List - Class List</title>
   <link href="faldoc.css" rel="stylesheet" type="text/css"/>
   <link href="tabs.css" rel="stylesheet" type="text/css"/>
</head>
<body class="faldoc_body">
<div class="navitop">
   <div class="tabs">
      <ul>
         <li><a href="./index.html"><span>Main</span></a></li>
         <li><a href="./pages.html"><span>Related pages</span></a></li>
         <li><a href="./groups.html"><span>Groups</span></a></li>
         <li><a href="./funset.html"><span>Function sets</span></a></li>
         <li><a href="./classes.html"><span>Classes</span></a></li>
         <li><a href="./objects.html"><span>Objects</span></a></li>
         <li><a href="./functions.html"><span>All functions</span></a></li>
         <li><a href="./globals.html"><span>Globals</span></a></li>
         
      </ul>
   </div>
</div>
<hr/>

<h1 class="faldoc_title">Class List</h1>

<p class="faldoc_brief">Fast growable double linked list. </p>
<p class="faldoc_funcdecl">
<b>class</b> List( ... ) \
      <b>from</b> <a href="./class_Sequence.html">Sequence</a>( ...  )
</p>


   <p class="faldoc_brief"><a href="#more">more...</a></p>
   <h2 class="faldoc_title">Summary</h2>
   <table class="faldoc_list">
   
      
         <tr><td><a href="#len">len()</a></td><td>Returns the number of items stored in the Sequence. </td></tr>
      
         <tr><td><a href="#pop">pop()</a></td><td>Removes the last item from the list (and returns it). </td></tr>
      
         <tr><td><a href="#popFront">popFront()</a></td><td>Removes the first item from the list (and returns it). </td></tr>
      
         <tr><td><a href="#push">push()</a></td><td>Appends given item to the end of the list. </td></tr>
      
         <tr><td><a href="#pushFront">pushFront()</a></td><td>Pushes an item in front of the list. </td></tr>
      
   
   </table>





   <h3 class="faldoc_title">Inherited methods</h3>
   <table class="faldoc_list">
   
      <tr><td><a href="./class_Sequence.html#append">append</a> from Sequence&nbsp;</td><td>Adds an item at the end of the sequence. </td></tr>
   
      <tr><td><a href="./class_Sequence.html#back">back</a> from Sequence&nbsp;</td><td>Returns the last item in the Sequence. </td></tr>
   
      <tr><td><a href="./class_Sequence.html#clear">clear</a> from Sequence&nbsp;</td><td>Removes all the items from the Sequence. </td></tr>
   
      <tr><td><a href="./class_Sequence.html#comp">comp</a> from Sequence&nbsp;</td><td>Appends elements to this sequence through a filter. </td></tr>
   
      <tr><td><a href="./class_Sequence.html#empty">empty</a> from Sequence&nbsp;</td><td>Checks if the Sequence is empty or not. </td></tr>
   
      <tr><td><a href="./class_Sequence.html#first">first</a> from Sequence&nbsp;</td><td>Returns an iterator to the first element of the Sequence. </td></tr>
   
      <tr><td><a href="./class_Sequence.html#front">front</a> from Sequence&nbsp;</td><td>Returns the first item in the Sequence. </td></tr>
   
      <tr><td><a href="./class_Sequence.html#last">last</a> from Sequence&nbsp;</td><td>Returns an iterator to the last element of the Sequence. </td></tr>
   
      <tr><td><a href="./class_Sequence.html#mcomp">mcomp</a> from Sequence&nbsp;</td><td>Appends elements to this sequence from multiple sources. </td></tr>
   
      <tr><td><a href="./class_Sequence.html#mfcomp">mfcomp</a> from Sequence&nbsp;</td><td>Appends elements to this sequence from multiple sources through a filter. </td></tr>
   
      <tr><td><a href="./class_Sequence.html#prepend">prepend</a> from Sequence&nbsp;</td><td>Adds an item in front of the sequence </td></tr>
   
   </table>



<a name="more"><h2 class="faldoc_title">Detailed description</h2></a>

<p class="faldoc_funcdecl">
<b>class</b> List( ... ) \
      <b>from</b> <a href="./class_Sequence.html">Sequence</a>( ...  )
</p>
<table class="faldoc_function">
<tr><td class="faldoc_param">...</td><td class="faldoc_paramdesc">An arbitrary list of parameters. </td></tr>

</table>
<br/>
<p class="item_brief">Fast growable double linked list. </p>
<p class="faldoc_text">The list class implements a double linked list of generic Falcon items that has some hooking with the falcon VM. Particularly, instances of the List class can be used as parameters for the Iterator constructor, or an iterator can be generated for them using first() and last() BOM methods. Also, instances of the List class can be used as any other sequence in for/in loops. </p>
<p class="faldoc_text">For example, the following code: </p>
<pre class="faldoc_code">
 descr = List("blue", "red", "gray", "purple")

for color in descr
forfirst
   &gt;&gt; "Grues are ", color
   continue
end
formiddle: &gt;&gt; ", ", color
forlast: &gt; " and ", color, "."
end
</pre>
<p class="faldoc_text">prints: </p>
<pre class="faldoc_code">
 Grues are blue, red, gray and purple.
</pre>




   <h2 class="faldoc_title">Methods</h2>
   
      <h3 class="faldoc_funcname"><a name="len">len()</a></h3>
      <p class="item_brief">Returns the number of items stored in the Sequence. </p>
      <p class="faldoc_funcdecl">List.len( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">Count of items in the Sequence. </td></tr>
         
         </table>
      
      
   
      <h3 class="faldoc_funcname"><a name="pop">pop()</a></h3>
      <p class="item_brief">Removes the last item from the list (and returns it). </p>
      <p class="faldoc_funcdecl">List.pop( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The last item in the list. </td></tr>
         
            <tr><td class="faldoc_raise">Raises:</td><td class="faldoc_raisedesc">
            <table class="faldoc_raise">
            <tr><td class="faldoc_raiseitem"><a href="./class_AccessError.html">AccessError</a></td><td class="faldoc_raisedesc">if the list is empty. </td></tr>
            </table>
            </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">Removes the last item from the list (and returns it). If the list is empty, an access exception is raised. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="popFront">popFront()</a></h3>
      <p class="item_brief">Removes the first item from the list (and returns it). </p>
      <p class="faldoc_funcdecl">List.popFront( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The first item in the list. </td></tr>
         
            <tr><td class="faldoc_raise">Raises:</td><td class="faldoc_raisedesc">
            <table class="faldoc_raise">
            <tr><td class="faldoc_raiseitem"><a href="./class_AccessError.html">AccessError</a></td><td class="faldoc_raisedesc">if the list is empty. </td></tr>
            </table>
            </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">Removes the first item from the list (and returns it). If the list is empty, an access exception is raised. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="push">push()</a></h3>
      <p class="item_brief">Appends given item to the end of the list. </p>
      <p class="faldoc_funcdecl">List.push( item )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">item</td><td class="faldoc_paramdesc">The item to be pushed. </td></tr>
         
         
         
         </table>
      
      
   
      <h3 class="faldoc_funcname"><a name="pushFront">pushFront()</a></h3>
      <p class="item_brief">Pushes an item in front of the list. </p>
      <p class="faldoc_funcdecl">List.pushFront( item )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">item</td><td class="faldoc_paramdesc">The item to be pushed. </td></tr>
         
         
         
         </table>
      
      
   

<hr/>
<div class="navibottom">
   <center>
      <a href="./index.html">Main</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./pages.html">Related pages</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./groups.html">Groups</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./funset.html">Function sets</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./classes.html">Classes</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./objects.html">Objects</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./functions.html">All functions</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./globals.html">Globals</a>
   </center>
</div>
</div>
<div class="faldoc_signature">Made with <a href="http://www.falconpl.org">faldoc 2.2.0</div>
</body>
</html>