UNPKG

@mapgis/webclient-common

Version:

An important part of the MapGIS Client for JavaScript product, which provides interfaces and functions unrelated to the map engine.

6,015 lines 102 kB
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <script src="scripts/prettify/prettify.js"></script>
    <script src="scripts/prettify/lang-css.js"></script>
    <title> MapGIS Client for JavaScript API </title>
<script type="text/javascript">

</script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
        <script src="scripts/jquery.min.js"></script>
    <script src="scripts/adminlte/app.min.js"></script>
    <link type="text/css" rel="stylesheet" href="styles/bootstrap.min.css">
    <link type="text/css" rel="stylesheet" href="styles/adminlte/AdminLTE.min.css">
    <link type="text/css" rel="stylesheet" href="styles/adminlte/skin-blue.min.css">
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/common.css">
    <link type="text/css" rel="stylesheet" href="styles/header.css">
    <link type="text/css" rel="stylesheet" href="styles/examples.css">
    <link type="text/css" rel="stylesheet" href="styles/style.customize.css">
    <link type="text/css" rel="stylesheet" href="styles/font-awesome.css">
    <link type="text/css" rel="stylesheet" href="styles/jaguar.css">
    <script src="scripts/bootstrap.min.js"></script>
</head>
<body class='sidebar-mini'>

<div id="wrap" class="clearfix">
    <header class="header-wrapper main-header mapgis-header">
        <nav class="navbar navbar-static-top lite">
            <div class="nav-header">
                <div class="navbar-header">
                    <div class="navbar-title" style="display: flex;align-items: center; ">
                        <a href="index.html">
                            <img  class="mapgis-webclient-logo" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAACgCAYAAACLz2ctAAAACXBIWXMAAAsSAAALEgHS3X78AAAgAElEQVR42u2de3gb5Z3vv+/Yjp2rFF8Sx5atsRMgpbRWC7Q9tF2rfbYtpZQYKBRoS4aWpeFWD3DKluW0Hvd2oGnppKHAlpsMI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SsuVFkeDMW8UAAACwSURBVJvlTfGWDKGANt+KA+1gTD31wFd85l01AUxaiq97PlRfjpwiqhFI02LVbbvAmDz94EUe8y6aAKYtRd/pmlVfBvj33GkUaW69YEwKPNJi+nkmgAZDeM1zs+vLwW8cD/l5itZxiWreKRPAjIpw9TOivsaMtknnT599pj1+qennmQBm8eZ94+krQPQe7by8x7wbJoCmFKI1MW+BKSaAppgAmmKKCaApJoCmmJJN+f8yRATGNXIUUAAAAABJRU5ErkJggg==">
                        </a>
                        <a class="navbar-brand">
                            <span class="mapgis-webclient-text"> MapGIS Client for JavaScript(Common) </span>
                        </a>
                        <div id="suffix-title">for MapboxGL</div>
                    </div>
                    <button
                        type="button"
                        class="navbar-toggle collapsed"
                        data-toggle="collapse"
                        data-target="#navbar-collapse"
                        aria-expanded="false"
                    >
                        <i class="fa fa-bars"></i>
                    </button>
                </div>
            </div>
        </nav>
    </header>
    <div class="navigationDiv">
    </div>
    <div class="main content-wrapper examples-container">
        <h1 class="page-title" data-filename="RendererCollection.html">Class: RendererCollection</h1>
        



<section>
    
<header>
    <h2></span>RendererCollection
    
    
    </h2>
    
</header>  

<article>
    <div class="container-overview">
    
    
    
        
