blob: 44912021fc42ff65c7a82c0d5bb573749cb3cc9c [file] [log] [blame]
<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Interface ICollection&lt;T&gt;
| Apache Lucene.NET 4.8.0 Documentation </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Interface ICollection&lt;T&gt;
| Apache Lucene.NET 4.8.0 Documentation ">
<meta name="generator" content="docfx 2.47.0.0">
<link rel="shortcut icon" href="../../logo/favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">
<link rel="stylesheet" href="../../styles/docfx.css">
<link rel="stylesheet" href="../../styles/main.css">
<meta property="docfx:navrel" content="../../toc.html">
<meta property="docfx:tocrel" content="../toc.html">
<meta property="docfx:rel" content="../../">
</head>
<body data-spy="scroll" data-target="#affix" data-offset="120">
<div id="wrapper">
<header>
<nav id="autocollapse" class="navbar ng-scope" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../../index.html">
<img id="logo" class="svg" src="../../logo/lucene-net-color.png" alt="">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<form class="navbar-form navbar-right" role="search" id="search">
<div class="form-group">
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
</div>
</form>
</div>
</div>
</nav>
<div class="subnav navbar navbar-default">
<div class="container hide-when-search" id="breadcrumb">
<ul class="breadcrumb">
<li></li>
</ul>
</div>
</div>
</header>
<div class="container body-content">
<div id="search-results">
<div class="search-list"></div>
<div class="sr-items">
<p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
</div>
<ul id="pagination"></ul>
</div>
</div>
<div role="main" class="container body-content hide-when-search">
<div class="sidenav hide-when-search">
<a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
<div class="sidetoggle collapse" id="sidetoggle">
<div id="sidetoc"></div>
</div>
</div>
<div class="article row grid-right">
<div class="col-md-10">
<article class="content wrap" id="_content" data-uid="Lucene.Net.Support.C5.ICollection`1">
<h1 id="Lucene_Net_Support_C5_ICollection_1" data-uid="Lucene.Net.Support.C5.ICollection`1" class="text-break">Interface ICollection&lt;T&gt;
</h1>
<div class="markdown level0 summary"><p>The simplest interface of a main stream generic collection
with lookup, insertion and removal operations. </p>
</div>
<div class="markdown level0 conceptual"></div>
<div class="inheritedMembers">
<h5>Inherited Members</h5>
<div>
<a class="xref" href="Lucene.Net.Support.C5.IExtensible-1.html#Lucene_Net_Support_C5_IExtensible_1_AllowsDuplicates">IExtensible&lt;T&gt;.AllowsDuplicates</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Support.C5.IExtensible-1.html#Lucene_Net_Support_C5_IExtensible_1_EqualityComparer">IExtensible&lt;T&gt;.EqualityComparer</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Support.C5.IExtensible-1.html#Lucene_Net_Support_C5_IExtensible_1_DuplicatesByCounting">IExtensible&lt;T&gt;.DuplicatesByCounting</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Support.C5.IExtensible-1.html#Lucene_Net_Support_C5_IExtensible_1_AddAll_System_Collections_Generic_IEnumerable__0__">IExtensible&lt;T&gt;.AddAll(IEnumerable&lt;T&gt;)</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Support.C5.IExtensible-1.html#Lucene_Net_Support_C5_IExtensible_1_Check">IExtensible&lt;T&gt;.Check()</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Support.C5.ICollectionValue-1.html#Lucene_Net_Support_C5_ICollectionValue_1_ListenableEvents">ICollectionValue&lt;T&gt;.ListenableEvents</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Support.C5.ICollectionValue-1.html#Lucene_Net_Support_C5_ICollectionValue_1_ActiveEvents">ICollectionValue&lt;T&gt;.ActiveEvents</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Support.C5.ICollectionValue-1.html#Lucene_Net_Support_C5_ICollectionValue_1_CollectionChanged">ICollectionValue&lt;T&gt;.CollectionChanged</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Support.C5.ICollectionValue-1.html#Lucene_Net_Support_C5_ICollectionValue_1_CollectionCleared">ICollectionValue&lt;T&gt;.CollectionCleared</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Support.C5.ICollectionValue-1.html#Lucene_Net_Support_C5_ICollectionValue_1_ItemsAdded">ICollectionValue&lt;T&gt;.ItemsAdded</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Support.C5.ICollectionValue-1.html#Lucene_Net_Support_C5_ICollectionValue_1_ItemInserted">ICollectionValue&lt;T&gt;.ItemInserted</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Support.C5.ICollectionValue-1.html#Lucene_Net_Support_C5_ICollectionValue_1_ItemsRemoved">ICollectionValue&lt;T&gt;.ItemsRemoved</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Support.C5.ICollectionValue-1.html#Lucene_Net_Support_C5_ICollectionValue_1_ItemRemovedAt">ICollectionValue&lt;T&gt;.ItemRemovedAt</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Support.C5.ICollectionValue-1.html#Lucene_Net_Support_C5_ICollectionValue_1_IsEmpty">ICollectionValue&lt;T&gt;.IsEmpty</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Support.C5.ICollectionValue-1.html#Lucene_Net_Support_C5_ICollectionValue_1_CountSpeed">ICollectionValue&lt;T&gt;.CountSpeed</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Support.C5.ICollectionValue-1.html#Lucene_Net_Support_C5_ICollectionValue_1_ToArray">ICollectionValue&lt;T&gt;.ToArray()</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Support.C5.ICollectionValue-1.html#Lucene_Net_Support_C5_ICollectionValue_1_Apply_System_Action__0__">ICollectionValue&lt;T&gt;.Apply(Action&lt;T&gt;)</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Support.C5.ICollectionValue-1.html#Lucene_Net_Support_C5_ICollectionValue_1_Exists_System_Func__0_System_Boolean__">ICollectionValue&lt;T&gt;.Exists(Func&lt;T, Boolean&gt;)</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Support.C5.ICollectionValue-1.html#Lucene_Net_Support_C5_ICollectionValue_1_Find_System_Func__0_System_Boolean___0__">ICollectionValue&lt;T&gt;.Find(Func&lt;T, Boolean&gt;, T)</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Support.C5.ICollectionValue-1.html#Lucene_Net_Support_C5_ICollectionValue_1_All_System_Func__0_System_Boolean__">ICollectionValue&lt;T&gt;.All(Func&lt;T, Boolean&gt;)</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Support.C5.ICollectionValue-1.html#Lucene_Net_Support_C5_ICollectionValue_1_Choose">ICollectionValue&lt;T&gt;.Choose()</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Support.C5.ICollectionValue-1.html#Lucene_Net_Support_C5_ICollectionValue_1_Filter_System_Func__0_System_Boolean__">ICollectionValue&lt;T&gt;.Filter(Func&lt;T, Boolean&gt;)</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Support.C5.IShowable.html#Lucene_Net_Support_C5_IShowable_Show_System_Text_StringBuilder_System_Int32__System_IFormatProvider_">IShowable.Show(StringBuilder, Int32, IFormatProvider)</a>
</div>
<div>
<span class="xref">System.IFormattable.ToString(System.String, System.IFormatProvider)</span>
</div>
<div>
<span class="xref">System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()</span>
</div>
</div>
<h6><strong>Namespace</strong>: <a class="xref" href="Lucene.Net.Support.C5.html">Lucene.Net.Support.C5</a></h6>
<h6><strong>Assembly</strong>: Lucene.Net.dll</h6>
<h5 id="Lucene_Net_Support_C5_ICollection_1_syntax">Syntax</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public interface ICollection&lt;T&gt; : IExtensible&lt;T&gt;, ICollectionValue&lt;T&gt;, IShowable, IFormattable, ICollection&lt;T&gt;, IEnumerable&lt;T&gt;, IEnumerable</code></pre>
</div>
<h5 class="typeParameters">Type Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="parametername">T</span></td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="properties">Properties
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_C5_ICollection_1_ContainsSpeed.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.C5.ICollection%601.ContainsSpeed%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/C5.Support.cs/#L5598">View Source</a>
</span>
<a id="Lucene_Net_Support_C5_ICollection_1_ContainsSpeed_" data-uid="Lucene.Net.Support.C5.ICollection`1.ContainsSpeed*"></a>
<h4 id="Lucene_Net_Support_C5_ICollection_1_ContainsSpeed" data-uid="Lucene.Net.Support.C5.ICollection`1.ContainsSpeed">ContainsSpeed</h4>
<div class="markdown level1 summary"><p>The value is symbolic indicating the type of asymptotic complexity
in terms of the size of this collection (worst-case or amortized as
relevant).
<p>See <span class="xref">C5.Speed</span> for the set of symbols.</p></p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">Speed ContainsSpeed { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Support.C5.Speed.html">Speed</a></td>
<td><p>A characterization of the speed of lookup operations
(<pre><code>Contains()</code></pre> etc.) of the implementation of this collection.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_C5_ICollection_1_Count.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.C5.ICollection%601.Count%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/C5.Support.cs/#L5603">View Source</a>
</span>
<a id="Lucene_Net_Support_C5_ICollection_1_Count_" data-uid="Lucene.Net.Support.C5.ICollection`1.Count*"></a>
<h4 id="Lucene_Net_Support_C5_ICollection_1_Count" data-uid="Lucene.Net.Support.C5.ICollection`1.Count">Count</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">int Count { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Int32</span></td>
<td><p>The number of items in this collection</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_C5_ICollection_1_IsReadOnly.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.C5.ICollection%601.IsReadOnly%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/C5.Support.cs/#L5610">View Source</a>
</span>
<a id="Lucene_Net_Support_C5_ICollection_1_IsReadOnly_" data-uid="Lucene.Net.Support.C5.ICollection`1.IsReadOnly*"></a>
<h4 id="Lucene_Net_Support_C5_ICollection_1_IsReadOnly" data-uid="Lucene.Net.Support.C5.ICollection`1.IsReadOnly">IsReadOnly</h4>
<div class="markdown level1 summary"><p>If true any call of an updating operation will throw an</p>
<pre><code>ReadOnlyCollectionException</code></pre>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">bool IsReadOnly { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><p>True if this collection is read-only.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="methods">Methods
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_C5_ICollection_1_Add__0_.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.C5.ICollection%601.Add(%600)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/C5.Support.cs/#L5619">View Source</a>
</span>
<a id="Lucene_Net_Support_C5_ICollection_1_Add_" data-uid="Lucene.Net.Support.C5.ICollection`1.Add*"></a>
<h4 id="Lucene_Net_Support_C5_ICollection_1_Add__0_" data-uid="Lucene.Net.Support.C5.ICollection`1.Add(`0)">Add(T)</h4>
<div class="markdown level1 summary"><p>Add an item to this collection if possible. If this collection has set
semantics, the item will be added if not already in the collection. If
bag semantics, the item will always be added.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">bool Add(T item)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">item</span></td>
<td><p>The item to add.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><p>True if item was added.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_C5_ICollection_1_Clear.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.C5.ICollection%601.Clear%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/C5.Support.cs/#L5798">View Source</a>
</span>
<a id="Lucene_Net_Support_C5_ICollection_1_Clear_" data-uid="Lucene.Net.Support.C5.ICollection`1.Clear*"></a>
<h4 id="Lucene_Net_Support_C5_ICollection_1_Clear" data-uid="Lucene.Net.Support.C5.ICollection`1.Clear">Clear()</h4>
<div class="markdown level1 summary"><p>Remove all items from this collection.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void Clear()</code></pre>
</div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_C5_ICollection_1_Contains__0_.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.C5.ICollection%601.Contains(%600)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/C5.Support.cs/#L5657">View Source</a>
</span>
<a id="Lucene_Net_Support_C5_ICollection_1_Contains_" data-uid="Lucene.Net.Support.C5.ICollection`1.Contains*"></a>
<h4 id="Lucene_Net_Support_C5_ICollection_1_Contains__0_" data-uid="Lucene.Net.Support.C5.ICollection`1.Contains(`0)">Contains(T)</h4>
<div class="markdown level1 summary"><p>Check if this collection contains (an item equivalent to according to the
itemequalityComparer) a particular value.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">bool Contains(T item)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">item</span></td>
<td><p>The value to check for.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><p>True if the items is in this collection.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_C5_ICollection_1_ContainsAll_System_Collections_Generic_IEnumerable__0__.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.C5.ICollection%601.ContainsAll(System.Collections.Generic.IEnumerable%7B%600%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/C5.Support.cs/#L5689">View Source</a>
</span>
<a id="Lucene_Net_Support_C5_ICollection_1_ContainsAll_" data-uid="Lucene.Net.Support.C5.ICollection`1.ContainsAll*"></a>
<h4 id="Lucene_Net_Support_C5_ICollection_1_ContainsAll_System_Collections_Generic_IEnumerable__0__" data-uid="Lucene.Net.Support.C5.ICollection`1.ContainsAll(System.Collections.Generic.IEnumerable{`0})">ContainsAll(IEnumerable&lt;T&gt;)</h4>
<div class="markdown level1 summary"><p>Check whether this collection contains all the values in another collection.
If this collection has bag semantics (<pre><code>AllowsDuplicates==true</code></pre>)
the check is made with respect to multiplicities, else multiplicities
are not taken into account.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">bool ContainsAll(IEnumerable&lt;T&gt; items)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Collections.Generic.IEnumerable</span>&lt;T&gt;</td>
<td><span class="parametername">items</span></td>
<td><p>The </p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><p>True if all values in <pre><code>items</code></pre>is in this collection.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_C5_ICollection_1_ContainsCount__0_.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.C5.ICollection%601.ContainsCount(%600)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/C5.Support.cs/#L5666">View Source</a>
</span>
<a id="Lucene_Net_Support_C5_ICollection_1_ContainsCount_" data-uid="Lucene.Net.Support.C5.ICollection`1.ContainsCount*"></a>
<h4 id="Lucene_Net_Support_C5_ICollection_1_ContainsCount__0_" data-uid="Lucene.Net.Support.C5.ICollection`1.ContainsCount(`0)">ContainsCount(T)</h4>
<div class="markdown level1 summary"><p>Count the number of items of the collection equal to a particular value.
Returns 0 if and only if the value is not in the collection.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">int ContainsCount(T item)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">item</span></td>
<td><p>The value to count.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Int32</span></td>
<td><p>The number of copies found.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_C5_ICollection_1_CopyTo__0___System_Int32_.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.C5.ICollection%601.CopyTo(%600%5B%5D%2CSystem.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/C5.Support.cs/#L5626">View Source</a>
</span>
<a id="Lucene_Net_Support_C5_ICollection_1_CopyTo_" data-uid="Lucene.Net.Support.C5.ICollection`1.CopyTo*"></a>
<h4 id="Lucene_Net_Support_C5_ICollection_1_CopyTo__0___System_Int32_" data-uid="Lucene.Net.Support.C5.ICollection`1.CopyTo(`0[],System.Int32)">CopyTo(T[], Int32)</h4>
<div class="markdown level1 summary"><p>Copy the items of this collection to a contiguous part of an array.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void CopyTo(T[] array, int index)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>T[]</td>
<td><span class="parametername">array</span></td>
<td><p>The array to copy to</p>
</td>
</tr>
<tr>
<td><span class="xref">System.Int32</span></td>
<td><span class="parametername">index</span></td>
<td><p>The index at which to copy the first item</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_C5_ICollection_1_Find__0__.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.C5.ICollection%601.Find(%600%40)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/C5.Support.cs/#L5699">View Source</a>
</span>
<a id="Lucene_Net_Support_C5_ICollection_1_Find_" data-uid="Lucene.Net.Support.C5.ICollection`1.Find*"></a>
<h4 id="Lucene_Net_Support_C5_ICollection_1_Find__0__" data-uid="Lucene.Net.Support.C5.ICollection`1.Find(`0@)">Find(ref T)</h4>
<div class="markdown level1 summary"><p>Check if this collection contains an item equivalent according to the
itemequalityComparer to a particular value. If so, return in the ref argument (a
binary copy of) the actual value found.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">bool Find(ref T item)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">item</span></td>
<td><p>The value to look for.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><p>True if the items is in this collection.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_C5_ICollection_1_FindOrAdd__0__.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.C5.ICollection%601.FindOrAdd(%600%40)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/C5.Support.cs/#L5710">View Source</a>
</span>
<a id="Lucene_Net_Support_C5_ICollection_1_FindOrAdd_" data-uid="Lucene.Net.Support.C5.ICollection`1.FindOrAdd*"></a>
<h4 id="Lucene_Net_Support_C5_ICollection_1_FindOrAdd__0__" data-uid="Lucene.Net.Support.C5.ICollection`1.FindOrAdd(`0@)">FindOrAdd(ref T)</h4>
<div class="markdown level1 summary"><p>Check if this collection contains an item equivalent according to the
itemequalityComparer to a particular value. If so, return in the ref argument (a
binary copy of) the actual value found. Else, add the item to the collection.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">bool FindOrAdd(ref T item)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">item</span></td>
<td><p>The value to look for.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><p>True if the item was found (hence not added).</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_C5_ICollection_1_GetUnsequencedHashCode.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.C5.ICollection%601.GetUnsequencedHashCode%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/C5.Support.cs/#L5638">View Source</a>
</span>
<a id="Lucene_Net_Support_C5_ICollection_1_GetUnsequencedHashCode_" data-uid="Lucene.Net.Support.C5.ICollection`1.GetUnsequencedHashCode*"></a>
<h4 id="Lucene_Net_Support_C5_ICollection_1_GetUnsequencedHashCode" data-uid="Lucene.Net.Support.C5.ICollection`1.GetUnsequencedHashCode">GetUnsequencedHashCode()</h4>
<div class="markdown level1 summary"><p>The unordered collection hashcode is defined as the sum of </p>
<pre><code>h(hashcode(item))</code></pre> over the items
<p>of the collection, where the function <pre><code>h</code></pre> is a function from
int to int of the form <pre><code> t -> (a0*t+b0)^(a1*t+b1)^(a2*t+b2)</code></pre>, where
the ax and bx are the same for all collection classes.
<p>The current implementation uses fixed values for the ax and bx,
specified as constants in the code.</p></p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">int GetUnsequencedHashCode()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Int32</span></td>
<td><p>The unordered hashcode of this collection.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_C5_ICollection_1_ItemMultiplicities.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.C5.ICollection%601.ItemMultiplicities%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/C5.Support.cs/#L5679">View Source</a>
</span>
<a id="Lucene_Net_Support_C5_ICollection_1_ItemMultiplicities_" data-uid="Lucene.Net.Support.C5.ICollection`1.ItemMultiplicities*"></a>
<h4 id="Lucene_Net_Support_C5_ICollection_1_ItemMultiplicities" data-uid="Lucene.Net.Support.C5.ICollection`1.ItemMultiplicities">ItemMultiplicities()</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">ICollectionValue&lt;KeyValuePair&lt;T, int&gt;&gt; ItemMultiplicities()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Support.C5.ICollectionValue-1.html">ICollectionValue</a>&lt;<a class="xref" href="Lucene.Net.Support.C5.KeyValuePair-2.html">KeyValuePair</a>&lt;T, <span class="xref">System.Int32</span>&gt;&gt;</td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_C5_ICollection_1_Remove__0_.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.C5.ICollection%601.Remove(%600)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/C5.Support.cs/#L5763">View Source</a>
</span>
<a id="Lucene_Net_Support_C5_ICollection_1_Remove_" data-uid="Lucene.Net.Support.C5.ICollection`1.Remove*"></a>
<h4 id="Lucene_Net_Support_C5_ICollection_1_Remove__0_" data-uid="Lucene.Net.Support.C5.ICollection`1.Remove(`0)">Remove(T)</h4>
<div class="markdown level1 summary"><p>Remove a particular item from this collection. If the collection has bag
semantics only one copy equivalent to the supplied item is removed. </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">bool Remove(T item)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">item</span></td>
<td><p>The value to remove.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><p>True if the item was found (and removed).</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_C5_ICollection_1_Remove__0__0__.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.C5.ICollection%601.Remove(%600%2C%600%40)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/C5.Support.cs/#L5776">View Source</a>
</span>
<a id="Lucene_Net_Support_C5_ICollection_1_Remove_" data-uid="Lucene.Net.Support.C5.ICollection`1.Remove*"></a>
<h4 id="Lucene_Net_Support_C5_ICollection_1_Remove__0__0__" data-uid="Lucene.Net.Support.C5.ICollection`1.Remove(`0,`0@)">Remove(T, out T)</h4>
<div class="markdown level1 summary"><p>Remove a particular item from this collection if found. If the collection
has bag semantics only one copy equivalent to the supplied item is removed,
which one is implementation dependent.
If an item was removed, report a binary copy of the actual item removed in
the argument.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">bool Remove(T item, out T removeditem)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">item</span></td>
<td><p>The value to remove.</p>
</td>
</tr>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">removeditem</span></td>
<td><p>The value removed if any.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><p>True if the item was found (and removed).</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_C5_ICollection_1_RemoveAll_System_Collections_Generic_IEnumerable__0__.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.C5.ICollection%601.RemoveAll(System.Collections.Generic.IEnumerable%7B%600%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/C5.Support.cs/#L5791">View Source</a>
</span>
<a id="Lucene_Net_Support_C5_ICollection_1_RemoveAll_" data-uid="Lucene.Net.Support.C5.ICollection`1.RemoveAll*"></a>
<h4 id="Lucene_Net_Support_C5_ICollection_1_RemoveAll_System_Collections_Generic_IEnumerable__0__" data-uid="Lucene.Net.Support.C5.ICollection`1.RemoveAll(System.Collections.Generic.IEnumerable{`0})">RemoveAll(IEnumerable&lt;T&gt;)</h4>
<div class="markdown level1 summary"><p>Remove all items in another collection from this one. If this collection
has bag semantics, take multiplicities into account.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void RemoveAll(IEnumerable&lt;T&gt; items)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Collections.Generic.IEnumerable</span>&lt;T&gt;</td>
<td><span class="parametername">items</span></td>
<td><p>The items to remove.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_C5_ICollection_1_RemoveAllCopies__0_.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.C5.ICollection%601.RemoveAllCopies(%600)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/C5.Support.cs/#L5783">View Source</a>
</span>
<a id="Lucene_Net_Support_C5_ICollection_1_RemoveAllCopies_" data-uid="Lucene.Net.Support.C5.ICollection`1.RemoveAllCopies*"></a>
<h4 id="Lucene_Net_Support_C5_ICollection_1_RemoveAllCopies__0_" data-uid="Lucene.Net.Support.C5.ICollection`1.RemoveAllCopies(`0)">RemoveAllCopies(T)</h4>
<div class="markdown level1 summary"><p>Remove all items equivalent to a given value.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void RemoveAllCopies(T item)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">item</span></td>
<td><p>The value to remove.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_C5_ICollection_1_RetainAll_System_Collections_Generic_IEnumerable__0__.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.C5.ICollection%601.RetainAll(System.Collections.Generic.IEnumerable%7B%600%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/C5.Support.cs/#L5806">View Source</a>
</span>
<a id="Lucene_Net_Support_C5_ICollection_1_RetainAll_" data-uid="Lucene.Net.Support.C5.ICollection`1.RetainAll*"></a>
<h4 id="Lucene_Net_Support_C5_ICollection_1_RetainAll_System_Collections_Generic_IEnumerable__0__" data-uid="Lucene.Net.Support.C5.ICollection`1.RetainAll(System.Collections.Generic.IEnumerable{`0})">RetainAll(IEnumerable&lt;T&gt;)</h4>
<div class="markdown level1 summary"><p>Remove all items not in some other collection from this one. If this collection
has bag semantics, take multiplicities into account.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void RetainAll(IEnumerable&lt;T&gt; items)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Collections.Generic.IEnumerable</span>&lt;T&gt;</td>
<td><span class="parametername">items</span></td>
<td><p>The items to retain.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_C5_ICollection_1_UniqueItems.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.C5.ICollection%601.UniqueItems%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/C5.Support.cs/#L5673">View Source</a>
</span>
<a id="Lucene_Net_Support_C5_ICollection_1_UniqueItems_" data-uid="Lucene.Net.Support.C5.ICollection`1.UniqueItems*"></a>
<h4 id="Lucene_Net_Support_C5_ICollection_1_UniqueItems" data-uid="Lucene.Net.Support.C5.ICollection`1.UniqueItems">UniqueItems()</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">ICollectionValue&lt;T&gt; UniqueItems()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Support.C5.ICollectionValue-1.html">ICollectionValue</a>&lt;T&gt;</td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_C5_ICollection_1_UnsequencedEquals_Lucene_Net_Support_C5_ICollection__0__.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.C5.ICollection%601.UnsequencedEquals(Lucene.Net.Support.C5.ICollection%7B%600%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/C5.Support.cs/#L5648">View Source</a>
</span>
<a id="Lucene_Net_Support_C5_ICollection_1_UnsequencedEquals_" data-uid="Lucene.Net.Support.C5.ICollection`1.UnsequencedEquals*"></a>
<h4 id="Lucene_Net_Support_C5_ICollection_1_UnsequencedEquals_Lucene_Net_Support_C5_ICollection__0__" data-uid="Lucene.Net.Support.C5.ICollection`1.UnsequencedEquals(Lucene.Net.Support.C5.ICollection{`0})">UnsequencedEquals(ICollection&lt;T&gt;)</h4>
<div class="markdown level1 summary"><p>Compare the contents of this collection to another one without regards to
the sequence order. The comparison will use this collection&apos;s itemequalityComparer
to compare individual items.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">bool UnsequencedEquals(ICollection&lt;T&gt; otherCollection)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Support.C5.ICollection-1.html">ICollection</a>&lt;T&gt;</td>
<td><span class="parametername">otherCollection</span></td>
<td><p>The collection to compare to.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><p>True if this collection and that contains the same items.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_C5_ICollection_1_Update__0_.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.C5.ICollection%601.Update(%600)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/C5.Support.cs/#L5722">View Source</a>
</span>
<a id="Lucene_Net_Support_C5_ICollection_1_Update_" data-uid="Lucene.Net.Support.C5.ICollection`1.Update*"></a>
<h4 id="Lucene_Net_Support_C5_ICollection_1_Update__0_" data-uid="Lucene.Net.Support.C5.ICollection`1.Update(`0)">Update(T)</h4>
<div class="markdown level1 summary"><p>Check if this collection contains an item equivalent according to the
itemequalityComparer to a particular value. If so, update the item in the collection
with a (binary copy of) the supplied value. If the collection has bag semantics,
it depends on the value of DuplicatesByCounting if this updates all equivalent copies in
the collection or just one.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">bool Update(T item)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">item</span></td>
<td><p>Value to update.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><p>True if the item was found and hence updated.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_C5_ICollection_1_Update__0__0__.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.C5.ICollection%601.Update(%600%2C%600%40)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/C5.Support.cs/#L5734">View Source</a>
</span>
<a id="Lucene_Net_Support_C5_ICollection_1_Update_" data-uid="Lucene.Net.Support.C5.ICollection`1.Update*"></a>
<h4 id="Lucene_Net_Support_C5_ICollection_1_Update__0__0__" data-uid="Lucene.Net.Support.C5.ICollection`1.Update(`0,`0@)">Update(T, out T)</h4>
<div class="markdown level1 summary"><p>Check if this collection contains an item equivalent according to the
itemequalityComparer to a particular value. If so, update the item in the collection
with a (binary copy of) the supplied value. If the collection has bag semantics,
it depends on the value of DuplicatesByCounting if this updates all equivalent copies in
the collection or just one.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">bool Update(T item, out T olditem)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">item</span></td>
<td><p>Value to update.</p>
</td>
</tr>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">olditem</span></td>
<td><p>On output the olditem, if found.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><p>True if the item was found and hence updated.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_C5_ICollection_1_UpdateOrAdd__0_.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.C5.ICollection%601.UpdateOrAdd(%600)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/C5.Support.cs/#L5744">View Source</a>
</span>
<a id="Lucene_Net_Support_C5_ICollection_1_UpdateOrAdd_" data-uid="Lucene.Net.Support.C5.ICollection`1.UpdateOrAdd*"></a>
<h4 id="Lucene_Net_Support_C5_ICollection_1_UpdateOrAdd__0_" data-uid="Lucene.Net.Support.C5.ICollection`1.UpdateOrAdd(`0)">UpdateOrAdd(T)</h4>
<div class="markdown level1 summary"><p>Check if this collection contains an item equivalent according to the
itemequalityComparer to a particular value. If so, update the item in the collection
to with a binary copy of the supplied value; else add the value to the collection. </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">bool UpdateOrAdd(T item)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">item</span></td>
<td><p>Value to add or update.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><p>True if the item was found and updated (hence not added).</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_C5_ICollection_1_UpdateOrAdd__0__0__.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.C5.ICollection%601.UpdateOrAdd(%600%2C%600%40)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/C5.Support.cs/#L5755">View Source</a>
</span>
<a id="Lucene_Net_Support_C5_ICollection_1_UpdateOrAdd_" data-uid="Lucene.Net.Support.C5.ICollection`1.UpdateOrAdd*"></a>
<h4 id="Lucene_Net_Support_C5_ICollection_1_UpdateOrAdd__0__0__" data-uid="Lucene.Net.Support.C5.ICollection`1.UpdateOrAdd(`0,`0@)">UpdateOrAdd(T, out T)</h4>
<div class="markdown level1 summary"><p>Check if this collection contains an item equivalent according to the
itemequalityComparer to a particular value. If so, update the item in the collection
to with a binary copy of the supplied value; else add the value to the collection. </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">bool UpdateOrAdd(T item, out T olditem)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">item</span></td>
<td><p>Value to add or update.</p>
</td>
</tr>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">olditem</span></td>
<td><p>On output the olditem, if found.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><p>True if the item was found and updated (hence not added).</p>
</td>
</tr>
</tbody>
</table>
<h3 id="extensionmethods">Extension Methods</h3>
<div>
<a class="xref" href="Lucene.Net.Support.EnumerableExtensions.html#Lucene_Net_Support_EnumerableExtensions_InPairs__2_System_Collections_Generic_IEnumerable___0__System_Func___0___0___1__">EnumerableExtensions.InPairs&lt;T, TOut&gt;(IEnumerable&lt;T&gt;, Func&lt;T, T, TOut&gt;)</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Support.EnumerableExtensions.html#Lucene_Net_Support_EnumerableExtensions_TakeAllButLast__1_System_Collections_Generic_IEnumerable___0__">EnumerableExtensions.TakeAllButLast&lt;T&gt;(IEnumerable&lt;T&gt;)</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Support.EnumerableExtensions.html#Lucene_Net_Support_EnumerableExtensions_TakeAllButLast__1_System_Collections_Generic_IEnumerable___0__System_Int32_">EnumerableExtensions.TakeAllButLast&lt;T&gt;(IEnumerable&lt;T&gt;, Int32)</a>
</div>
<div>
<a class="xref" href="Lucene.Net.Support.SetExtensions.html#Lucene_Net_Support_SetExtensions_RemoveAll__1_System_Collections_Generic_ICollection___0__System_Collections_Generic_IEnumerable___0__">SetExtensions.RemoveAll&lt;T&gt;(ICollection&lt;T&gt;, IEnumerable&lt;T&gt;)</a>
</div>
</article>
</div>
<div class="hidden-sm col-md-2" role="complementary">
<div class="sideaffix">
<div class="contribution">
<ul class="nav">
<li>
<a href="https://github.com/apache/lucenenet/new/docs-4.8.0-beta00007/websites/apidocs/apiSpec/new?filename=Lucene_Net_Support_C5_ICollection_1.md&amp;value=---%0Auid%3A%20Lucene.Net.Support.C5.ICollection%601%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
</li>
<li>
<a href="https://github.com/Shazwazza/lucenenet/blob/docs-update-jan2020/src/Lucene.Net/Support/C5.Support.cs/#L5587" class="contribution-link">View Source</a>
</li>
</ul>
</div>
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
<!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
</nav>
</div>
</div>
</div>
</div>
<footer>
<div class="grad-bottom"></div>
<div class="footer">
<div class="container">
<span class="pull-right">
<a href="#top">Back to top</a>
</span>
Copyright © 2020 Licensed to the Apache Software Foundation (ASF)
</div>
</div>
</footer>
</div>
<script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
<script type="text/javascript" src="../../styles/docfx.js"></script>
<script type="text/javascript" src="../../styles/main.js"></script>
</body>
</html>