Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 4fccfe23f6486142b4197d1daac0cf21 > files > 38

Falcon-doc-0.9.6.6-2.fc15.noarch.rpm

<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <title>Class Set - Class Set</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 Set</h1>

<p class="faldoc_brief">Storage for uniquely defined items (and ordering criterion). </p>
<p class="faldoc_funcdecl">
<b>class</b> Set( ... ) \
      <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="#contains">contains()</a></td><td>Checks if a certain item is in the set. </td></tr>
      
         <tr><td><a href="#find">find()</a></td><td>Checks if a certain item is in the set. </td></tr>
      
         <tr><td><a href="#insert">insert()</a></td><td>Adds an item to the set. </td></tr>
      
         <tr><td><a href="#len">len()</a></td><td>Returns the number of items stored in this set. </td></tr>
      
         <tr><td><a href="#remove">remove()</a></td><td>Removes an item from a set. </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> Set( ... ) \
      <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">Storage for uniquely defined items (and ordering criterion). </p>
<p class="faldoc_text">The Set class implements a binary tree, uniquely and orderly storing a set of generic Falcon items. Instances of the Set class can be used as parameters for the Iterator constructor, and an iterator can be generated for them using first() and last() BOM methods. Also, instances of the Set class can be used as any other sequence in for/in loops. </p>
<p class="faldoc_text">Items in the set are ordered using the Falcon standard comparison algorithm; if they are instances of classes (or blessed dictionaries) implementing the compare() method, that method is used as a comparison criterion. </p>
<p class="faldoc_text">If the set constructor is given some parameters, it will be initially filled with those items; if some of them is duplicated, only one item will be then found in the set. </p>




   <h2 class="faldoc_title">Methods</h2>
   
      <h3 class="faldoc_funcname"><a name="contains">contains()</a></h3>
      <p class="item_brief">Checks if a certain item is in the set. </p>
      <p class="faldoc_funcdecl">Set.contains( item )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">item</td><td class="faldoc_paramdesc">The item to be found. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">True if the item is in the set, false otherwise. </td></tr>
         
         </table>
      
      
   
      <h3 class="faldoc_funcname"><a name="find">find()</a></h3>
      <p class="item_brief">Checks if a certain item is in the set. </p>
      <p class="faldoc_funcdecl">Set.find( item )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">item</td><td class="faldoc_paramdesc">The item to be found. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">True if the item is in the set, false otherwise. </td></tr>
         
         </table>
      
      
   
      <h3 class="faldoc_funcname"><a name="insert">insert()</a></h3>
      <p class="item_brief">Adds an item to the set. </p>
      <p class="faldoc_funcdecl">Set.insert( item )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">item</td><td class="faldoc_paramdesc">The item to be added. </td></tr>
         
         
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">If an item considered equal to the added one exists, the previously set item is destroyed. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="len">len()</a></h3>
      <p class="item_brief">Returns the number of items stored in this set. </p>
      <p class="faldoc_funcdecl">Set.len( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">Count of items in the set. </td></tr>
         
         </table>
      
      
   
      <h3 class="faldoc_funcname"><a name="remove">remove()</a></h3>
      <p class="item_brief">Removes an item from a set. </p>
      <p class="faldoc_funcdecl">Set.remove( item )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">item</td><td class="faldoc_paramdesc">The item to be removed. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">True if the item was removed, false if it wasn't found. </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>