<dt>
    <div class="nameContainer">
        <h4 class="name" id="RendererCollection">
            
            new RendererCollection<span class="signature">(collection)</span>
        </h4>
    
        
        <div class="tag-source">
            document/layer/support/RendererCollection.js, line 5
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>Renderer集合对象,主要用于M3DModelCacheLayer的renderer属性需要多个Renderer样式的场景</p>
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>collection</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;Object></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>render结构集合
这里对object属性结构有要求,需要使用指定两个属性:
layerID:渲染图层ID,字符串类型
renderer:渲染器对象,BaseRenderer类型及其派生类</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    
    
        <h5>Example</h5>
        
        <p class="code-caption"><h7>创建Renderer集合对象</h7></p>
    

    
    <pre class="prettyprint"><code>const rendererCollection = new zondy.RendererCollection([
{
// 子图层ID
layerID: '1834734999',
// 渲染renderer
renderer: layerRenderer1
},
{
// 子图层ID
layerID: '1834734000',
// 渲染renderer
renderer: layerRenderer2
}
])
layer.renderer = rendererCollection</code></pre>
    

    
</dd>

    
    </div>
    
    
        <h3 class="subsection-title">Extends</h3>
        <ul>
            
            
            
            
            <li><a href="Collection.html">Collection</a></li>
            
            
        </ul>
    

    
    
    
    
    
    
    
    
    
        <h3 class="subsection-title">Members</h3>
        
        <dl>
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="items">items<span class="type-signature type array.<any>">Array.&lt;any></span> </h4>
    </div>
    
    
</dt>
<dd>
    
    <div class="description">
        <p>数组集合中的元素</p>
    </div>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="length">length<span class="type-signature type number">Number</span> </h4>
    </div>
    
    
</dt>
<dd>
    
    <div class="description">
        <p>数组集合的长度</p>
    </div>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    
</dd>

        </dl>
    

    

    
        <h3 class="subsection-title">Methods</h3>
        
        <dl>
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="add">
            
                <span class="inherited"><a href="Collection.html#add">inherited</a></span>
            
            add<span class="signature">(item, index)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="Collection.html">Collection</a>}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 94
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>添加一个元素到集合中</p>
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>item</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>要添加的元素</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>index</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>指的元素要添加的位置,如果不指定,默认添加到集合末尾</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        <a href="Collection.html">Collection</a>
                        
                    
            </td>
            <td class="description last">添加完元素后的集合对象</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Examples</h5>
        
        <p class="code-caption"><h7 id='add'>添加一个元素到集合中</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection()
collection.add({
  key: 'value'
})</code></pre>
    

        <p class="code-caption"><h7 id='add2'>添加一个元素到集合中的指定位置</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3])
collection.add({
  key: 'value'
}, 1)</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="addMany">
            
                <span class="inherited"><a href="Collection.html#addMany">inherited</a></span>
            
            addMany<span class="signature">(items, index)</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 115
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>添加多个元素到集合中,添加完成后会发送数据变更事件</p>
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>items</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;*></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>要添加的多个元素</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>index</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>指的元素要添加的位置,如果不指定,默认添加到集合末尾</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    
    
        <h5>Examples</h5>
        
        <p class="code-caption"><h7 id='addMany'>添加多个元素到集合中</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection()
collection.addMany([1, 2, 3])</code></pre>
    

        <p class="code-caption"><h7 id='addMany2'>添加多个元素到集合中的指定位置</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3])
collection.addMany([1, 2, 3], 2)</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="all">
            
                <span class="inherited"><a href="Collection.html#all">inherited</a></span>
            
            all<span class="signature">()</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Array.&lt;*>}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 801
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>获取集合中的所有元素并返回一个数组</p>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Array.&lt;*>
                        
                    
            </td>
            <td class="description last">集合中元素构成的数组</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example</h5>
        
        <p class="code-caption"><h7 id='toArray'>返回集合对象中元素组成的数组</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3])
collection.all()</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="at">
            
                <span class="inherited"><a href="Collection.html#at">inherited</a></span>
            
            at<span class="signature">(index)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{*}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 140
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>返回指定下标处的元素</p>
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>index</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>元素下标,默认从0开始,允许使用正整数和负整数,负整数从集合中的最后一个元素开始倒数</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        *
                        
                    
            </td>
            <td class="description last">查询到的元素</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example</h5>
        
        <p class="code-caption"><h7 id='at'>返回指定下标处的元素</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3])
const item = collection.at(1)</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="clone">
            
                <span class="inherited"><a href="Collection.html#clone">inherited</a></span>
            
            clone<span class="signature">()</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="Collection.html">Collection</a>}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 156
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>克隆并返回一个新集合对象</p>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        <a href="Collection.html">Collection</a>
                        
                    
            </td>
            <td class="description last">克隆后的集合对象</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example</h5>
        
        <p class="code-caption"><h7 id='clone'>克隆并返回一个新集合对象</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3])
