<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <link rel="stylesheet" href="style.css" type="text/css"> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"> <link rel="Start" href="index.html"> <link rel="Up" href="ExtHashtbl.html"> <link title="Index of types" rel=Appendix href="index_types.html"> <link title="Index of exceptions" rel=Appendix href="index_exceptions.html"> <link title="Index of values" rel=Appendix href="index_values.html"> <link title="Index of class methods" rel=Appendix href="index_methods.html"> <link title="Index of classes" rel=Appendix href="index_classes.html"> <link title="Index of modules" rel=Appendix href="index_modules.html"> <link title="Base64" rel="Chapter" href="Base64.html"> <link title="BitSet" rel="Chapter" href="BitSet.html"> <link title="Dllist" rel="Chapter" href="Dllist.html"> <link title="DynArray" rel="Chapter" href="DynArray.html"> <link title="Enum" rel="Chapter" href="Enum.html"> <link title="ExtArray" rel="Chapter" href="ExtArray.html"> <link title="ExtHashtbl" rel="Chapter" href="ExtHashtbl.html"> <link title="ExtList" rel="Chapter" href="ExtList.html"> <link title="ExtString" rel="Chapter" href="ExtString.html"> <link title="Global" rel="Chapter" href="Global.html"> <link title="IO" rel="Chapter" href="IO.html"> <link title="OptParse" rel="Chapter" href="OptParse.html"> <link title="Option" rel="Chapter" href="Option.html"> <link title="PMap" rel="Chapter" href="PMap.html"> <link title="RefList" rel="Chapter" href="RefList.html"> <link title="Std" rel="Chapter" href="Std.html"> <link title="UChar" rel="Chapter" href="UChar.html"> <link title="UTF8" rel="Chapter" href="UTF8.html"> <link title="Unzip" rel="Chapter" href="Unzip.html"><link title="New Functions" rel="Section" href="#6_NewFunctions"> <link title="Older Functions" rel="Section" href="#6_OlderFunctions"> <title>ExtHashtbl.Hashtbl</title> </head> <body> <div class="navbar"> <a href="ExtHashtbl.html">Up</a> </div> <center><h1>Module <a href="type_ExtHashtbl.Hashtbl.html">ExtHashtbl.Hashtbl</a></h1></center> <br> <pre><span class="keyword">module</span> Hashtbl: <code class="code">sig</code> <a href="ExtHashtbl.Hashtbl.html">..</a> <code class="code">end</code></pre><hr width="100%"> <pre><span class="keyword">type</span> <a name="TYPEt"></a><code class="type">('a, 'b)</code> t = <code class="type">('a, 'b) Hashtbl.t</code> </pre> <div class="info"> The type of a hashtable.<br> </div> <br> <a name="6_NewFunctions"></a> <h6>New Functions</h6><br> <pre><span class="keyword">val</span> <a name="VALexists"></a>exists : <code class="type">('a, 'b) <a href="ExtHashtbl.Hashtbl.html#TYPEt">t</a> -> 'a -> bool</code></pre><div class="info"> <code class="code">exists h k</code> returns true is at least one item with key <code class="code">k</code> is found in the hashtable.<br> </div> <pre><span class="keyword">val</span> <a name="VALkeys"></a>keys : <code class="type">('a, 'b) <a href="ExtHashtbl.Hashtbl.html#TYPEt">t</a> -> 'a <a href="Enum.html#TYPEt">Enum.t</a></code></pre><div class="info"> Return an enumeration of all the keys of a hashtable. If the key is in the Hashtable multiple times, all occurrences will be returned.<br> </div> <pre><span class="keyword">val</span> <a name="VALvalues"></a>values : <code class="type">('a, 'b) <a href="ExtHashtbl.Hashtbl.html#TYPEt">t</a> -> 'b <a href="Enum.html#TYPEt">Enum.t</a></code></pre><div class="info"> Return an enumeration of all the values of a hashtable.<br> </div> <pre><span class="keyword">val</span> <a name="VALenum"></a>enum : <code class="type">('a, 'b) <a href="ExtHashtbl.Hashtbl.html#TYPEt">t</a> -> ('a * 'b) <a href="Enum.html#TYPEt">Enum.t</a></code></pre><div class="info"> Return an enumeration of (key,value) pairs of a hashtable.<br> </div> <pre><span class="keyword">val</span> <a name="VALof_enum"></a>of_enum : <code class="type">('a * 'b) <a href="Enum.html#TYPEt">Enum.t</a> -> ('a, 'b) <a href="ExtHashtbl.Hashtbl.html#TYPEt">t</a></code></pre><div class="info"> Create a hashtable from a (key,value) enumeration.<br> </div> <pre><span class="keyword">val</span> <a name="VALfind_default"></a>find_default : <code class="type">('a, 'b) <a href="ExtHashtbl.Hashtbl.html#TYPEt">t</a> -> 'a -> 'b -> 'b</code></pre><div class="info"> Find a binding for the key, and return a default value if not found<br> </div> <pre><span class="keyword">val</span> <a name="VALfind_option"></a>find_option : <code class="type">('a, 'b) Hashtbl.t -> 'a -> 'b option</code></pre><div class="info"> Find a binding for the key, or return <code class="code">None</code> if no value is found<br> </div> <pre><span class="keyword">val</span> <a name="VALremove_all"></a>remove_all : <code class="type">('a, 'b) <a href="ExtHashtbl.Hashtbl.html#TYPEt">t</a> -> 'a -> unit</code></pre><div class="info"> Remove all bindings for the given key<br> </div> <pre><span class="keyword">val</span> <a name="VALmap"></a>map : <code class="type">('a -> 'b) -> ('c, 'a) <a href="ExtHashtbl.Hashtbl.html#TYPEt">t</a> -> ('c, 'b) <a href="ExtHashtbl.Hashtbl.html#TYPEt">t</a></code></pre><div class="info"> <code class="code">map f x</code> creates a new hashtable with the same keys as <code class="code">x</code>, but with the function <code class="code">f</code> applied to all the values<br> </div> <pre><span class="keyword">val</span> <a name="VALlength"></a>length : <code class="type">('a, 'b) <a href="ExtHashtbl.Hashtbl.html#TYPEt">t</a> -> int</code></pre><div class="info"> Return the number of elements inserted into the Hashtbl (including duplicates)<br> </div> <br> <a name="6_OlderFunctions"></a> <h6>Older Functions</h6><br> <br> Please refer to the Ocaml Manual for documentation of these functions. (note : functor support removed to avoid code duplication).<br> <pre><span class="keyword">val</span> <a name="VALcreate"></a>create : <code class="type">int -> ('a, 'b) <a href="ExtHashtbl.Hashtbl.html#TYPEt">t</a></code></pre><pre><span class="keyword">val</span> <a name="VALclear"></a>clear : <code class="type">('a, 'b) <a href="ExtHashtbl.Hashtbl.html#TYPEt">t</a> -> unit</code></pre><pre><span class="keyword">val</span> <a name="VALadd"></a>add : <code class="type">('a, 'b) <a href="ExtHashtbl.Hashtbl.html#TYPEt">t</a> -> 'a -> 'b -> unit</code></pre><pre><span class="keyword">val</span> <a name="VALcopy"></a>copy : <code class="type">('a, 'b) <a href="ExtHashtbl.Hashtbl.html#TYPEt">t</a> -> ('a, 'b) <a href="ExtHashtbl.Hashtbl.html#TYPEt">t</a></code></pre><pre><span class="keyword">val</span> <a name="VALfind"></a>find : <code class="type">('a, 'b) <a href="ExtHashtbl.Hashtbl.html#TYPEt">t</a> -> 'a -> 'b</code></pre><pre><span class="keyword">val</span> <a name="VALfind_all"></a>find_all : <code class="type">('a, 'b) <a href="ExtHashtbl.Hashtbl.html#TYPEt">t</a> -> 'a -> 'b list</code></pre><pre><span class="keyword">val</span> <a name="VALmem"></a>mem : <code class="type">('a, 'b) <a href="ExtHashtbl.Hashtbl.html#TYPEt">t</a> -> 'a -> bool</code></pre><pre><span class="keyword">val</span> <a name="VALremove"></a>remove : <code class="type">('a, 'b) <a href="ExtHashtbl.Hashtbl.html#TYPEt">t</a> -> 'a -> unit</code></pre><pre><span class="keyword">val</span> <a name="VALreplace"></a>replace : <code class="type">('a, 'b) <a href="ExtHashtbl.Hashtbl.html#TYPEt">t</a> -> 'a -> 'b -> unit</code></pre><pre><span class="keyword">val</span> <a name="VALiter"></a>iter : <code class="type">('a -> 'b -> unit) -> ('a, 'b) <a href="ExtHashtbl.Hashtbl.html#TYPEt">t</a> -> unit</code></pre><pre><span class="keyword">val</span> <a name="VALfold"></a>fold : <code class="type">('a -> 'b -> 'c -> 'c) -> ('a, 'b) <a href="ExtHashtbl.Hashtbl.html#TYPEt">t</a> -> 'c -> 'c</code></pre><pre><span class="keyword">val</span> <a name="VALhash"></a>hash : <code class="type">'a -> int</code></pre></body></html>