selenium-webdriver
Version:
The official WebDriver JavaScript bindings from the Selenium project
12 lines • 7.63 kB
HTML
<meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>goog.iter.GroupByIterator_</title><link href="dossier.css" rel="stylesheet" type="text/css"><div id="main-wrapper"><input type="checkbox" id="sidenav-toggle" /><main><header><h1>Class goog.iter.GroupByIterator_.<code class="type"><KEY, VALUE></code></h1><a class="source" href="source/lib/goog/iter/iter.js.src.html#l910">code »</a><pre><code>goog.iter.Iterator.<Array>
└ goog.iter.GroupByIterator_</code></pre></header><section><p>Implements the <code >goog.iter.groupBy</code> iterator.<h2>Constructor</h2><div class="ctor wrap-details private"><div><div class="ctor"><span class="member">goog.iter.GroupByIterator_ <span class="args">( iterable, opt_keyFunc )</span></span></div><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>iterable: <code class="type">(!<a href="class_goog_iter_Iterator.html">goog.iter.Iterator</a>.<VALUE>|!<a href="namespace_goog_iter.html#goog.iter.Iterable">goog.iter.Iterable</a>)</code><dd>The
iterable to group.<dt>opt_keyFunc: <code class="type">function(VALUE): KEY=</code><dd>Optional function for
determining the key value for each group in the <code >iterable</code>. Default
is the identity function.</dl></table></div></div></div></section><div id="visibility-controls"><b>Show:</b><label for="show-public"><span><input type="checkbox" id="show-public" checked/></span>Public</label><label for="show-protected"><span><input type="checkbox" id="show-protected"/></span>Protected</label><label for="show-private"><span><input type="checkbox" id="show-private"/></span>Private</label></div><section id="instance-methods"><h2>Instance Methods</h2><h3>Defined in <code class="type">goog.iter.GroupByIterator_</code></h3><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/iter/iter.js.src.html#l964">code »</a><span class="member"><a name="groupItems_">groupItems_</a> <span class="args">( targetKey )</span> ⇒ <code class="type">!<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a>.<VALUE></code></span></div><p>Performs the grouping of objects using the given key.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>targetKey: <code class="type">KEY</code><dd>The target key object for the group.</dl><tr><th>Returns<tr><td><dl>An array of grouped objects.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/iter/iter.js.src.html#l924">code »</a><span class="member"><a name="keyFunc">keyFunc</a> <span class="args">( )</span> ⇒ <code class="type">KEY</code></span></div><p>A function for determining the key value for each element in the iterable.
If no function is provided, the identity function is used and returns the
element unchanged.</summary></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/iter/iter.js.src.html#l948">code »</a><span class="member"><a name="next">next</a> <span class="args">( )</span> ⇒ <code class="type">Array</code></span></div></summary></details></div></div><h3>Defined in <code class="type"><a href="class_goog_iter_Iterator.html#goog.iter.Iterator.<Array>">goog.iter.Iterator.<Array></a></code></h3><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/iter/iter.js.src.html#l88">code »</a><span class="member"><a name="__iterator__">__iterator__</a> <span class="args">( opt_keys )</span> ⇒ <code class="type">!<a href="class_goog_iter_Iterator.html">goog.iter.Iterator</a>.<VALUE></code></span></div><p>Returns the <code >Iterator</code> object itself. This is used to implement
the iterator protocol in JavaScript 1.7</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>opt_keys: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>=</code><dd>Whether to return the keys or values. Default is
to only return the values. This is being used by the for-in loop (true)
and the for-each-in loop (false). Even though the param gives a hint
about what the iterator will return there is no guarantee that it will
return the keys when true is passed.</dl><tr><th>Returns<tr><td><dl>The object itself.</dl></table></div></details></div></div></section><section id="instance-properties"><h2>Instance Properties</h2><h3>Defined in <code class="type">goog.iter.GroupByIterator_</code></h3><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/iter/iter.js.src.html#l936">code »</a><span class="member"><a name="currentKey">currentKey</a> : <code class="type">KEY</code></span></div><p>The current key visited during iteration.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/iter/iter.js.src.html#l942">code »</a><span class="member"><a name="currentValue">currentValue</a> : <code class="type">VALUE</code></span></div><p>The current value being added to the group.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/iter/iter.js.src.html#l916">code »</a><span class="member"><a name="iterator">iterator</a> : <code class="type">!<a href="class_goog_iter_Iterator.html">goog.iter.Iterator</a></code></span></div><p>The iterable to group, coerced to an iterator.</summary></details></div></div><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/iter/iter.js.src.html#l930">code »</a><span class="member"><a name="targetKey">targetKey</a> : <code class="type">KEY</code></span></div><p>The target key for determining the start of a group.</summary></details></div></div></section><section id="static-properties"><h2>Static Properties</h2><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/iter/iter.js.src.html#l910">code »</a><span class="member"><a name="goog.iter.GroupByIterator_.superClass_">goog.iter.GroupByIterator_.superClass_</a> : <code class="type"><a href="class_goog_iter_Iterator.html">goog.iter.Iterator.prototype</a></code></span></div></summary></details></div></div></section></main><nav id="topnav"><div><div id="menubutton"><label for="sidenav-toggle">Menu</label></div><form id="searchbox"><div><input type="search" placeholder="Search" tabindex="1"></div></form></div></nav><nav id="sidenav"><input type="checkbox" id="sidenav-types-ctrl" /><input type="checkbox" id="sidenav-files-ctrl" /><input type="checkbox" id="sidenav-modules-ctrl" /><a id="sidenav-overview"><div><h4>Overview</h4></div></a><div id="sidenav-types"><label for="sidenav-types-ctrl"><h4>Types</h4></label><i>No data</i></div><div id="sidenav-modules"><label for="sidenav-modules-ctrl"><h4>Modules</h4></label><i>No data</i></div><div id="sidenav-files"><label for="sidenav-files-ctrl"><h4>Files</h4></label><i>No data</i></div><a href="license.html"><div><h4>License</h4></div></a></nav><div id="push-footer"></div></div><footer><a href="https://github.com/jleyba/js-dossier">Generated by dossier</a></footer><script src="types.js"></script><script src="dossier.js"></script>