const cloneObj = collection.clone()</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="concat">
            
                <span class="inherited"><a href="Collection.html#concat">inherited</a></span>
            
            concat<span class="signature">(collection)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="Collection.html">Collection</a>}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 173
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>将一个数组或者集合对象链接到当前集合对象末尾</p>
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>collection</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array</span>
|

<span class="param-type"><a href="Collection.html">Collection</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>要链接的数组或者集合对象</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        <a href="Collection.html">Collection</a>
                        
                    
            </td>
            <td class="description last">链接后的新集合对象</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example</h5>
        
        <p class="code-caption"><h7 id='concat'>将一个数组或者集合对象链接到当前集合对象末尾</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3])
collection.concat([{'a': 1}, {'b': 2}])
collection.concat(new Collection([4, 5, 6]))</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="createInstance">
            
                <span class="inherited"><a href="Collection.html#createInstance">inherited</a></span>
            
            createInstance<span class="signature">(item)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{*}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 868
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>创建实例,可由子类重载</p>
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>item</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>要创建的实例对象</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        *
                        
                    
            </td>
            <td class="description last">创建的实例对象</td>
        </tr>
    
    </tbody>
</table>

    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="every">
            
                <span class="inherited"><a href="Collection.html#every">inherited</a></span>
            
            every<span class="signature">(fn)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Boolean}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 206
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>检测数组所有元素是否都符合指定条件(通过函数提供)</p>
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>fn</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>过滤条件</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Boolean
                        
                    
            </td>
            <td class="description last">是否全部满足过滤条件</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example</h5>
        
        <p class="code-caption"><h7 id='every'>检测数组所有元素是否都符合指定条件</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3])
const isNumber = collection.every(function(item) {
  return typeof item === 'number'
})</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="filter">
            
                <span class="inherited"><a href="Collection.html#filter">inherited</a></span>
            
            filter<span class="signature">(fn)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="Collection.html">Collection</a>}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 233
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>通过一个过滤条件(函数提供)来过滤并返回元素</p>
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>fn</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>过滤条件,如果过滤条件不是函数,则返回undefined</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        <a href="Collection.html">Collection</a>
                        
                    
            </td>
            <td class="description last">过滤后的新集合对象</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example</h5>
        
        <p class="code-caption"><h7 id='filter'>通过一个过滤条件(函数提供)来过滤并返回元素</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3, 4, 5])
const newCollection = collection.filter(function(item) {
  return item > 2
})</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="find">
            
                <span class="inherited"><a href="Collection.html#find">inherited</a></span>
            
            find<span class="signature">(fn)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{*}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 257
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>返回第一个符合过滤条件(函数提供)的元素,如果没找到则返回undefined</p>
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>fn</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>过滤条件,如果过滤条件不是函数,也返回undefined</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        *
                        
                    
            </td>
            <td class="description last">第一个符合过滤条件的元素</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example</h5>
        
        <p class="code-caption"><h7 id='find'>返回第一个符合过滤条件(函数提供)的元素,如果没找到则返回undefined</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3, 4, 5])
const item = collection.find(function(item) {
  return item > 2
})</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="findIndex">
            
                <span class="inherited"><a href="Collection.html#findIndex">inherited</a></span>
            
            findIndex<span class="signature">(fn)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Number}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 282
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>返回第一个符合过滤条件(函数提供)的元素的下标,如果没找到则返回-1</p>
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>fn</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>过滤条件</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Number
                        
                    
            </td>
            <td class="description last">第一个符合过滤条件(函数提供)的元素的下标</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example</h5>
        
        <p class="code-caption"><h7 id='findIndex'>返回第一个符合过滤条件(函数提供)的元素的下标,如果没找到则返回-1</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3, 4, 5])
const index = collection.findIndex(function(item) {
  return item > 1
})</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="flatten">
            
                <span class="inherited"><a href="Collection.html#flatten">inherited</a></span>
            
            flatten<span class="signature">(fn)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="Collection.html">Collection</a>}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 300
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>扁平化一个集合对象,通过传入的扁平化函数来指定要扁平化的对象数组,直到指定的对象数组为空或者元素数量为0,之后返回一个新集合对象</p>
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>fn</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>扁平化函数,通过该函数来指定要扁平化的对象数组,如果该函数不是一个函数对象,则返回undefined</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        <a href="Collection.html">Collection</a>
                        
                    
            </td>
            <td class="description last">扁平化后的集合对象</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example</h5>
        
        <p class="code-caption"><h7 id='flatten'>扁平化一个集合对象</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([{
  layers: [1, 2, 3]
},{
  items: [4, 5, 6]
}])
const flatten = collection.flatten(function(item) {
  return item.layers || item.items
})</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="forEach">
            
                <span class="inherited"><a href="Collection.html#forEach">inherited</a></span>
            
            forEach<span class="signature">(fn)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="Collection.html">Collection</a>}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 347
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>对集合中的所有元素执行传入的函数</p>
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>fn</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>针对元素的执行函数,参考js数组的forEach方法</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        <a href="Collection.html">Collection</a>
                        
                    
            </td>
            <td class="description last">执行完函数后的集合对象</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example</h5>
        
        <p class="code-caption"><h7 id='forEach'>对集合中的所有元素执行传入的函数</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3])
collection.forEach(function(item) {
  console.log("item:", item)
})</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="getItemAt">
            
                <span class="inherited"><a href="Collection.html#getItemAt">inherited</a></span>
            
            getItemAt<span class="signature">(index)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{*}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 359
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>获取指定下标的元素,没找到则返回undefined</p>
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>index</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>元素下标</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        *
                        
                    
            </td>
            <td class="description last">该下标下的元素</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example</h5>
        
        <p class="code-caption"><h7 id='getItemAt'>获取指定下标的元素</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3])
const item = collection.getItemAt(1)</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="includes">
            
                <span class="inherited"><a href="Collection.html#includes">inherited</a></span>
            
            includes<span class="signature">(item)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Boolean}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 371
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>判断集合中是否包含该元素</p>
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>item</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>要检查的元素对象</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Boolean
                        
                    
            </td>
            <td class="description last">集合中是否包含该元素</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example</h5>
        
        <p class="code-caption"><h7 id='includes'>判断集合中是否包含该元素</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3])
const isInclude = collection.includes(2)</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="indexOf">
            
                <span class="inherited"><a href="Collection.html#indexOf">inherited</a></span>
            
            indexOf<span class="signature">(item, fromIndex)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Number}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 393
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>返回元素在集合中的下标</p>
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>item</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>要在集合中寻找的元素</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>fromIndex</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>选择起始下标,默认为0,即从何处开始寻找</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Number
                        
                    
            </td>
            <td class="description last">元素在集合中的下标</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Examples</h5>
        
        <p class="code-caption"><h7 id='indexOf'>判断集合中是否包含该元素</h7></p>
    

    
    <pre class="prettyprint"><code>const item = {
  'a': 1
}
const collection = new Collection([item, 2, 3])
const index = collection.indexOf(item)</code></pre>
    

        <p class="code-caption"><h7 id='indexOf2'>判断集合中是否包含该元素-选择起始下标</h7></p>
    

    
    <pre class="prettyprint"><code>const item = {
  'a': 1
}
const collection = new Collection([item, 2, 3, item])
const index = collection.indexOf(item, 1)</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="join">
            
                <span class="inherited"><a href="Collection.html#join">inherited</a></span>
            
            join<span class="signature">(separator)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{String}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 417
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>通过传入一个分隔符,将集合中的元素通过分隔符拼接成一个字符串并返回</p>
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>separator</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>分割符号</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        String
                        
                    
            </td>
            <td class="description last">拼接完成的字符串</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example</h5>
        
        <p class="code-caption"><h7 id='join'>通过传入一个分隔符,将集合中的元素通过分隔符拼接成一个字符串并返回</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3])
const str = collection.join(',')</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="lastIndexOf">
            
                <span class="inherited"><a href="Collection.html#lastIndexOf">inherited</a></span>
            
            lastIndexOf<span class="signature">(item, fromIndex)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Number}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 438
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>从集合的最末尾开始,寻找该元素,并返回元素下标</p>
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>item</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>要寻找的元素</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>fromIndex</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>从何处开始查找,默认为集合的长度-1</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Number
                        
                    
            </td>
            <td class="description last">第一个找到的元素下标,未找到则返回-1</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Examples</h5>
        
        <p class="code-caption"><h7 id='lastIndexOf'>从集合的最末尾开始,寻找该元素,并返回元素下标</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3])
const index = collection.lastIndexOf(3)</code></pre>
    

        <p class="code-caption"><h7 id='lastIndexOf2'>从集合的最末尾开始,寻找该元素,并返回元素下标 - 指定起始额位置</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3, 3, 3])
const index = collection.lastIndexOf(3, 3)</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="map">
            
                <span class="inherited"><a href="Collection.html#map">inherited</a></span>
            
            map<span class="signature">(fn)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="Collection.html">Collection</a>}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 460
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>通过一个遍历函数来遍历该集合下的所有元素,并返回一个新集合对象</p>
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>fn</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>遍历函数</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        <a href="Collection.html">Collection</a>
                        
                    
            </td>
            <td class="description last">遍历后的新集合对象</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example</h5>
        
        <p class="code-caption"><h7 id='map'>通过一个遍历函数来遍历该集合下的所有元素,并返回一个新集合对象</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3])
const newCollection = collection.map(function (item) {
  return item + 1
})</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="pop">
            
                <span class="inherited"><a href="Collection.html#pop">inherited</a></span>
            
            pop<span class="signature">()</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{*}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 481
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>删除并返回集合的最后一个元素</p>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        *
                        
                    
            </td>
            <td class="description last">集合的最后一个元素</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example</h5>
        
        <p class="code-caption"><h7 id='pop'>删除并返回集合的最后一个元素</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3])
const item = collection.pop()</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="push">
            
                <span class="inherited"><a href="Collection.html#push">inherited</a></span>
            
            push<span class="signature">(item)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="Collection.html">Collection</a>}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 493
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>添加一个元素到集合中</p>
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>item</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>要添加的元素</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        <a href="Collection.html">Collection</a>
                        
                    
            </td>
            <td class="description last">添加完元素后的集合对象</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example</h5>
        
        <p class="code-caption"><h7 id='push'>添加一个元素到集合中</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3])
collection.push(4)</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="reduce">
            
                <span class="inherited"><a href="Collection.html#reduce">inherited</a></span>
            
            reduce<span class="signature">(fn, baseValue)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{*}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 508
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>接收一个函数做为累加器,将集合中的每一个元素(下标从小到大的顺序)进行累加,最后返回一个对象</p>
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>fn</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>累加器函数</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>baseValue</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>累加的基础对象</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        *
                        
                    
            </td>
            <td class="description last">累加后的对象</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example</h5>
        
        <p class="code-caption"><h7 id='reduce'>接收一个函数做为累加器,将集合中的每一个元素(下标从小到大的顺序)进行累加,最后返回一个对象</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3])
const sum = collection.reduce(function (reduceCarry, item) {
  return reduceCarry += item
}, 0)</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="reduceRight">
            
                <span class="inherited"><a href="Collection.html#reduceRight">inherited</a></span>
            
            reduceRight<span class="signature">(fn, baseValue)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{*}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 539
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>接收一个函数做为累加器,将集合中的每一个元素(下标从大到小的顺序)进行累加,最后返回一个对象</p>
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>fn</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>累加器函数</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>baseValue</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>累加的基础对象</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        *
                        
                    
            </td>
            <td class="description last">累加后的对象</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example</h5>
        
        <p class="code-caption"><h7 id='reduceRight'>接收一个函数做为累加器,将集合中的每一个元素(下标从大到小的顺序)进行累加,最后返回一个对象</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3])
const sum = collection.reduce(function (reduceCarry, item) {
  console.log(item)
})</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="remove">
            
            remove<span class="signature">(item)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{*}</span>
        </h4>
    
        
        <div class="tag-source">
            document/layer/support/RendererCollection.js, line 81
        </div>
        
    </div>

    
</dt>
<dd>
    
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>item</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">item</span>


            
            </td>
            
            
            
            <td class="description last">
                
                </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        *
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="removeAll">
            
            removeAll<span class="signature">()</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{*}</span>
        </h4>
    
        
        <div class="tag-source">
            document/layer/support/RendererCollection.js, line 101
        </div>
        
    </div>

    
</dt>
<dd>
    
    

    
    
    
    
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        *
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="removeAt">
            
            removeAt<span class="signature">()</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{*}</span>
        </h4>
    
        
        <div class="tag-source">
            document/layer/support/RendererCollection.js, line 116
        </div>
        
    </div>

    
</dt>
<dd>
    
    

    
    
    
    
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        *
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="removeMany">
            
            removeMany<span class="signature">()</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{*}</span>
        </h4>
    
        
        <div class="tag-source">
            document/layer/support/RendererCollection.js, line 90
        </div>
        
    </div>

    
</dt>
<dd>
    
    

    
    
    
    
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        *
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="reorder">
            
                <span class="inherited"><a href="Collection.html#reorder">inherited</a></span>
            
            reorder<span class="signature">(item, index)</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 641
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>将指的元素调整到集合中指的下标位置</p>
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>item</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>要排序的元素</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>index</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>元素要调整到的位置</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    
    
        <h5>Example</h5>
        
        <p class="code-caption"><h7 id='reorder'>将指的元素调整到集合中指的下标位置</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3])
collection.reorder(1, 2)</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="reverse">
            
                <span class="inherited"><a href="Collection.html#reverse">inherited</a></span>
            
            reverse<span class="signature">()</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="Collection.html">Collection</a>}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 659
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>将集合对象中的元素反转,并返回新集合对象</p>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        <a href="Collection.html">Collection</a>
                        
                    
            </td>
            <td class="description last">新的集合对象</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example</h5>
        
        <p class="code-caption"><h7 id='reverse'>将集合对象中的元素反转,并返回新集合对象</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3])
const newCollection =  collection.reverse()</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="shift">
            
                <span class="inherited"><a href="Collection.html#shift">inherited</a></span>
            
            shift<span class="signature">()</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{*}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 671
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>删除并返回集合的第一个元素(元素下标为0)</p>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        *
                        
                    
            </td>
            <td class="description last">集合的第一个元素</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example</h5>
        
        <p class="code-caption"><h7 id='reverse'>删除并返回集合的第一个元素</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3])
const item =  collection.shift()</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="slice">
            
                <span class="inherited"><a href="Collection.html#slice">inherited</a></span>
            
            slice<span class="signature">(start, end)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="Collection.html">Collection</a>}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 684
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>截取集合中从start开始到end下标的元素,并返回一个新集合对象</p>
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>start</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>从0开始的元素小标</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>end</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>截至的元素下标,不填则默认到集合最后一个元素</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        <a href="Collection.html">Collection</a>
                        
                    
            </td>
            <td class="description last">新集合对象</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example</h5>
        
        <p class="code-caption"><h7 id='slice'>截取集合中从start开始到end下标的元素,并返回一个新集合对象</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3, 4, 5])
const newCollection = collection.slice(1, 3)</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="some">
            
                <span class="inherited"><a href="Collection.html#some">inherited</a></span>
            
            some<span class="signature">(fn)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Boolean}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 704
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>判断集合对象中的元素是否满足过滤条件,只要有一个元素满足过滤条件,则会返回true,如果都不满足过滤条件,则返回false</p>
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>fn</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>过滤条件,如果过滤条件不是函数,也返回false</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Boolean
                        
                    
            </td>
            <td class="description last">是否满足过滤条件</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example</h5>
        
        <p class="code-caption"><h7 id='some'>判断集合对象中的元素是否满足过滤条件</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3, 4, 5])
const flag = collection.some(function (item) {
  return item === 1
})</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="sort">
            
                <span class="inherited"><a href="Collection.html#sort">inherited</a></span>
            
            sort<span class="signature">(fn)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="Collection.html">Collection</a>}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 734
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>通过一个排序函数来对当前的集合进行排序,之后返回一个新集合对象,参考js的sort函数</p>
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>fn</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>排序函数,不填则默认按从小到达排序</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        <a href="Collection.html">Collection</a>
                        
                    
            </td>
            <td class="description last">新的集合对象</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example</h5>
        
        <p class="code-caption"><h7 id='sort'>通过一个排序函数来对当前的集合进行排序,之后返回一个新集合对象</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([{
  'a': 2
},{
  'a': 1
},{
  'a': 3
}])
const newCollection = collection.sort(function (itemA, itemB) {
  return itemA.a - itemB.a
})</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="splice">
            
                <span class="inherited"><a href="Collection.html#splice">inherited</a></span>
            
            splice<span class="signature">(start, deleteCount, items)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="Collection.html">Collection</a>}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 763
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>向集合中删除或添加一个元素,参考js的splice方法</p>
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>start</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>删除或添加的起始下标</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>deleteCount</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>删除或添加的数量</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>items</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                        <span class="repeatable">repeatable</span>
                    
                
                <p>要删除或添加的元素</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        <a href="Collection.html">Collection</a>
                        
                    
            </td>
            <td class="description last">新的集合对象</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Examples</h5>
        
        <p class="code-caption"><h7 id='splice'>向集合中删除一个元素</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3])
const newCollection = collection.splice(1, 1)</code></pre>
    

        <p class="code-caption"><h7 id='splice2'>向集合中添加一个元素</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3])
collection.splice(1, 0, 1)</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="toArray">
            
                <span class="inherited"><a href="Collection.html#toArray">inherited</a></span>
            
            toArray<span class="signature">()</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Array}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 775
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>返回集合对象中元素组成的数组</p>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Array
                        
                    
            </td>
            <td class="description last">集合对象中元素组成的数组</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example</h5>
        
        <p class="code-caption"><h7 id='toArray'>返回集合对象中元素组成的数组</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3])
collection.toArray()</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="unique">
            
                <span class="inherited"><a href="Collection.html#unique">inherited</a></span>
            
            unique<span class="signature">(key)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="Collection.html">Collection</a>}</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 829
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>去除集合中的重复元素</p>
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>key</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>
|

<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>指定一个去重函数或者要素的去重字段</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        <a href="Collection.html">Collection</a>
                        
                    
            </td>
            <td class="description last">去重后的集合对象</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Examples</h5>
        
        <p class="code-caption">No Arguments</p>
    

    
    <pre class="prettyprint"><code>const unique = new Collection([2, 1, 2, 3, 3, 4, 5, 1, 2]).unique();
console.log(unique); // [2, 1, 3, 4, 5]</code></pre>
    

        <p class="code-caption">Property Name</p>
    

    
    <pre class="prettyprint"><code>const students = new Collection([
   { name: 'Rick', grade: 'A'},
   { name: 'Mick', grade: 'B'},
   { name: 'Richard', grade: 'A'},
]);
// Students with unique grades.
students.unique('grade'); // [{ name: 'Rick', grade: 'A'}, { name: 'Mick', grade: 'B'}]</code></pre>
    

        <p class="code-caption">With Callback</p>
    

    
    <pre class="prettyprint"><code>const students = new Collection([
   { name: 'Rick', grade: 'A'},
   { name: 'Mick', grade: 'B'},
   { name: 'Richard', grade: 'A'},
]);
// Students with unique grades.
students.unique(s => s.grade); // [{ name: 'Rick', grade: 'A'}, { name: 'Mick', grade: 'B'}]</code></pre>
    

    
</dd>

        
            
<dt>
    <div class="nameContainer inherited">
        <h4 class="name" id="unshift">
            
                <span class="inherited"><a href="Collection.html#unshift">inherited</a></span>
            
            unshift<span class="signature">(items)</span>
        </h4>
    
        
        <div class="tag-source">
            base/Collection.js, line 790
        </div>
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>向集合起始位置添加一个或多个元素</p>
    </div>
    

    
    
    
    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>items</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                        <span class="repeatable">repeatable</span>
                    
                
                <p>要添加的一个或多个元素</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    
    
        <h5>Example</h5>
        
        <p class="code-caption"><h7 id='toArray'>返回集合对象中元素组成的数组</h7></p>
    

    
    <pre class="prettyprint"><code>const collection = new Collection([1, 2, 3])
collection.unshift(1, 2)</code></pre>
    

    
</dd>

        </dl>
    
    
    

</article>

</section>  





        <footer>
            Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> on Fri Feb 06 2026 10:41:58 GMT+0800 (中国标准时间)
        </footer>
    </div>
</div>

<script>prettyPrint();</script>
<script src="scripts/linenumber.js"></script>
<script src="scripts/main.js"></script>
</body>
</html>