blob: 82c48069ae95c3384cfb54d606c9d52dec6a3243 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (14.0.2) on Thu Aug 20 21:25:36 CDT 2020 -->
<title>AbstractBag (Eclipse Collections - 10.4.0)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2020-08-20">
<meta name="description" content="declaration: package: org.eclipse.collections.impl.bag, class: AbstractBag">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../script-dir/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../script-dir/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../script-dir/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../script-dir/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../script-dir/jquery-3.4.1.js"></script>
<script type="text/javascript" src="../../../../../script-dir/jquery-ui.js"></script>
</head>
<body class="class-declaration">
<script type="text/javascript">var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10,"i40":10,"i41":10,"i42":10,"i43":10,"i44":10,"i45":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flexBox">
<header role="banner" class="flexHeader">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/AbstractBag.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<div class="navListSearch"><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="skipNav"><a id="skip.navbar.top">
<!-- -->
</a></div>
</nav>
</header>
<div class="flexContent">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.eclipse.collections.impl.bag</a></div>
<h1 title="Class AbstractBag" class="title">Class AbstractBag&lt;T&gt;</h1>
</div>
<div class="contentContainer">
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">java.lang.Object</a>
<div class="inheritance"><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">org.eclipse.collections.impl.AbstractRichIterable</a>&lt;T&gt;
<div class="inheritance">org.eclipse.collections.impl.bag.AbstractBag&lt;T&gt;</div>
</div>
</div>
<section class="description">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a>&lt;T&gt;</code>, <code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;T&gt;</code>, <code><a href="../../api/bag/Bag.html" title="interface in org.eclipse.collections.api.bag">Bag</a>&lt;T&gt;</code>, <code><a href="../../api/InternalIterable.html" title="interface in org.eclipse.collections.api">InternalIterable</a>&lt;T&gt;</code>, <code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;T&gt;</code></dd>
</dl>
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="immutable/AbstractImmutableBagIterable.html" title="class in org.eclipse.collections.impl.bag.immutable">AbstractImmutableBagIterable</a></code>, <code><a href="mutable/AbstractMutableBagIterable.html" title="class in org.eclipse.collections.impl.bag.mutable">AbstractMutableBagIterable</a></code></dd>
</dl>
<hr>
<pre>public abstract class <span class="typeNameLabel">AbstractBag&lt;T&gt;</span>
extends <a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;T&gt;
implements <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;T&gt;, <a href="../../api/bag/Bag.html" title="interface in org.eclipse.collections.api.bag">Bag</a>&lt;T&gt;</pre>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>7.0</dd>
</dl>
</section>
<section class="summary">
<ul class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li class="blockList">
<section class="constructorSummary"><a id="constructor.summary">
<!-- -->
</a>
<h2>Constructor Summary</h2>
<div class="memberSummary">
<table>
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<thead>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">AbstractBag</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li class="blockList">
<section class="methodSummary"><a id="method.summary">
<!-- -->
</a>
<h2>Method Summary</h2>
<div class="memberSummary">
<div role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="memberSummary_tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="activeTableTab">All Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="tableTab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="tableTab" onclick="show(8);">Concrete Methods</button></div>
<div id="memberSummary_tabpanel" role="tabpanel">
<table aria-labelledby="t0">
<thead>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr class="altColor" id="i0">
<td class="colFirst"><code>&lt;V,&#8203;
R extends <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;V&gt;&gt;<br>R</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#collect(org.eclipse.collections.api.block.function.Function,R)">collect</a></span>&#8203;(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? extends V&gt;&nbsp;function,
R&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Same as <a href="../../api/RichIterable.html#collect(org.eclipse.collections.api.block.function.Function)"><code>RichIterable.collect(Function)</code></a>, except that the results are gathered into the specified <code>target</code>
collection.</div>
</td>
</tr>
<tr class="rowColor" id="i1">
<td class="colFirst"><code>&lt;R extends <a href="../../api/collection/primitive/MutableBooleanCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableBooleanCollection</a>&gt;<br>R</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#collectBoolean(org.eclipse.collections.api.block.function.primitive.BooleanFunction,R)">collectBoolean</a></span>&#8203;(<a href="../../api/block/function/primitive/BooleanFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">BooleanFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;booleanFunction,
R&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Same as <a href="../../api/RichIterable.html#collectBoolean(org.eclipse.collections.api.block.function.primitive.BooleanFunction)"><code>RichIterable.collectBoolean(BooleanFunction)</code></a>, except that the results are gathered into the specified <code>target</code>
collection.</div>
</td>
</tr>
<tr class="altColor" id="i2">
<td class="colFirst"><code>&lt;R extends <a href="../../api/collection/primitive/MutableByteCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableByteCollection</a>&gt;<br>R</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#collectByte(org.eclipse.collections.api.block.function.primitive.ByteFunction,R)">collectByte</a></span>&#8203;(<a href="../../api/block/function/primitive/ByteFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">ByteFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;byteFunction,
R&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Same as <a href="../../api/RichIterable.html#collectByte(org.eclipse.collections.api.block.function.primitive.ByteFunction)"><code>RichIterable.collectByte(ByteFunction)</code></a>, except that the results are gathered into the specified <code>target</code>
collection.</div>
</td>
</tr>
<tr class="rowColor" id="i3">
<td class="colFirst"><code>&lt;R extends <a href="../../api/collection/primitive/MutableCharCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableCharCollection</a>&gt;<br>R</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#collectChar(org.eclipse.collections.api.block.function.primitive.CharFunction,R)">collectChar</a></span>&#8203;(<a href="../../api/block/function/primitive/CharFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">CharFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;charFunction,
R&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Same as <a href="../../api/RichIterable.html#collectChar(org.eclipse.collections.api.block.function.primitive.CharFunction)"><code>RichIterable.collectChar(CharFunction)</code></a>, except that the results are gathered into the specified <code>target</code>
collection.</div>
</td>
</tr>
<tr class="altColor" id="i4">
<td class="colFirst"><code>&lt;R extends <a href="../../api/collection/primitive/MutableDoubleCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableDoubleCollection</a>&gt;<br>R</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#collectDouble(org.eclipse.collections.api.block.function.primitive.DoubleFunction,R)">collectDouble</a></span>&#8203;(<a href="../../api/block/function/primitive/DoubleFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">DoubleFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;doubleFunction,
R&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Same as <a href="../../api/RichIterable.html#collectDouble(org.eclipse.collections.api.block.function.primitive.DoubleFunction)"><code>RichIterable.collectDouble(DoubleFunction)</code></a>, except that the results are gathered into the specified <code>target</code>
collection.</div>
</td>
</tr>
<tr class="rowColor" id="i5">
<td class="colFirst"><code>&lt;R extends <a href="../../api/collection/primitive/MutableFloatCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableFloatCollection</a>&gt;<br>R</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#collectFloat(org.eclipse.collections.api.block.function.primitive.FloatFunction,R)">collectFloat</a></span>&#8203;(<a href="../../api/block/function/primitive/FloatFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">FloatFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;floatFunction,
R&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Same as <a href="../../api/RichIterable.html#collectFloat(org.eclipse.collections.api.block.function.primitive.FloatFunction)"><code>RichIterable.collectFloat(FloatFunction)</code></a>, except that the results are gathered into the specified <code>target</code>
collection.</div>
</td>
</tr>
<tr class="altColor" id="i6">
<td class="colFirst"><code>&lt;V,&#8203;
R extends <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;V&gt;&gt;<br>R</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#collectIf(org.eclipse.collections.api.block.predicate.Predicate,org.eclipse.collections.api.block.function.Function,R)">collectIf</a></span>&#8203;(<a href="../../api/block/predicate/Predicate.html" title="interface in org.eclipse.collections.api.block.predicate">Predicate</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;predicate,
<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? extends V&gt;&nbsp;function,
R&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Same as the collectIf method with two parameters but uses the specified target collection for the results.</div>
</td>
</tr>
<tr class="rowColor" id="i7">
<td class="colFirst"><code>&lt;R extends <a href="../../api/collection/primitive/MutableIntCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableIntCollection</a>&gt;<br>R</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#collectInt(org.eclipse.collections.api.block.function.primitive.IntFunction,R)">collectInt</a></span>&#8203;(<a href="../../api/block/function/primitive/IntFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">IntFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;intFunction,
R&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Same as <a href="../../api/RichIterable.html#collectInt(org.eclipse.collections.api.block.function.primitive.IntFunction)"><code>RichIterable.collectInt(IntFunction)</code></a>, except that the results are gathered into the specified <code>target</code>
collection.</div>
</td>
</tr>
<tr class="altColor" id="i8">
<td class="colFirst"><code>&lt;R extends <a href="../../api/collection/primitive/MutableLongCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableLongCollection</a>&gt;<br>R</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#collectLong(org.eclipse.collections.api.block.function.primitive.LongFunction,R)">collectLong</a></span>&#8203;(<a href="../../api/block/function/primitive/LongFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">LongFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;longFunction,
R&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Same as <a href="../../api/RichIterable.html#collectLong(org.eclipse.collections.api.block.function.primitive.LongFunction)"><code>RichIterable.collectLong(LongFunction)</code></a>, except that the results are gathered into the specified <code>target</code>
collection.</div>
</td>
</tr>
<tr class="rowColor" id="i9">
<td class="colFirst"><code>&lt;R extends <a href="../../api/collection/primitive/MutableShortCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableShortCollection</a>&gt;<br>R</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#collectShort(org.eclipse.collections.api.block.function.primitive.ShortFunction,R)">collectShort</a></span>&#8203;(<a href="../../api/block/function/primitive/ShortFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">ShortFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;shortFunction,
R&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Same as <a href="../../api/RichIterable.html#collectShort(org.eclipse.collections.api.block.function.primitive.ShortFunction)"><code>RichIterable.collectShort(ShortFunction)</code></a>, except that the results are gathered into the specified <code>target</code>
collection.</div>
</td>
</tr>
<tr class="altColor" id="i10">
<td class="colFirst"><code>&lt;P,&#8203;
V,&#8203;
R extends <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;V&gt;&gt;<br>R</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#collectWith(org.eclipse.collections.api.block.function.Function2,P,R)">collectWith</a></span>&#8203;(<a href="../../api/block/function/Function2.html" title="interface in org.eclipse.collections.api.block.function">Function2</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? super P,&#8203;? extends V&gt;&nbsp;function,
P&nbsp;parameter,
R&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Same as collectWith but with a targetCollection parameter to gather the results.</div>
</td>
</tr>
<tr class="rowColor" id="i11">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#count(org.eclipse.collections.api.block.predicate.Predicate)">count</a></span>&#8203;(<a href="../../api/block/predicate/Predicate.html" title="interface in org.eclipse.collections.api.block.predicate">Predicate</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;predicate)</code></th>
<td class="colLast">
<div class="block">Return the total number of elements that answer true to the specified predicate.</div>
</td>
</tr>
<tr class="altColor" id="i12">
<td class="colFirst"><code>&lt;V,&#8203;
R extends <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;V&gt;&gt;<br>R</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#flatCollect(org.eclipse.collections.api.block.function.Function,R)">flatCollect</a></span>&#8203;(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a>&lt;V&gt;&gt;&nbsp;function,
R&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Same as flatCollect, only the results are collected into the target collection.</div>
</td>
</tr>
<tr class="rowColor" id="i13">
<td class="colFirst"><code>&lt;R extends <a href="../../api/collection/primitive/MutableBooleanCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableBooleanCollection</a>&gt;<br>R</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#flatCollectBoolean(org.eclipse.collections.api.block.function.Function,R)">flatCollectBoolean</a></span>&#8203;(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? extends <a href="../../api/BooleanIterable.html" title="interface in org.eclipse.collections.api">BooleanIterable</a>&gt;&nbsp;function,
R&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Same as flatCollect, only the results are collected into the target collection.</div>
</td>
</tr>
<tr class="altColor" id="i14">
<td class="colFirst"><code>&lt;R extends <a href="../../api/collection/primitive/MutableByteCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableByteCollection</a>&gt;<br>R</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#flatCollectByte(org.eclipse.collections.api.block.function.Function,R)">flatCollectByte</a></span>&#8203;(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? extends <a href="../../api/ByteIterable.html" title="interface in org.eclipse.collections.api">ByteIterable</a>&gt;&nbsp;function,
R&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Same as flatCollect, only the results are collected into the target collection.</div>
</td>
</tr>
<tr class="rowColor" id="i15">
<td class="colFirst"><code>&lt;R extends <a href="../../api/collection/primitive/MutableCharCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableCharCollection</a>&gt;<br>R</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#flatCollectChar(org.eclipse.collections.api.block.function.Function,R)">flatCollectChar</a></span>&#8203;(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? extends <a href="../../api/CharIterable.html" title="interface in org.eclipse.collections.api">CharIterable</a>&gt;&nbsp;function,
R&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Same as flatCollect, only the results are collected into the target collection.</div>
</td>
</tr>
<tr class="altColor" id="i16">
<td class="colFirst"><code>&lt;R extends <a href="../../api/collection/primitive/MutableDoubleCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableDoubleCollection</a>&gt;<br>R</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#flatCollectDouble(org.eclipse.collections.api.block.function.Function,R)">flatCollectDouble</a></span>&#8203;(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? extends <a href="../../api/DoubleIterable.html" title="interface in org.eclipse.collections.api">DoubleIterable</a>&gt;&nbsp;function,
R&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Same as flatCollect, only the results are collected into the target collection.</div>
</td>
</tr>
<tr class="rowColor" id="i17">
<td class="colFirst"><code>&lt;R extends <a href="../../api/collection/primitive/MutableFloatCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableFloatCollection</a>&gt;<br>R</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#flatCollectFloat(org.eclipse.collections.api.block.function.Function,R)">flatCollectFloat</a></span>&#8203;(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? extends <a href="../../api/FloatIterable.html" title="interface in org.eclipse.collections.api">FloatIterable</a>&gt;&nbsp;function,
R&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Same as flatCollect, only the results are collected into the target collection.</div>
</td>
</tr>
<tr class="altColor" id="i18">
<td class="colFirst"><code>&lt;R extends <a href="../../api/collection/primitive/MutableIntCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableIntCollection</a>&gt;<br>R</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#flatCollectInt(org.eclipse.collections.api.block.function.Function,R)">flatCollectInt</a></span>&#8203;(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? extends <a href="../../api/IntIterable.html" title="interface in org.eclipse.collections.api">IntIterable</a>&gt;&nbsp;function,
R&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Same as flatCollect, only the results are collected into the target collection.</div>
</td>
</tr>
<tr class="rowColor" id="i19">
<td class="colFirst"><code>&lt;R extends <a href="../../api/collection/primitive/MutableLongCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableLongCollection</a>&gt;<br>R</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#flatCollectLong(org.eclipse.collections.api.block.function.Function,R)">flatCollectLong</a></span>&#8203;(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? extends <a href="../../api/LongIterable.html" title="interface in org.eclipse.collections.api">LongIterable</a>&gt;&nbsp;function,
R&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Same as flatCollect, only the results are collected into the target collection.</div>
</td>
</tr>
<tr class="altColor" id="i20">
<td class="colFirst"><code>&lt;R extends <a href="../../api/collection/primitive/MutableShortCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableShortCollection</a>&gt;<br>R</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#flatCollectShort(org.eclipse.collections.api.block.function.Function,R)">flatCollectShort</a></span>&#8203;(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? extends <a href="../../api/ShortIterable.html" title="interface in org.eclipse.collections.api">ShortIterable</a>&gt;&nbsp;function,
R&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Same as flatCollect, only the results are collected into the target collection.</div>
</td>
</tr>
<tr class="rowColor" id="i21">
<td class="colFirst"><code>&lt;V,&#8203;
R extends <a href="../../api/multimap/MutableMultimap.html" title="interface in org.eclipse.collections.api.multimap">MutableMultimap</a>&lt;V,&#8203;
<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&gt;<br>R</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#groupBy(org.eclipse.collections.api.block.function.Function,R)">groupBy</a></span>&#8203;(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? extends V&gt;&nbsp;function,
R&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Same as <a href="../../api/RichIterable.html#groupBy(org.eclipse.collections.api.block.function.Function)"><code>RichIterable.groupBy(Function)</code></a>, except that the results are gathered into the specified <code>target</code>
multimap.</div>
</td>
</tr>
<tr class="altColor" id="i22">
<td class="colFirst"><code>&lt;V,&#8203;
R extends <a href="../../api/multimap/MutableMultimap.html" title="interface in org.eclipse.collections.api.multimap">MutableMultimap</a>&lt;V,&#8203;
<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&gt;<br>R</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#groupByEach(org.eclipse.collections.api.block.function.Function,R)">groupByEach</a></span>&#8203;(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a>&lt;V&gt;&gt;&nbsp;function,
R&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Same as <a href="../../api/RichIterable.html#groupByEach(org.eclipse.collections.api.block.function.Function)"><code>RichIterable.groupByEach(Function)</code></a>, except that the results are gathered into the specified <code>target</code>
multimap.</div>
</td>
</tr>
<tr class="rowColor" id="i23">
<td class="colFirst"><code>double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#injectInto(double,org.eclipse.collections.api.block.function.primitive.DoubleObjectToDoubleFunction)">injectInto</a></span>&#8203;(double&nbsp;injectedValue,
<a href="../../api/block/function/primitive/DoubleObjectToDoubleFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">DoubleObjectToDoubleFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;function)</code></th>
<td class="colLast">
<div class="block">Returns the final double result of evaluating function using each element of the iterable and the previous evaluation
result as the parameters.</div>
</td>
</tr>
<tr class="altColor" id="i24">
<td class="colFirst"><code>float</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#injectInto(float,org.eclipse.collections.api.block.function.primitive.FloatObjectToFloatFunction)">injectInto</a></span>&#8203;(float&nbsp;injectedValue,
<a href="../../api/block/function/primitive/FloatObjectToFloatFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">FloatObjectToFloatFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;function)</code></th>
<td class="colLast">
<div class="block">Returns the final float result of evaluating function using each element of the iterable and the previous evaluation
result as the parameters.</div>
</td>
</tr>
<tr class="rowColor" id="i25">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#injectInto(int,org.eclipse.collections.api.block.function.primitive.IntObjectToIntFunction)">injectInto</a></span>&#8203;(int&nbsp;injectedValue,
<a href="../../api/block/function/primitive/IntObjectToIntFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">IntObjectToIntFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;function)</code></th>
<td class="colLast">
<div class="block">Returns the final int result of evaluating function using each element of the iterable and the previous evaluation
result as the parameters.</div>
</td>
</tr>
<tr class="altColor" id="i26">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#injectInto(long,org.eclipse.collections.api.block.function.primitive.LongObjectToLongFunction)">injectInto</a></span>&#8203;(long&nbsp;injectedValue,
<a href="../../api/block/function/primitive/LongObjectToLongFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">LongObjectToLongFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;function)</code></th>
<td class="colLast">
<div class="block">Returns the final long result of evaluating function using each element of the iterable and the previous evaluation
result as the parameters.</div>
</td>
</tr>
<tr class="rowColor" id="i27">
<td class="colFirst"><code>&lt;IV&gt;&nbsp;IV</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#injectInto(IV,org.eclipse.collections.api.block.function.Function2)">injectInto</a></span>&#8203;(IV&nbsp;injectedValue,
<a href="../../api/block/function/Function2.html" title="interface in org.eclipse.collections.api.block.function">Function2</a>&lt;? super IV,&#8203;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? extends IV&gt;&nbsp;function)</code></th>
<td class="colLast">
<div class="block">Returns the final result of evaluating function using each element of the iterable and the previous evaluation
result as the parameters.</div>
</td>
</tr>
<tr class="altColor" id="i28">
<td class="colFirst"><code>&lt;IV,&#8203;
P&gt;&nbsp;IV</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#injectIntoWith(IV,org.eclipse.collections.api.block.function.Function3,P)">injectIntoWith</a></span>&#8203;(IV&nbsp;injectedValue,
<a href="../../api/block/function/Function3.html" title="interface in org.eclipse.collections.api.block.function">Function3</a>&lt;? super IV,&#8203;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? super P,&#8203;? extends IV&gt;&nbsp;function,
P&nbsp;parameter)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor" id="i29">
<td class="colFirst"><code>&lt;R extends <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&gt;<br>R</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#reject(org.eclipse.collections.api.block.predicate.Predicate,R)">reject</a></span>&#8203;(<a href="../../api/block/predicate/Predicate.html" title="interface in org.eclipse.collections.api.block.predicate">Predicate</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;predicate,
R&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Same as the reject method with one parameter but uses the specified target collection for the results.</div>
</td>
</tr>
<tr class="altColor" id="i30">
<td class="colFirst"><code>&lt;P,&#8203;
R extends <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&gt;<br>R</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rejectWith(org.eclipse.collections.api.block.predicate.Predicate2,P,R)">rejectWith</a></span>&#8203;(<a href="../../api/block/predicate/Predicate2.html" title="interface in org.eclipse.collections.api.block.predicate">Predicate2</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? super P&gt;&nbsp;predicate,
P&nbsp;parameter,
R&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Similar to <a href="../../api/RichIterable.html#reject(org.eclipse.collections.api.block.predicate.Predicate,R)"><code>RichIterable.reject(Predicate, Collection)</code></a>, except with an evaluation parameter for the second generic argument in <a href="../../api/block/predicate/Predicate2.html" title="interface in org.eclipse.collections.api.block.predicate"><code>Predicate2</code></a>.</div>
</td>
</tr>
<tr class="rowColor" id="i31">
<td class="colFirst"><code>&lt;R extends <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&gt;<br>R</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#select(org.eclipse.collections.api.block.predicate.Predicate,R)">select</a></span>&#8203;(<a href="../../api/block/predicate/Predicate.html" title="interface in org.eclipse.collections.api.block.predicate">Predicate</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;predicate,
R&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Same as the select method with one parameter but uses the specified target collection for the results.</div>
</td>
</tr>
<tr class="altColor" id="i32">
<td class="colFirst"><code>&lt;P,&#8203;
R extends <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&gt;<br>R</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#selectWith(org.eclipse.collections.api.block.predicate.Predicate2,P,R)">selectWith</a></span>&#8203;(<a href="../../api/block/predicate/Predicate2.html" title="interface in org.eclipse.collections.api.block.predicate">Predicate2</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? super P&gt;&nbsp;predicate,
P&nbsp;parameter,
R&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Similar to <a href="../../api/RichIterable.html#select(org.eclipse.collections.api.block.predicate.Predicate,R)"><code>RichIterable.select(Predicate, Collection)</code></a>, except with an evaluation parameter for the second generic argument in <a href="../../api/block/predicate/Predicate2.html" title="interface in org.eclipse.collections.api.block.predicate"><code>Predicate2</code></a>.</div>
</td>
</tr>
<tr class="rowColor" id="i33">
<td class="colFirst"><code>double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sumOfDouble(org.eclipse.collections.api.block.function.primitive.DoubleFunction)">sumOfDouble</a></span>&#8203;(<a href="../../api/block/function/primitive/DoubleFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">DoubleFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;function)</code></th>
<td class="colLast">
<div class="block">Returns the final double result of evaluating function for each element of the iterable and adding the results
together.</div>
</td>
</tr>
<tr class="altColor" id="i34">
<td class="colFirst"><code>double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sumOfFloat(org.eclipse.collections.api.block.function.primitive.FloatFunction)">sumOfFloat</a></span>&#8203;(<a href="../../api/block/function/primitive/FloatFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">FloatFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;function)</code></th>
<td class="colLast">
<div class="block">Returns the final double result of evaluating function for each element of the iterable and adding the results
together.</div>
</td>
</tr>
<tr class="rowColor" id="i35">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sumOfInt(org.eclipse.collections.api.block.function.primitive.IntFunction)">sumOfInt</a></span>&#8203;(<a href="../../api/block/function/primitive/IntFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">IntFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;function)</code></th>
<td class="colLast">
<div class="block">Returns the final long result of evaluating function for each element of the iterable and adding the results
together.</div>
</td>
</tr>
<tr class="altColor" id="i36">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sumOfLong(org.eclipse.collections.api.block.function.primitive.LongFunction)">sumOfLong</a></span>&#8203;(<a href="../../api/block/function/primitive/LongFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">LongFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;function)</code></th>
<td class="colLast">
<div class="block">Returns the final long result of evaluating function for each element of the iterable and adding the results
together.</div>
</td>
</tr>
<tr class="rowColor" id="i37">
<td class="colFirst"><code><a href="../../api/bag/MutableBag.html" title="interface in org.eclipse.collections.api.bag">MutableBag</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toBag()">toBag</a></span>()</code></th>
<td class="colLast">
<div class="block">Converts the collection to the default MutableBag implementation.</div>
</td>
</tr>
<tr class="altColor" id="i38">
<td class="colFirst"><code><a href="../../api/list/MutableList.html" title="interface in org.eclipse.collections.api.list">MutableList</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toList()">toList</a></span>()</code></th>
<td class="colLast">
<div class="block">Converts the collection to a MutableList implementation.</div>
</td>
</tr>
<tr class="rowColor" id="i39">
<td class="colFirst"><code><a href="../../api/set/MutableSet.html" title="interface in org.eclipse.collections.api.set">MutableSet</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toSet()">toSet</a></span>()</code></th>
<td class="colLast">
<div class="block">Converts the collection to a MutableSet implementation.</div>
</td>
</tr>
<tr class="altColor" id="i40">
<td class="colFirst"><code><a href="../../api/bag/sorted/MutableSortedBag.html" title="interface in org.eclipse.collections.api.bag.sorted">MutableSortedBag</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toSortedBag()">toSortedBag</a></span>()</code></th>
<td class="colLast">
<div class="block">Converts the collection to a MutableSortedBag implementation and sorts it using the natural order of the
elements.</div>
</td>
</tr>
<tr class="rowColor" id="i41">
<td class="colFirst"><code><a href="../../api/bag/sorted/MutableSortedBag.html" title="interface in org.eclipse.collections.api.bag.sorted">MutableSortedBag</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toSortedBag(java.util.Comparator)">toSortedBag</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util" class="externalLink">Comparator</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;comparator)</code></th>
<td class="colLast">
<div class="block">Converts the collection to the MutableSortedBag implementation and sorts it using the specified comparator.</div>
</td>
</tr>
<tr class="altColor" id="i42">
<td class="colFirst"><code><a href="../../api/list/MutableList.html" title="interface in org.eclipse.collections.api.list">MutableList</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toSortedList(java.util.Comparator)">toSortedList</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util" class="externalLink">Comparator</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;comparator)</code></th>
<td class="colLast">
<div class="block">Converts the collection to a MutableList implementation and sorts it using the specified comparator.</div>
</td>
</tr>
<tr class="rowColor" id="i43">
<td class="colFirst"><code><a href="../../api/set/sorted/MutableSortedSet.html" title="interface in org.eclipse.collections.api.set.sorted">MutableSortedSet</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toSortedSet()">toSortedSet</a></span>()</code></th>
<td class="colLast">
<div class="block">Converts the collection to a MutableSortedSet implementation and sorts it using the natural order of the
elements.</div>
</td>
</tr>
<tr class="altColor" id="i44">
<td class="colFirst"><code><a href="../../api/set/sorted/MutableSortedSet.html" title="interface in org.eclipse.collections.api.set.sorted">MutableSortedSet</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toSortedSet(java.util.Comparator)">toSortedSet</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util" class="externalLink">Comparator</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;comparator)</code></th>
<td class="colLast">
<div class="block">Converts the collection to a MutableSortedSet implementation and sorts it using the specified comparator.</div>
</td>
</tr>
<tr class="rowColor" id="i45">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toStringOfItemToCount()">toStringOfItemToCount</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a string representation of this bag.</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="inheritedList">
<h3>Methods inherited from class&nbsp;org.eclipse.collections.impl.<a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a></h3>
<a id="methods.inherited.from.class.org.eclipse.collections.impl.AbstractRichIterable">
<!-- -->
</a><code><a href="../AbstractRichIterable.html#allSatisfy(org.eclipse.collections.api.block.predicate.Predicate)">allSatisfy</a>, <a href="../AbstractRichIterable.html#allSatisfyWith(org.eclipse.collections.api.block.predicate.Predicate2,P)">allSatisfyWith</a>, <a href="../AbstractRichIterable.html#anySatisfy(org.eclipse.collections.api.block.predicate.Predicate)">anySatisfy</a>, <a href="../AbstractRichIterable.html#anySatisfyWith(org.eclipse.collections.api.block.predicate.Predicate2,P)">anySatisfyWith</a>, <a href="../AbstractRichIterable.html#appendString(java.lang.Appendable,java.lang.String)">appendString</a>, <a href="../AbstractRichIterable.html#appendString(java.lang.Appendable,java.lang.String,java.lang.String,java.lang.String)">appendString</a>, <a href="../AbstractRichIterable.html#asLazy()">asLazy</a>, <a href="../AbstractRichIterable.html#contains(java.lang.Object)">contains</a>, <a href="../AbstractRichIterable.html#containsAll(java.util.Collection)">containsAll</a>, <a href="../AbstractRichIterable.html#containsAllArguments(java.lang.Object...)">containsAllArguments</a>, <a href="../AbstractRichIterable.html#containsAllIterable(java.lang.Iterable)">containsAllIterable</a>, <a href="../AbstractRichIterable.html#countByEach(org.eclipse.collections.api.block.function.Function)">countByEach</a>, <a href="../AbstractRichIterable.html#countWith(org.eclipse.collections.api.block.predicate.Predicate2,P)">countWith</a>, <a href="../AbstractRichIterable.html#detect(org.eclipse.collections.api.block.predicate.Predicate)">detect</a>, <a href="../AbstractRichIterable.html#detectOptional(org.eclipse.collections.api.block.predicate.Predicate)">detectOptional</a>, <a href="../AbstractRichIterable.html#detectWith(org.eclipse.collections.api.block.predicate.Predicate2,P)">detectWith</a>, <a href="../AbstractRichIterable.html#detectWithIfNone(org.eclipse.collections.api.block.predicate.Predicate2,P,org.eclipse.collections.api.block.function.Function0)">detectWithIfNone</a>, <a href="../AbstractRichIterable.html#detectWithOptional(org.eclipse.collections.api.block.predicate.Predicate2,P)">detectWithOptional</a>, <a href="../AbstractRichIterable.html#forEach(org.eclipse.collections.api.block.procedure.Procedure)">forEach</a>, <a href="../AbstractRichIterable.html#forEachWith(org.eclipse.collections.api.block.procedure.Procedure2,P)">forEachWith</a>, <a href="../AbstractRichIterable.html#forEachWithIndex(org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure)">forEachWithIndex</a>, <a href="../AbstractRichIterable.html#groupByUniqueKey(org.eclipse.collections.api.block.function.Function,R)">groupByUniqueKey</a>, <a href="../AbstractRichIterable.html#into(R)">into</a>, <a href="../AbstractRichIterable.html#isEmpty()">isEmpty</a>, <a href="../AbstractRichIterable.html#max()">max</a>, <a href="../AbstractRichIterable.html#max(java.util.Comparator)">max</a>, <a href="../AbstractRichIterable.html#maxBy(org.eclipse.collections.api.block.function.Function)">maxBy</a>, <a href="../AbstractRichIterable.html#min()">min</a>, <a href="../AbstractRichIterable.html#min(java.util.Comparator)">min</a>, <a href="../AbstractRichIterable.html#minBy(org.eclipse.collections.api.block.function.Function)">minBy</a>, <a href="../AbstractRichIterable.html#noneSatisfy(org.eclipse.collections.api.block.predicate.Predicate)">noneSatisfy</a>, <a href="../AbstractRichIterable.html#noneSatisfyWith(org.eclipse.collections.api.block.predicate.Predicate2,P)">noneSatisfyWith</a>, <a href="../AbstractRichIterable.html#toArray()">toArray</a>, <a href="../AbstractRichIterable.html#toArray(E%5B%5D)">toArray</a>, <a href="../AbstractRichIterable.html#toBiMap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toBiMap</a>, <a href="../AbstractRichIterable.html#toMap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toMap</a>, <a href="../AbstractRichIterable.html#toSortedBagBy(org.eclipse.collections.api.block.function.Function)">toSortedBagBy</a>, <a href="../AbstractRichIterable.html#toSortedListBy(org.eclipse.collections.api.block.function.Function)">toSortedListBy</a>, <a href="../AbstractRichIterable.html#toSortedMap(java.util.Comparator,org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toSortedMap</a>, <a href="../AbstractRichIterable.html#toSortedMap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toSortedMap</a>, <a href="../AbstractRichIterable.html#toSortedMapBy(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toSortedMapBy</a>, <a href="../AbstractRichIterable.html#toSortedSetBy(org.eclipse.collections.api.block.function.Function)">toSortedSetBy</a>, <a href="../AbstractRichIterable.html#toString()">toString</a>, <a href="../AbstractRichIterable.html#zip(java.lang.Iterable,R)">zip</a>, <a href="../AbstractRichIterable.html#zipWithIndex(R)">zipWithIndex</a></code></div>
<div class="inheritedList">
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3>
<a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></div>
<div class="inheritedList">
<h3>Methods inherited from interface&nbsp;org.eclipse.collections.api.bag.<a href="../../api/bag/Bag.html" title="interface in org.eclipse.collections.api.bag">Bag</a></h3>
<a id="methods.inherited.from.class.org.eclipse.collections.api.bag.Bag">
<!-- -->
</a><code><a href="../../api/bag/Bag.html#aggregateBy(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function0,org.eclipse.collections.api.block.function.Function2,R)">aggregateBy</a>, <a href="../../api/bag/Bag.html#bottomOccurrences(int)">bottomOccurrences</a>, <a href="../../api/bag/Bag.html#collectWithOccurrences(org.eclipse.collections.api.block.function.primitive.ObjectIntToObjectFunction)">collectWithOccurrences</a>, <a href="../../api/bag/Bag.html#collectWithOccurrences(org.eclipse.collections.api.block.function.primitive.ObjectIntToObjectFunction,R)">collectWithOccurrences</a>, <a href="../../api/bag/Bag.html#equals(java.lang.Object)">equals</a>, <a href="../../api/bag/Bag.html#forEachWithOccurrences(org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure)">forEachWithOccurrences</a>, <a href="../../api/bag/Bag.html#groupBy(org.eclipse.collections.api.block.function.Function)">groupBy</a>, <a href="../../api/bag/Bag.html#groupByEach(org.eclipse.collections.api.block.function.Function)">groupByEach</a>, <a href="../../api/bag/Bag.html#hashCode()">hashCode</a>, <a href="../../api/bag/Bag.html#occurrencesOf(java.lang.Object)">occurrencesOf</a>, <a href="../../api/bag/Bag.html#partition(org.eclipse.collections.api.block.predicate.Predicate)">partition</a>, <a href="../../api/bag/Bag.html#partitionWith(org.eclipse.collections.api.block.predicate.Predicate2,P)">partitionWith</a>, <a href="../../api/bag/Bag.html#reduceInPlace(java.util.function.Supplier,java.util.function.BiConsumer)">reduceInPlace</a>, <a href="../../api/bag/Bag.html#reduceInPlace(java.util.stream.Collector)">reduceInPlace</a>, <a href="../../api/bag/Bag.html#reject(org.eclipse.collections.api.block.predicate.Predicate)">reject</a>, <a href="../../api/bag/Bag.html#rejectWith(org.eclipse.collections.api.block.predicate.Predicate2,P)">rejectWith</a>, <a href="../../api/bag/Bag.html#select(org.eclipse.collections.api.block.predicate.Predicate)">select</a>, <a href="../../api/bag/Bag.html#selectByOccurrences(org.eclipse.collections.api.block.predicate.primitive.IntPredicate)">selectByOccurrences</a>, <a href="../../api/bag/Bag.html#selectDuplicates()">selectDuplicates</a>, <a href="../../api/bag/Bag.html#selectInstancesOf(java.lang.Class)">selectInstancesOf</a>, <a href="../../api/bag/Bag.html#selectUnique()">selectUnique</a>, <a href="../../api/bag/Bag.html#selectWith(org.eclipse.collections.api.block.predicate.Predicate2,P)">selectWith</a>, <a href="../../api/bag/Bag.html#sizeDistinct()">sizeDistinct</a>, <a href="../../api/bag/Bag.html#summarizeDouble(org.eclipse.collections.api.block.function.primitive.DoubleFunction)">summarizeDouble</a>, <a href="../../api/bag/Bag.html#summarizeFloat(org.eclipse.collections.api.block.function.primitive.FloatFunction)">summarizeFloat</a>, <a href="../../api/bag/Bag.html#summarizeInt(org.eclipse.collections.api.block.function.primitive.IntFunction)">summarizeInt</a>, <a href="../../api/bag/Bag.html#summarizeLong(org.eclipse.collections.api.block.function.primitive.LongFunction)">summarizeLong</a>, <a href="../../api/bag/Bag.html#tap(org.eclipse.collections.api.block.procedure.Procedure)">tap</a>, <a href="../../api/bag/Bag.html#toImmutable()">toImmutable</a>, <a href="../../api/bag/Bag.html#toMapOfItemToCount()">toMapOfItemToCount</a>, <a href="../../api/bag/Bag.html#topOccurrences(int)">topOccurrences</a>, <a href="../../api/bag/Bag.html#zipWithIndex()">zipWithIndex</a></code></div>
<div class="inheritedList">
<h3>Methods inherited from interface&nbsp;java.util.<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a></h3>
<a id="methods.inherited.from.class.java.util.Collection">
<!-- -->
</a><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#add(E)" title="class or interface in java.util" class="externalLink">add</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#addAll(java.util.Collection)" title="class or interface in java.util" class="externalLink">addAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#clear()" title="class or interface in java.util" class="externalLink">clear</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#contains(java.lang.Object)" title="class or interface in java.util" class="externalLink">contains</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#containsAll(java.util.Collection)" title="class or interface in java.util" class="externalLink">containsAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.util" class="externalLink">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#hashCode()" title="class or interface in java.util" class="externalLink">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#isEmpty()" title="class or interface in java.util" class="externalLink">isEmpty</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#iterator()" title="class or interface in java.util" class="externalLink">iterator</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#parallelStream()" title="class or interface in java.util" class="externalLink">parallelStream</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#remove(java.lang.Object)" title="class or interface in java.util" class="externalLink">remove</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#removeAll(java.util.Collection)" title="class or interface in java.util" class="externalLink">removeAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#removeIf(java.util.function.Predicate)" title="class or interface in java.util" class="externalLink">removeIf</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#retainAll(java.util.Collection)" title="class or interface in java.util" class="externalLink">retainAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#size()" title="class or interface in java.util" class="externalLink">size</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#spliterator()" title="class or interface in java.util" class="externalLink">spliterator</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#stream()" title="class or interface in java.util" class="externalLink">stream</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#toArray()" title="class or interface in java.util" class="externalLink">toArray</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#toArray(java.util.function.IntFunction)" title="class or interface in java.util" class="externalLink">toArray</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true#toArray(T%5B%5D)" title="class or interface in java.util" class="externalLink">toArray</a></code></div>
<div class="inheritedList">
<h3>Methods inherited from interface&nbsp;org.eclipse.collections.api.<a href="../../api/InternalIterable.html" title="interface in org.eclipse.collections.api">InternalIterable</a></h3>
<a id="methods.inherited.from.class.org.eclipse.collections.api.InternalIterable">
<!-- -->
</a><code><a href="../../api/InternalIterable.html#forEach(java.util.function.Consumer)">forEach</a>, <a href="../../api/InternalIterable.html#forEachWith(org.eclipse.collections.api.block.procedure.Procedure2,P)">forEachWith</a>, <a href="../../api/InternalIterable.html#forEachWithIndex(org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure)">forEachWithIndex</a></code></div>
<div class="inheritedList">
<h3>Methods inherited from interface&nbsp;org.eclipse.collections.api.<a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a></h3>
<a id="methods.inherited.from.class.org.eclipse.collections.api.RichIterable">
<!-- -->
</a><code><a href="../../api/RichIterable.html#aggregateBy(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function0,org.eclipse.collections.api.block.function.Function2)">aggregateBy</a>, <a href="../../api/RichIterable.html#aggregateInPlaceBy(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function0,org.eclipse.collections.api.block.procedure.Procedure2)">aggregateInPlaceBy</a>, <a href="../../api/RichIterable.html#allSatisfy(org.eclipse.collections.api.block.predicate.Predicate)">allSatisfy</a>, <a href="../../api/RichIterable.html#allSatisfyWith(org.eclipse.collections.api.block.predicate.Predicate2,P)">allSatisfyWith</a>, <a href="../../api/RichIterable.html#anySatisfy(org.eclipse.collections.api.block.predicate.Predicate)">anySatisfy</a>, <a href="../../api/RichIterable.html#anySatisfyWith(org.eclipse.collections.api.block.predicate.Predicate2,P)">anySatisfyWith</a>, <a href="../../api/RichIterable.html#appendString(java.lang.Appendable)">appendString</a>, <a href="../../api/RichIterable.html#appendString(java.lang.Appendable,java.lang.String)">appendString</a>, <a href="../../api/RichIterable.html#appendString(java.lang.Appendable,java.lang.String,java.lang.String,java.lang.String)">appendString</a>, <a href="../../api/RichIterable.html#asLazy()">asLazy</a>, <a href="../../api/RichIterable.html#chunk(int)">chunk</a>, <a href="../../api/RichIterable.html#collect(org.eclipse.collections.api.block.function.Function)">collect</a>, <a href="../../api/RichIterable.html#collectBoolean(org.eclipse.collections.api.block.function.primitive.BooleanFunction)">collectBoolean</a>, <a href="../../api/RichIterable.html#collectByte(org.eclipse.collections.api.block.function.primitive.ByteFunction)">collectByte</a>, <a href="../../api/RichIterable.html#collectChar(org.eclipse.collections.api.block.function.primitive.CharFunction)">collectChar</a>, <a href="../../api/RichIterable.html#collectDouble(org.eclipse.collections.api.block.function.primitive.DoubleFunction)">collectDouble</a>, <a href="../../api/RichIterable.html#collectFloat(org.eclipse.collections.api.block.function.primitive.FloatFunction)">collectFloat</a>, <a href="../../api/RichIterable.html#collectIf(org.eclipse.collections.api.block.predicate.Predicate,org.eclipse.collections.api.block.function.Function)">collectIf</a>, <a href="../../api/RichIterable.html#collectInt(org.eclipse.collections.api.block.function.primitive.IntFunction)">collectInt</a>, <a href="../../api/RichIterable.html#collectLong(org.eclipse.collections.api.block.function.primitive.LongFunction)">collectLong</a>, <a href="../../api/RichIterable.html#collectShort(org.eclipse.collections.api.block.function.primitive.ShortFunction)">collectShort</a>, <a href="../../api/RichIterable.html#collectWith(org.eclipse.collections.api.block.function.Function2,P)">collectWith</a>, <a href="../../api/RichIterable.html#contains(java.lang.Object)">contains</a>, <a href="../../api/RichIterable.html#containsAll(java.util.Collection)">containsAll</a>, <a href="../../api/RichIterable.html#containsAllArguments(java.lang.Object...)">containsAllArguments</a>, <a href="../../api/RichIterable.html#containsAllIterable(java.lang.Iterable)">containsAllIterable</a>, <a href="../../api/RichIterable.html#containsBy(org.eclipse.collections.api.block.function.Function,V)">containsBy</a>, <a href="../../api/RichIterable.html#countBy(org.eclipse.collections.api.block.function.Function)">countBy</a>, <a href="../../api/RichIterable.html#countBy(org.eclipse.collections.api.block.function.Function,R)">countBy</a>, <a href="../../api/RichIterable.html#countByEach(org.eclipse.collections.api.block.function.Function)">countByEach</a>, <a href="../../api/RichIterable.html#countByEach(org.eclipse.collections.api.block.function.Function,R)">countByEach</a>, <a href="../../api/RichIterable.html#countByWith(org.eclipse.collections.api.block.function.Function2,P)">countByWith</a>, <a href="../../api/RichIterable.html#countByWith(org.eclipse.collections.api.block.function.Function2,P,R)">countByWith</a>, <a href="../../api/RichIterable.html#countWith(org.eclipse.collections.api.block.predicate.Predicate2,P)">countWith</a>, <a href="../../api/RichIterable.html#detect(org.eclipse.collections.api.block.predicate.Predicate)">detect</a>, <a href="../../api/RichIterable.html#detectIfNone(org.eclipse.collections.api.block.predicate.Predicate,org.eclipse.collections.api.block.function.Function0)">detectIfNone</a>, <a href="../../api/RichIterable.html#detectOptional(org.eclipse.collections.api.block.predicate.Predicate)">detectOptional</a>, <a href="../../api/RichIterable.html#detectWith(org.eclipse.collections.api.block.predicate.Predicate2,P)">detectWith</a>, <a href="../../api/RichIterable.html#detectWithIfNone(org.eclipse.collections.api.block.predicate.Predicate2,P,org.eclipse.collections.api.block.function.Function0)">detectWithIfNone</a>, <a href="../../api/RichIterable.html#detectWithOptional(org.eclipse.collections.api.block.predicate.Predicate2,P)">detectWithOptional</a>, <a href="../../api/RichIterable.html#each(org.eclipse.collections.api.block.procedure.Procedure)">each</a>, <a href="../../api/RichIterable.html#flatCollect(org.eclipse.collections.api.block.function.Function)">flatCollect</a>, <a href="../../api/RichIterable.html#flatCollectWith(org.eclipse.collections.api.block.function.Function2,P)">flatCollectWith</a>, <a href="../../api/RichIterable.html#flatCollectWith(org.eclipse.collections.api.block.function.Function2,P,R)">flatCollectWith</a>, <a href="../../api/RichIterable.html#forEach(org.eclipse.collections.api.block.procedure.Procedure)">forEach</a>, <a href="../../api/RichIterable.html#getAny()">getAny</a>, <a href="../../api/RichIterable.html#getFirst()">getFirst</a>, <a href="../../api/RichIterable.html#getLast()">getLast</a>, <a href="../../api/RichIterable.html#getOnly()">getOnly</a>, <a href="../../api/RichIterable.html#groupByAndCollect(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function,R)">groupByAndCollect</a>, <a href="../../api/RichIterable.html#groupByUniqueKey(org.eclipse.collections.api.block.function.Function)">groupByUniqueKey</a>, <a href="../../api/RichIterable.html#groupByUniqueKey(org.eclipse.collections.api.block.function.Function,R)">groupByUniqueKey</a>, <a href="../../api/RichIterable.html#into(R)">into</a>, <a href="../../api/RichIterable.html#isEmpty()">isEmpty</a>, <a href="../../api/RichIterable.html#makeString()">makeString</a>, <a href="../../api/RichIterable.html#makeString(java.lang.String)">makeString</a>, <a href="../../api/RichIterable.html#makeString(java.lang.String,java.lang.String,java.lang.String)">makeString</a>, <a href="../../api/RichIterable.html#max()">max</a>, <a href="../../api/RichIterable.html#max(java.util.Comparator)">max</a>, <a href="../../api/RichIterable.html#maxBy(org.eclipse.collections.api.block.function.Function)">maxBy</a>, <a href="../../api/RichIterable.html#maxByOptional(org.eclipse.collections.api.block.function.Function)">maxByOptional</a>, <a href="../../api/RichIterable.html#maxOptional()">maxOptional</a>, <a href="../../api/RichIterable.html#maxOptional(java.util.Comparator)">maxOptional</a>, <a href="../../api/RichIterable.html#min()">min</a>, <a href="../../api/RichIterable.html#min(java.util.Comparator)">min</a>, <a href="../../api/RichIterable.html#minBy(org.eclipse.collections.api.block.function.Function)">minBy</a>, <a href="../../api/RichIterable.html#minByOptional(org.eclipse.collections.api.block.function.Function)">minByOptional</a>, <a href="../../api/RichIterable.html#minOptional()">minOptional</a>, <a href="../../api/RichIterable.html#minOptional(java.util.Comparator)">minOptional</a>, <a href="../../api/RichIterable.html#noneSatisfy(org.eclipse.collections.api.block.predicate.Predicate)">noneSatisfy</a>, <a href="../../api/RichIterable.html#noneSatisfyWith(org.eclipse.collections.api.block.predicate.Predicate2,P)">noneSatisfyWith</a>, <a href="../../api/RichIterable.html#notEmpty()">notEmpty</a>, <a href="../../api/RichIterable.html#reduce(java.util.function.BinaryOperator)">reduce</a>, <a href="../../api/RichIterable.html#size()">size</a>, <a href="../../api/RichIterable.html#sumByDouble(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.primitive.DoubleFunction)">sumByDouble</a>, <a href="../../api/RichIterable.html#sumByFloat(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.primitive.FloatFunction)">sumByFloat</a>, <a href="../../api/RichIterable.html#sumByInt(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.primitive.IntFunction)">sumByInt</a>, <a href="../../api/RichIterable.html#sumByLong(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.primitive.LongFunction)">sumByLong</a>, <a href="../../api/RichIterable.html#toArray()">toArray</a>, <a href="../../api/RichIterable.html#toArray(E%5B%5D)">toArray</a>, <a href="../../api/RichIterable.html#toBiMap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toBiMap</a>, <a href="../../api/RichIterable.html#toMap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toMap</a>, <a href="../../api/RichIterable.html#toMap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function,R)">toMap</a>, <a href="../../api/RichIterable.html#toSortedBagBy(org.eclipse.collections.api.block.function.Function)">toSortedBagBy</a>, <a href="../../api/RichIterable.html#toSortedList()">toSortedList</a>, <a href="../../api/RichIterable.html#toSortedListBy(org.eclipse.collections.api.block.function.Function)">toSortedListBy</a>, <a href="../../api/RichIterable.html#toSortedMap(java.util.Comparator,org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toSortedMap</a>, <a href="../../api/RichIterable.html#toSortedMap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toSortedMap</a>, <a href="../../api/RichIterable.html#toSortedMapBy(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toSortedMapBy</a>, <a href="../../api/RichIterable.html#toSortedSetBy(org.eclipse.collections.api.block.function.Function)">toSortedSetBy</a>, <a href="../../api/RichIterable.html#toString()">toString</a>, <a href="../../api/RichIterable.html#zip(java.lang.Iterable)">zip</a>, <a href="../../api/RichIterable.html#zip(java.lang.Iterable,R)">zip</a>, <a href="../../api/RichIterable.html#zipWithIndex(R)">zipWithIndex</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li class="blockList">
<section class="constructorDetails"><a id="constructor.detail">
<!-- -->
</a>
<h2>Constructor Details</h2>
<ul class="blockList">
<li class="blockList">
<section class="detail">
<h3><a id="&lt;init&gt;()">AbstractBag</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="memberName">AbstractBag</span>()</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li class="blockList">
<section class="methodDetails"><a id="method.detail">
<!-- -->
</a>
<h2>Method Details</h2>
<ul class="blockList">
<li class="blockList">
<section class="detail">
<h3><a id="select(org.eclipse.collections.api.block.predicate.Predicate,java.util.Collection)">
<!-- -->
</a><a id="select(org.eclipse.collections.api.block.predicate.Predicate,R)">select</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="typeParameters">&lt;R extends <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&gt;</span>&nbsp;<span class="returnType">R</span>&nbsp;<span class="memberName">select</span>&#8203;(<span class="arguments"><a href="../../api/block/predicate/Predicate.html" title="interface in org.eclipse.collections.api.block.predicate">Predicate</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;predicate,
R&nbsp;target)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#select(org.eclipse.collections.api.block.predicate.Predicate,R)">RichIterable</a></code></span></div>
<div class="block">Same as the select method with one parameter but uses the specified target collection for the results.
<p>
Example using a Java 8 lambda expression:
<pre>
MutableList&lt;Person&gt; selected =
people.select(person -&gt; person.person.getLastName().equals("Smith"), Lists.mutable.empty());
</pre>
<p>
Example using an anonymous inner class:
<pre>
MutableList&lt;Person&gt; selected =
people.select(new Predicate&lt;Person&gt;()
{
public boolean accept(Person person)
{
return person.person.getLastName().equals("Smith");
}
}, Lists.mutable.empty());
</pre>
<p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#select(org.eclipse.collections.api.block.predicate.Predicate,R)">select</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#select(org.eclipse.collections.api.block.predicate.Predicate,R)">select</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>predicate</code> - a <a href="../../api/block/predicate/Predicate.html" title="interface in org.eclipse.collections.api.block.predicate"><code>Predicate</code></a> to use as the select criteria</dd>
<dd><code>target</code> - the Collection to append to for all elements in this <code>RichIterable</code> that meet select criteria <code>predicate</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>target</code>, which contains appended elements as a result of the select criteria</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../api/RichIterable.html#select(org.eclipse.collections.api.block.predicate.Predicate)"><code>RichIterable.select(Predicate)</code></a></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="selectWith(org.eclipse.collections.api.block.predicate.Predicate2,java.lang.Object,java.util.Collection)">
<!-- -->
</a><a id="selectWith(org.eclipse.collections.api.block.predicate.Predicate2,P,R)">selectWith</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="typeParameters">&lt;P,&#8203;
R extends <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&gt;</span>&nbsp;<span class="returnType">R</span>&nbsp;<span class="memberName">selectWith</span>&#8203;(<span class="arguments"><a href="../../api/block/predicate/Predicate2.html" title="interface in org.eclipse.collections.api.block.predicate">Predicate2</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? super P&gt;&nbsp;predicate,
P&nbsp;parameter,
R&nbsp;target)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#selectWith(org.eclipse.collections.api.block.predicate.Predicate2,P,R)">RichIterable</a></code></span></div>
<div class="block">Similar to <a href="../../api/RichIterable.html#select(org.eclipse.collections.api.block.predicate.Predicate,R)"><code>RichIterable.select(Predicate, Collection)</code></a>, except with an evaluation parameter for the second generic argument in <a href="../../api/block/predicate/Predicate2.html" title="interface in org.eclipse.collections.api.block.predicate"><code>Predicate2</code></a>.
<p>
E.g. return a <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink"><code>Collection</code></a> of Person elements where the person has an age <b>greater than or equal to</b> 18 years
<p>
Example using a Java 8 lambda expression:
<pre>
MutableList&lt;Person&gt; selected =
people.selectWith((Person person, Integer age) -&gt; person.getAge()&gt;= age, Integer.valueOf(18), Lists.mutable.empty());
</pre>
<p>
Example using an anonymous inner class:
<pre>
MutableList&lt;Person&gt; selected =
people.selectWith(new Predicate2&lt;Person, Integer&gt;()
{
public boolean accept(Person person, Integer age)
{
return person.getAge()&gt;= age;
}
}, Integer.valueOf(18), Lists.mutable.empty());
</pre></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#selectWith(org.eclipse.collections.api.block.predicate.Predicate2,P,R)">selectWith</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#selectWith(org.eclipse.collections.api.block.predicate.Predicate2,P,R)">selectWith</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>predicate</code> - a <a href="../../api/block/predicate/Predicate2.html" title="interface in org.eclipse.collections.api.block.predicate"><code>Predicate2</code></a> to use as the select criteria</dd>
<dd><code>parameter</code> - a parameter to pass in for evaluation of the second argument <code>P</code> in <code>predicate</code></dd>
<dd><code>target</code> - the Collection to append to for all elements in this <code>RichIterable</code> that meet select criteria <code>predicate</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>targetCollection</code>, which contains appended elements as a result of the select criteria</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../api/RichIterable.html#select(org.eclipse.collections.api.block.predicate.Predicate)"><code>RichIterable.select(Predicate)</code></a>,
<a href="../../api/RichIterable.html#select(org.eclipse.collections.api.block.predicate.Predicate,R)"><code>RichIterable.select(Predicate, Collection)</code></a></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="reject(org.eclipse.collections.api.block.predicate.Predicate,java.util.Collection)">
<!-- -->
</a><a id="reject(org.eclipse.collections.api.block.predicate.Predicate,R)">reject</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="typeParameters">&lt;R extends <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&gt;</span>&nbsp;<span class="returnType">R</span>&nbsp;<span class="memberName">reject</span>&#8203;(<span class="arguments"><a href="../../api/block/predicate/Predicate.html" title="interface in org.eclipse.collections.api.block.predicate">Predicate</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;predicate,
R&nbsp;target)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#reject(org.eclipse.collections.api.block.predicate.Predicate,R)">RichIterable</a></code></span></div>
<div class="block">Same as the reject method with one parameter but uses the specified target collection for the results.
<p>
Example using a Java 8 lambda expression:
<pre>
MutableList&lt;Person&gt; rejected =
people.reject(person -&gt; person.person.getLastName().equals("Smith"), Lists.mutable.empty());
</pre>
<p>
Example using an anonymous inner class:
<pre>
MutableList&lt;Person&gt; rejected =
people.reject(new Predicate&lt;Person&gt;()
{
public boolean accept(Person person)
{
return person.person.getLastName().equals("Smith");
}
}, Lists.mutable.empty());
</pre></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#reject(org.eclipse.collections.api.block.predicate.Predicate,R)">reject</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#reject(org.eclipse.collections.api.block.predicate.Predicate,R)">reject</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>predicate</code> - a <a href="../../api/block/predicate/Predicate.html" title="interface in org.eclipse.collections.api.block.predicate"><code>Predicate</code></a> to use as the reject criteria</dd>
<dd><code>target</code> - the Collection to append to for all elements in this <code>RichIterable</code> that cause <code>Predicate#accept(Object)</code> method to evaluate to false</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>target</code>, which contains appended elements as a result of the reject criteria</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="rejectWith(org.eclipse.collections.api.block.predicate.Predicate2,java.lang.Object,java.util.Collection)">
<!-- -->
</a><a id="rejectWith(org.eclipse.collections.api.block.predicate.Predicate2,P,R)">rejectWith</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="typeParameters">&lt;P,&#8203;
R extends <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&gt;</span>&nbsp;<span class="returnType">R</span>&nbsp;<span class="memberName">rejectWith</span>&#8203;(<span class="arguments"><a href="../../api/block/predicate/Predicate2.html" title="interface in org.eclipse.collections.api.block.predicate">Predicate2</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? super P&gt;&nbsp;predicate,
P&nbsp;parameter,
R&nbsp;target)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#rejectWith(org.eclipse.collections.api.block.predicate.Predicate2,P,R)">RichIterable</a></code></span></div>
<div class="block">Similar to <a href="../../api/RichIterable.html#reject(org.eclipse.collections.api.block.predicate.Predicate,R)"><code>RichIterable.reject(Predicate, Collection)</code></a>, except with an evaluation parameter for the second generic argument in <a href="../../api/block/predicate/Predicate2.html" title="interface in org.eclipse.collections.api.block.predicate"><code>Predicate2</code></a>.
<p>
E.g. return a <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink"><code>Collection</code></a> of Person elements where the person has an age <b>greater than or equal to</b> 18 years
<p>
Example using a Java 8 lambda expression:
<pre>
MutableList&lt;Person&gt; rejected =
people.rejectWith((Person person, Integer age) -&gt; person.getAge() &lt; age, Integer.valueOf(18), Lists.mutable.empty());
</pre>
<p>
Example using an anonymous inner class:
<pre>
MutableList&lt;Person&gt; rejected =
people.rejectWith(new Predicate2&lt;Person, Integer&gt;()
{
public boolean accept(Person person, Integer age)
{
return person.getAge() &lt; age;
}
}, Integer.valueOf(18), Lists.mutable.empty());
</pre></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#rejectWith(org.eclipse.collections.api.block.predicate.Predicate2,P,R)">rejectWith</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#rejectWith(org.eclipse.collections.api.block.predicate.Predicate2,P,R)">rejectWith</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>predicate</code> - a <a href="../../api/block/predicate/Predicate2.html" title="interface in org.eclipse.collections.api.block.predicate"><code>Predicate2</code></a> to use as the reject criteria</dd>
<dd><code>parameter</code> - a parameter to pass in for evaluation of the second argument <code>P</code> in <code>predicate</code></dd>
<dd><code>target</code> - the Collection to append to for all elements in this <code>RichIterable</code> that cause <code>Predicate#accept(Object)</code> method to evaluate to false</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>targetCollection</code>, which contains appended elements as a result of the reject criteria</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../api/RichIterable.html#reject(org.eclipse.collections.api.block.predicate.Predicate)"><code>RichIterable.reject(Predicate)</code></a>,
<a href="../../api/RichIterable.html#reject(org.eclipse.collections.api.block.predicate.Predicate,R)"><code>RichIterable.reject(Predicate, Collection)</code></a></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="count(org.eclipse.collections.api.block.predicate.Predicate)">count</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">int</span>&nbsp;<span class="memberName">count</span>&#8203;(<span class="arguments"><a href="../../api/block/predicate/Predicate.html" title="interface in org.eclipse.collections.api.block.predicate">Predicate</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;predicate)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#count(org.eclipse.collections.api.block.predicate.Predicate)">RichIterable</a></code></span></div>
<div class="block">Return the total number of elements that answer true to the specified predicate.
<p>
Example using a Java 8 lambda expression:
<pre>
int count =
people.<b>count</b>(person -&gt; person.getAddress().getState().getName().equals("New York"));
</pre>
<p>
Example using an anonymous inner class:
<pre>
int count =
people.<b>count</b>(new Predicate&lt;Person&gt;()
{
public boolean accept(Person person)
{
return person.getAddress().getState().getName().equals("New York");
}
});
</pre></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#count(org.eclipse.collections.api.block.predicate.Predicate)">count</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#count(org.eclipse.collections.api.block.predicate.Predicate)">count</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="collect(org.eclipse.collections.api.block.function.Function,java.util.Collection)">
<!-- -->
</a><a id="collect(org.eclipse.collections.api.block.function.Function,R)">collect</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="typeParameters">&lt;V,&#8203;
R extends <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;V&gt;&gt;</span>&nbsp;<span class="returnType">R</span>&nbsp;<span class="memberName">collect</span>&#8203;(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? extends V&gt;&nbsp;function,
R&nbsp;target)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#collect(org.eclipse.collections.api.block.function.Function,R)">RichIterable</a></code></span></div>
<div class="block">Same as <a href="../../api/RichIterable.html#collect(org.eclipse.collections.api.block.function.Function)"><code>RichIterable.collect(Function)</code></a>, except that the results are gathered into the specified <code>target</code>
collection.
<p>
Example using a Java 8 lambda expression:
<pre>
MutableList&lt;String&gt; names =
people.collect(person -&gt; person.getFirstName() + " " + person.getLastName(), Lists.mutable.empty());
</pre>
<p>
Example using an anonymous inner class:
<pre>
MutableList&lt;String&gt; names =
people.collect(new Function&lt;Person, String&gt;()
{
public String valueOf(Person person)
{
return person.getFirstName() + " " + person.getLastName();
}
}, Lists.mutable.empty());
</pre></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#collect(org.eclipse.collections.api.block.function.Function,R)">collect</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#collect(org.eclipse.collections.api.block.function.Function,R)">collect</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>function</code> - a <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function"><code>Function</code></a> to use as the collect transformation function</dd>
<dd><code>target</code> - the Collection to append to for all elements in this <code>RichIterable</code> that meet select criteria <code>function</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>target</code>, which contains appended elements as a result of the collect transformation</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../api/RichIterable.html#collect(org.eclipse.collections.api.block.function.Function)"><code>RichIterable.collect(Function)</code></a></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="collectWith(org.eclipse.collections.api.block.function.Function2,java.lang.Object,java.util.Collection)">
<!-- -->
</a><a id="collectWith(org.eclipse.collections.api.block.function.Function2,P,R)">collectWith</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="typeParameters">&lt;P,&#8203;
V,&#8203;
R extends <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;V&gt;&gt;</span>&nbsp;<span class="returnType">R</span>&nbsp;<span class="memberName">collectWith</span>&#8203;(<span class="arguments"><a href="../../api/block/function/Function2.html" title="interface in org.eclipse.collections.api.block.function">Function2</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? super P,&#8203;? extends V&gt;&nbsp;function,
P&nbsp;parameter,
R&nbsp;target)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#collectWith(org.eclipse.collections.api.block.function.Function2,P,R)">RichIterable</a></code></span></div>
<div class="block">Same as collectWith but with a targetCollection parameter to gather the results.
<p>
Example using a Java 8 lambda expression:
<pre>
MutableSet&lt;Integer&gt; integers =
Lists.mutable.with(1, 2, 3).collectWith((each, parameter) -&gt; each + parameter, Integer.valueOf(1), Sets.mutable.empty());
</pre>
<p>
Example using an anonymous inner class:
<pre>
Function2&lt;Integer, Integer, Integer&gt; addParameterFunction =
new Function2&lt;Integer, Integer, Integer&gt;()
{
public Integer value(final Integer each, final Integer parameter)
{
return each + parameter;
}
};
MutableSet&lt;Integer&gt; integers =
Lists.mutable.with(1, 2, 3).collectWith(addParameterFunction, Integer.valueOf(1), Sets.mutable.empty());
</pre></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#collectWith(org.eclipse.collections.api.block.function.Function2,P,R)">collectWith</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#collectWith(org.eclipse.collections.api.block.function.Function2,P,R)">collectWith</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>function</code> - a <a href="../../api/block/function/Function2.html" title="interface in org.eclipse.collections.api.block.function"><code>Function2</code></a> to use as the collect transformation function</dd>
<dd><code>parameter</code> - a parameter to pass in for evaluation of the second argument <code>P</code> in <code>function</code></dd>
<dd><code>target</code> - the Collection to append to for all elements in this <code>RichIterable</code> that meet select criteria <code>function</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>targetCollection</code>, which contains appended elements as a result of the collect transformation</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="collectIf(org.eclipse.collections.api.block.predicate.Predicate,org.eclipse.collections.api.block.function.Function,java.util.Collection)">
<!-- -->
</a><a id="collectIf(org.eclipse.collections.api.block.predicate.Predicate,org.eclipse.collections.api.block.function.Function,R)">collectIf</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="typeParameters">&lt;V,&#8203;
R extends <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;V&gt;&gt;</span>&nbsp;<span class="returnType">R</span>&nbsp;<span class="memberName">collectIf</span>&#8203;(<span class="arguments"><a href="../../api/block/predicate/Predicate.html" title="interface in org.eclipse.collections.api.block.predicate">Predicate</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;predicate,
<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? extends V&gt;&nbsp;function,
R&nbsp;target)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#collectIf(org.eclipse.collections.api.block.predicate.Predicate,org.eclipse.collections.api.block.function.Function,R)">RichIterable</a></code></span></div>
<div class="block">Same as the collectIf method with two parameters but uses the specified target collection for the results.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#collectIf(org.eclipse.collections.api.block.predicate.Predicate,org.eclipse.collections.api.block.function.Function,R)">collectIf</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#collectIf(org.eclipse.collections.api.block.predicate.Predicate,org.eclipse.collections.api.block.function.Function,R)">collectIf</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>predicate</code> - a <a href="../../api/block/predicate/Predicate.html" title="interface in org.eclipse.collections.api.block.predicate"><code>Predicate</code></a> to use as the select criteria</dd>
<dd><code>function</code> - a <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function"><code>Function</code></a> to use as the collect transformation function</dd>
<dd><code>target</code> - the Collection to append to for all elements in this <code>RichIterable</code> that meet the collect criteria <code>predicate</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>targetCollection</code>, which contains appended elements as a result of the collect criteria and transformation</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../api/RichIterable.html#collectIf(org.eclipse.collections.api.block.predicate.Predicate,org.eclipse.collections.api.block.function.Function)"><code>RichIterable.collectIf(Predicate, Function)</code></a></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="flatCollect(org.eclipse.collections.api.block.function.Function,java.util.Collection)">
<!-- -->
</a><a id="flatCollect(org.eclipse.collections.api.block.function.Function,R)">flatCollect</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="typeParameters">&lt;V,&#8203;
R extends <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a>&lt;V&gt;&gt;</span>&nbsp;<span class="returnType">R</span>&nbsp;<span class="memberName">flatCollect</span>&#8203;(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a>&lt;V&gt;&gt;&nbsp;function,
R&nbsp;target)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#flatCollect(org.eclipse.collections.api.block.function.Function,R)">RichIterable</a></code></span></div>
<div class="block">Same as flatCollect, only the results are collected into the target collection.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#flatCollect(org.eclipse.collections.api.block.function.Function,R)">flatCollect</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#flatCollect(org.eclipse.collections.api.block.function.Function,R)">flatCollect</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>function</code> - The <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function"><code>Function</code></a> to apply</dd>
<dd><code>target</code> - The collection into which results should be added.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>target</code>, which will contain a flattened collection of results produced by applying the given <code>function</code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../api/RichIterable.html#flatCollect(org.eclipse.collections.api.block.function.Function)"><code>RichIterable.flatCollect(Function)</code></a></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="collectBoolean(org.eclipse.collections.api.block.function.primitive.BooleanFunction,org.eclipse.collections.api.collection.primitive.MutableBooleanCollection)">
<!-- -->
</a><a id="collectBoolean(org.eclipse.collections.api.block.function.primitive.BooleanFunction,R)">collectBoolean</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="typeParameters">&lt;R extends <a href="../../api/collection/primitive/MutableBooleanCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableBooleanCollection</a>&gt;</span>&nbsp;<span class="returnType">R</span>&nbsp;<span class="memberName">collectBoolean</span>&#8203;(<span class="arguments"><a href="../../api/block/function/primitive/BooleanFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">BooleanFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;booleanFunction,
R&nbsp;target)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#collectBoolean(org.eclipse.collections.api.block.function.primitive.BooleanFunction,R)">RichIterable</a></code></span></div>
<div class="block">Same as <a href="../../api/RichIterable.html#collectBoolean(org.eclipse.collections.api.block.function.primitive.BooleanFunction)"><code>RichIterable.collectBoolean(BooleanFunction)</code></a>, except that the results are gathered into the specified <code>target</code>
collection.
<p>
Example using a Java 8 lambda expression:
<pre>
BooleanArrayList licenses =
people.collectBoolean(person -&gt; person.hasDrivingLicense(), new BooleanArrayList());
</pre>
<p>
Example using an anonymous inner class:
<pre>
BooleanArrayList licenses =
people.collectBoolean(new BooleanFunction&lt;Person&gt;()
{
public boolean booleanValueOf(Person person)
{
return person.hasDrivingLicense();
}
}, new BooleanArrayList());
</pre></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#collectBoolean(org.eclipse.collections.api.block.function.primitive.BooleanFunction,R)">collectBoolean</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#collectBoolean(org.eclipse.collections.api.block.function.primitive.BooleanFunction,R)">collectBoolean</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>booleanFunction</code> - a <a href="../../api/block/function/primitive/BooleanFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive"><code>BooleanFunction</code></a> to use as the collect transformation function</dd>
<dd><code>target</code> - the MutableBooleanCollection to append to for all elements in this <code>RichIterable</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>target</code>, which contains appended elements as a result of the collect transformation</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="flatCollectBoolean(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.collection.primitive.MutableBooleanCollection)">
<!-- -->
</a><a id="flatCollectBoolean(org.eclipse.collections.api.block.function.Function,R)">flatCollectBoolean</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="typeParameters">&lt;R extends <a href="../../api/collection/primitive/MutableBooleanCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableBooleanCollection</a>&gt;</span>&nbsp;<span class="returnType">R</span>&nbsp;<span class="memberName">flatCollectBoolean</span>&#8203;(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? extends <a href="../../api/BooleanIterable.html" title="interface in org.eclipse.collections.api">BooleanIterable</a>&gt;&nbsp;function,
R&nbsp;target)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#flatCollectBoolean(org.eclipse.collections.api.block.function.Function,R)">RichIterable</a></code></span></div>
<div class="block">Same as flatCollect, only the results are collected into the target collection.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#flatCollectBoolean(org.eclipse.collections.api.block.function.Function,R)">flatCollectBoolean</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>function</code> - The <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function"><code>Function</code></a> to apply</dd>
<dd><code>target</code> - The collection into which results should be added.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>target</code>, which will contain a flattened collection of results produced by applying the given <code>function</code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../api/RichIterable.html#flatCollect(org.eclipse.collections.api.block.function.Function)"><code>RichIterable.flatCollect(Function)</code></a></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="collectByte(org.eclipse.collections.api.block.function.primitive.ByteFunction,org.eclipse.collections.api.collection.primitive.MutableByteCollection)">
<!-- -->
</a><a id="collectByte(org.eclipse.collections.api.block.function.primitive.ByteFunction,R)">collectByte</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="typeParameters">&lt;R extends <a href="../../api/collection/primitive/MutableByteCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableByteCollection</a>&gt;</span>&nbsp;<span class="returnType">R</span>&nbsp;<span class="memberName">collectByte</span>&#8203;(<span class="arguments"><a href="../../api/block/function/primitive/ByteFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">ByteFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;byteFunction,
R&nbsp;target)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#collectByte(org.eclipse.collections.api.block.function.primitive.ByteFunction,R)">RichIterable</a></code></span></div>
<div class="block">Same as <a href="../../api/RichIterable.html#collectByte(org.eclipse.collections.api.block.function.primitive.ByteFunction)"><code>RichIterable.collectByte(ByteFunction)</code></a>, except that the results are gathered into the specified <code>target</code>
collection.
<p>
Example using a Java 8 lambda expression:
<pre>
ByteArrayList bytes =
people.collectByte(person -&gt; person.getCode(), new ByteArrayList());
</pre>
<p>
Example using an anonymous inner class:
<pre>
ByteArrayList bytes =
people.collectByte(new ByteFunction&lt;Person&gt;()
{
public byte byteValueOf(Person person)
{
return person.getCode();
}
}, new ByteArrayList());
</pre></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#collectByte(org.eclipse.collections.api.block.function.primitive.ByteFunction,R)">collectByte</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#collectByte(org.eclipse.collections.api.block.function.primitive.ByteFunction,R)">collectByte</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>byteFunction</code> - a <a href="../../api/block/function/primitive/ByteFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive"><code>ByteFunction</code></a> to use as the collect transformation function</dd>
<dd><code>target</code> - the MutableByteCollection to append to for all elements in this <code>RichIterable</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>target</code>, which contains appended elements as a result of the collect transformation</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="flatCollectByte(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.collection.primitive.MutableByteCollection)">
<!-- -->
</a><a id="flatCollectByte(org.eclipse.collections.api.block.function.Function,R)">flatCollectByte</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="typeParameters">&lt;R extends <a href="../../api/collection/primitive/MutableByteCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableByteCollection</a>&gt;</span>&nbsp;<span class="returnType">R</span>&nbsp;<span class="memberName">flatCollectByte</span>&#8203;(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? extends <a href="../../api/ByteIterable.html" title="interface in org.eclipse.collections.api">ByteIterable</a>&gt;&nbsp;function,
R&nbsp;target)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#flatCollectByte(org.eclipse.collections.api.block.function.Function,R)">RichIterable</a></code></span></div>
<div class="block">Same as flatCollect, only the results are collected into the target collection.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#flatCollectByte(org.eclipse.collections.api.block.function.Function,R)">flatCollectByte</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>function</code> - The <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function"><code>Function</code></a> to apply</dd>
<dd><code>target</code> - The collection into which results should be added.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>target</code>, which will contain a flattened collection of results produced by applying the given <code>function</code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../api/RichIterable.html#flatCollect(org.eclipse.collections.api.block.function.Function)"><code>RichIterable.flatCollect(Function)</code></a></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="collectChar(org.eclipse.collections.api.block.function.primitive.CharFunction,org.eclipse.collections.api.collection.primitive.MutableCharCollection)">
<!-- -->
</a><a id="collectChar(org.eclipse.collections.api.block.function.primitive.CharFunction,R)">collectChar</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="typeParameters">&lt;R extends <a href="../../api/collection/primitive/MutableCharCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableCharCollection</a>&gt;</span>&nbsp;<span class="returnType">R</span>&nbsp;<span class="memberName">collectChar</span>&#8203;(<span class="arguments"><a href="../../api/block/function/primitive/CharFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">CharFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;charFunction,
R&nbsp;target)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#collectChar(org.eclipse.collections.api.block.function.primitive.CharFunction,R)">RichIterable</a></code></span></div>
<div class="block">Same as <a href="../../api/RichIterable.html#collectChar(org.eclipse.collections.api.block.function.primitive.CharFunction)"><code>RichIterable.collectChar(CharFunction)</code></a>, except that the results are gathered into the specified <code>target</code>
collection.
<p>
Example using a Java 8 lambda expression:
<pre>
CharArrayList chars =
people.collectChar(person -&gt; person.getMiddleInitial(), new CharArrayList());
</pre>
<p>
Example using an anonymous inner class:
<pre>
CharArrayList chars =
people.collectChar(new CharFunction&lt;Person&gt;()
{
public char charValueOf(Person person)
{
return person.getMiddleInitial();
}
}, new CharArrayList());
</pre></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#collectChar(org.eclipse.collections.api.block.function.primitive.CharFunction,R)">collectChar</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#collectChar(org.eclipse.collections.api.block.function.primitive.CharFunction,R)">collectChar</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>charFunction</code> - a <a href="../../api/block/function/primitive/CharFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive"><code>CharFunction</code></a> to use as the collect transformation function</dd>
<dd><code>target</code> - the MutableCharCollection to append to for all elements in this <code>RichIterable</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>target</code>, which contains appended elements as a result of the collect transformation</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="flatCollectChar(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.collection.primitive.MutableCharCollection)">
<!-- -->
</a><a id="flatCollectChar(org.eclipse.collections.api.block.function.Function,R)">flatCollectChar</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="typeParameters">&lt;R extends <a href="../../api/collection/primitive/MutableCharCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableCharCollection</a>&gt;</span>&nbsp;<span class="returnType">R</span>&nbsp;<span class="memberName">flatCollectChar</span>&#8203;(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? extends <a href="../../api/CharIterable.html" title="interface in org.eclipse.collections.api">CharIterable</a>&gt;&nbsp;function,
R&nbsp;target)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#flatCollectChar(org.eclipse.collections.api.block.function.Function,R)">RichIterable</a></code></span></div>
<div class="block">Same as flatCollect, only the results are collected into the target collection.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#flatCollectChar(org.eclipse.collections.api.block.function.Function,R)">flatCollectChar</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>function</code> - The <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function"><code>Function</code></a> to apply</dd>
<dd><code>target</code> - The collection into which results should be added.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>target</code>, which will contain a flattened collection of results produced by applying the given <code>function</code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../api/RichIterable.html#flatCollect(org.eclipse.collections.api.block.function.Function)"><code>RichIterable.flatCollect(Function)</code></a></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="collectDouble(org.eclipse.collections.api.block.function.primitive.DoubleFunction,org.eclipse.collections.api.collection.primitive.MutableDoubleCollection)">
<!-- -->
</a><a id="collectDouble(org.eclipse.collections.api.block.function.primitive.DoubleFunction,R)">collectDouble</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="typeParameters">&lt;R extends <a href="../../api/collection/primitive/MutableDoubleCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableDoubleCollection</a>&gt;</span>&nbsp;<span class="returnType">R</span>&nbsp;<span class="memberName">collectDouble</span>&#8203;(<span class="arguments"><a href="../../api/block/function/primitive/DoubleFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">DoubleFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;doubleFunction,
R&nbsp;target)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#collectDouble(org.eclipse.collections.api.block.function.primitive.DoubleFunction,R)">RichIterable</a></code></span></div>
<div class="block">Same as <a href="../../api/RichIterable.html#collectDouble(org.eclipse.collections.api.block.function.primitive.DoubleFunction)"><code>RichIterable.collectDouble(DoubleFunction)</code></a>, except that the results are gathered into the specified <code>target</code>
collection.
<p>
Example using a Java 8 lambda expression:
<pre>
DoubleArrayList doubles =
people.collectDouble(person -&gt; person.getMilesFromNorthPole(), new DoubleArrayList());
</pre>
<p>
Example using an anonymous inner class:
<pre>
DoubleArrayList doubles =
people.collectDouble(new DoubleFunction&lt;Person&gt;()
{
public double doubleValueOf(Person person)
{
return person.getMilesFromNorthPole();
}
}, new DoubleArrayList());
</pre></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#collectDouble(org.eclipse.collections.api.block.function.primitive.DoubleFunction,R)">collectDouble</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#collectDouble(org.eclipse.collections.api.block.function.primitive.DoubleFunction,R)">collectDouble</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>doubleFunction</code> - a <a href="../../api/block/function/primitive/DoubleFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive"><code>DoubleFunction</code></a> to use as the collect transformation function</dd>
<dd><code>target</code> - the MutableDoubleCollection to append to for all elements in this <code>RichIterable</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>target</code>, which contains appended elements as a result of the collect transformation</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="flatCollectDouble(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.collection.primitive.MutableDoubleCollection)">
<!-- -->
</a><a id="flatCollectDouble(org.eclipse.collections.api.block.function.Function,R)">flatCollectDouble</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="typeParameters">&lt;R extends <a href="../../api/collection/primitive/MutableDoubleCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableDoubleCollection</a>&gt;</span>&nbsp;<span class="returnType">R</span>&nbsp;<span class="memberName">flatCollectDouble</span>&#8203;(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? extends <a href="../../api/DoubleIterable.html" title="interface in org.eclipse.collections.api">DoubleIterable</a>&gt;&nbsp;function,
R&nbsp;target)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#flatCollectDouble(org.eclipse.collections.api.block.function.Function,R)">RichIterable</a></code></span></div>
<div class="block">Same as flatCollect, only the results are collected into the target collection.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#flatCollectDouble(org.eclipse.collections.api.block.function.Function,R)">flatCollectDouble</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>function</code> - The <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function"><code>Function</code></a> to apply</dd>
<dd><code>target</code> - The collection into which results should be added.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>target</code>, which will contain a flattened collection of results produced by applying the given <code>function</code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../api/RichIterable.html#flatCollect(org.eclipse.collections.api.block.function.Function)"><code>RichIterable.flatCollect(Function)</code></a></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="collectFloat(org.eclipse.collections.api.block.function.primitive.FloatFunction,org.eclipse.collections.api.collection.primitive.MutableFloatCollection)">
<!-- -->
</a><a id="collectFloat(org.eclipse.collections.api.block.function.primitive.FloatFunction,R)">collectFloat</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="typeParameters">&lt;R extends <a href="../../api/collection/primitive/MutableFloatCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableFloatCollection</a>&gt;</span>&nbsp;<span class="returnType">R</span>&nbsp;<span class="memberName">collectFloat</span>&#8203;(<span class="arguments"><a href="../../api/block/function/primitive/FloatFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">FloatFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;floatFunction,
R&nbsp;target)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#collectFloat(org.eclipse.collections.api.block.function.primitive.FloatFunction,R)">RichIterable</a></code></span></div>
<div class="block">Same as <a href="../../api/RichIterable.html#collectFloat(org.eclipse.collections.api.block.function.primitive.FloatFunction)"><code>RichIterable.collectFloat(FloatFunction)</code></a>, except that the results are gathered into the specified <code>target</code>
collection.
<p>
Example using a Java 8 lambda expression:
<pre>
FloatArrayList floats =
people.collectFloat(person -&gt; person.getHeightInInches(), new FloatArrayList());
</pre>
<p>
Example using an anonymous inner class:
<pre>
FloatArrayList floats =
people.collectFloat(new FloatFunction&lt;Person&gt;()
{
public float floatValueOf(Person person)
{
return person.getHeightInInches();
}
}, new FloatArrayList());
</pre></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#collectFloat(org.eclipse.collections.api.block.function.primitive.FloatFunction,R)">collectFloat</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#collectFloat(org.eclipse.collections.api.block.function.primitive.FloatFunction,R)">collectFloat</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>floatFunction</code> - a <a href="../../api/block/function/primitive/FloatFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive"><code>FloatFunction</code></a> to use as the collect transformation function</dd>
<dd><code>target</code> - the MutableFloatCollection to append to for all elements in this <code>RichIterable</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>target</code>, which contains appended elements as a result of the collect transformation</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="flatCollectFloat(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.collection.primitive.MutableFloatCollection)">
<!-- -->
</a><a id="flatCollectFloat(org.eclipse.collections.api.block.function.Function,R)">flatCollectFloat</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="typeParameters">&lt;R extends <a href="../../api/collection/primitive/MutableFloatCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableFloatCollection</a>&gt;</span>&nbsp;<span class="returnType">R</span>&nbsp;<span class="memberName">flatCollectFloat</span>&#8203;(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? extends <a href="../../api/FloatIterable.html" title="interface in org.eclipse.collections.api">FloatIterable</a>&gt;&nbsp;function,
R&nbsp;target)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#flatCollectFloat(org.eclipse.collections.api.block.function.Function,R)">RichIterable</a></code></span></div>
<div class="block">Same as flatCollect, only the results are collected into the target collection.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#flatCollectFloat(org.eclipse.collections.api.block.function.Function,R)">flatCollectFloat</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>function</code> - The <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function"><code>Function</code></a> to apply</dd>
<dd><code>target</code> - The collection into which results should be added.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>target</code>, which will contain a flattened collection of results produced by applying the given <code>function</code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../api/RichIterable.html#flatCollect(org.eclipse.collections.api.block.function.Function)"><code>RichIterable.flatCollect(Function)</code></a></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="collectInt(org.eclipse.collections.api.block.function.primitive.IntFunction,org.eclipse.collections.api.collection.primitive.MutableIntCollection)">
<!-- -->
</a><a id="collectInt(org.eclipse.collections.api.block.function.primitive.IntFunction,R)">collectInt</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="typeParameters">&lt;R extends <a href="../../api/collection/primitive/MutableIntCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableIntCollection</a>&gt;</span>&nbsp;<span class="returnType">R</span>&nbsp;<span class="memberName">collectInt</span>&#8203;(<span class="arguments"><a href="../../api/block/function/primitive/IntFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">IntFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;intFunction,
R&nbsp;target)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#collectInt(org.eclipse.collections.api.block.function.primitive.IntFunction,R)">RichIterable</a></code></span></div>
<div class="block">Same as <a href="../../api/RichIterable.html#collectInt(org.eclipse.collections.api.block.function.primitive.IntFunction)"><code>RichIterable.collectInt(IntFunction)</code></a>, except that the results are gathered into the specified <code>target</code>
collection.
<p>
Example using a Java 8 lambda expression:
<pre>
IntArrayList ints =
people.collectInt(person -&gt; person.getAge(), new IntArrayList());
</pre>
<p>
Example using an anonymous inner class:
<pre>
IntArrayList ints =
people.collectInt(new IntFunction&lt;Person&gt;()
{
public int intValueOf(Person person)
{
return person.getAge();
}
}, new IntArrayList());
</pre></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#collectInt(org.eclipse.collections.api.block.function.primitive.IntFunction,R)">collectInt</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#collectInt(org.eclipse.collections.api.block.function.primitive.IntFunction,R)">collectInt</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>intFunction</code> - a <a href="../../api/block/function/primitive/IntFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive"><code>IntFunction</code></a> to use as the collect transformation function</dd>
<dd><code>target</code> - the MutableIntCollection to append to for all elements in this <code>RichIterable</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>target</code>, which contains appended elements as a result of the collect transformation</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="flatCollectInt(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.collection.primitive.MutableIntCollection)">
<!-- -->
</a><a id="flatCollectInt(org.eclipse.collections.api.block.function.Function,R)">flatCollectInt</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="typeParameters">&lt;R extends <a href="../../api/collection/primitive/MutableIntCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableIntCollection</a>&gt;</span>&nbsp;<span class="returnType">R</span>&nbsp;<span class="memberName">flatCollectInt</span>&#8203;(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? extends <a href="../../api/IntIterable.html" title="interface in org.eclipse.collections.api">IntIterable</a>&gt;&nbsp;function,
R&nbsp;target)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#flatCollectInt(org.eclipse.collections.api.block.function.Function,R)">RichIterable</a></code></span></div>
<div class="block">Same as flatCollect, only the results are collected into the target collection.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#flatCollectInt(org.eclipse.collections.api.block.function.Function,R)">flatCollectInt</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>function</code> - The <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function"><code>Function</code></a> to apply</dd>
<dd><code>target</code> - The collection into which results should be added.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>target</code>, which will contain a flattened collection of results produced by applying the given <code>function</code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../api/RichIterable.html#flatCollect(org.eclipse.collections.api.block.function.Function)"><code>RichIterable.flatCollect(Function)</code></a></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="collectLong(org.eclipse.collections.api.block.function.primitive.LongFunction,org.eclipse.collections.api.collection.primitive.MutableLongCollection)">
<!-- -->
</a><a id="collectLong(org.eclipse.collections.api.block.function.primitive.LongFunction,R)">collectLong</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="typeParameters">&lt;R extends <a href="../../api/collection/primitive/MutableLongCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableLongCollection</a>&gt;</span>&nbsp;<span class="returnType">R</span>&nbsp;<span class="memberName">collectLong</span>&#8203;(<span class="arguments"><a href="../../api/block/function/primitive/LongFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">LongFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;longFunction,
R&nbsp;target)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#collectLong(org.eclipse.collections.api.block.function.primitive.LongFunction,R)">RichIterable</a></code></span></div>
<div class="block">Same as <a href="../../api/RichIterable.html#collectLong(org.eclipse.collections.api.block.function.primitive.LongFunction)"><code>RichIterable.collectLong(LongFunction)</code></a>, except that the results are gathered into the specified <code>target</code>
collection.
<p>
Example using a Java 8 lambda expression:
<pre>
LongArrayList longs =
people.collectLong(person -&gt; person.getGuid(), new LongArrayList());
</pre>
<p>
Example using an anonymous inner class:
<pre>
LongArrayList longs =
people.collectLong(new LongFunction&lt;Person&gt;()
{
public long longValueOf(Person person)
{
return person.getGuid();
}
}, new LongArrayList());
</pre></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#collectLong(org.eclipse.collections.api.block.function.primitive.LongFunction,R)">collectLong</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#collectLong(org.eclipse.collections.api.block.function.primitive.LongFunction,R)">collectLong</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>longFunction</code> - a <a href="../../api/block/function/primitive/LongFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive"><code>LongFunction</code></a> to use as the collect transformation function</dd>
<dd><code>target</code> - the MutableLongCollection to append to for all elements in this <code>RichIterable</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>target</code>, which contains appended elements as a result of the collect transformation</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="flatCollectLong(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.collection.primitive.MutableLongCollection)">
<!-- -->
</a><a id="flatCollectLong(org.eclipse.collections.api.block.function.Function,R)">flatCollectLong</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="typeParameters">&lt;R extends <a href="../../api/collection/primitive/MutableLongCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableLongCollection</a>&gt;</span>&nbsp;<span class="returnType">R</span>&nbsp;<span class="memberName">flatCollectLong</span>&#8203;(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? extends <a href="../../api/LongIterable.html" title="interface in org.eclipse.collections.api">LongIterable</a>&gt;&nbsp;function,
R&nbsp;target)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#flatCollectLong(org.eclipse.collections.api.block.function.Function,R)">RichIterable</a></code></span></div>
<div class="block">Same as flatCollect, only the results are collected into the target collection.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#flatCollectLong(org.eclipse.collections.api.block.function.Function,R)">flatCollectLong</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>function</code> - The <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function"><code>Function</code></a> to apply</dd>
<dd><code>target</code> - The collection into which results should be added.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>target</code>, which will contain a flattened collection of results produced by applying the given <code>function</code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../api/RichIterable.html#flatCollect(org.eclipse.collections.api.block.function.Function)"><code>RichIterable.flatCollect(Function)</code></a></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="collectShort(org.eclipse.collections.api.block.function.primitive.ShortFunction,org.eclipse.collections.api.collection.primitive.MutableShortCollection)">
<!-- -->
</a><a id="collectShort(org.eclipse.collections.api.block.function.primitive.ShortFunction,R)">collectShort</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="typeParameters">&lt;R extends <a href="../../api/collection/primitive/MutableShortCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableShortCollection</a>&gt;</span>&nbsp;<span class="returnType">R</span>&nbsp;<span class="memberName">collectShort</span>&#8203;(<span class="arguments"><a href="../../api/block/function/primitive/ShortFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">ShortFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;shortFunction,
R&nbsp;target)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#collectShort(org.eclipse.collections.api.block.function.primitive.ShortFunction,R)">RichIterable</a></code></span></div>
<div class="block">Same as <a href="../../api/RichIterable.html#collectShort(org.eclipse.collections.api.block.function.primitive.ShortFunction)"><code>RichIterable.collectShort(ShortFunction)</code></a>, except that the results are gathered into the specified <code>target</code>
collection.
<p>
Example using a Java 8 lambda expression:
<pre>
ShortArrayList shorts =
people.collectShort(person -&gt; person.getNumberOfJunkMailItemsReceivedPerMonth, new ShortArrayList());
</pre>
<p>
Example using an anonymous inner class:
<pre>
ShortArrayList shorts =
people.collectShort(new ShortFunction&lt;Person&gt;()
{
public short shortValueOf(Person person)
{
return person.getNumberOfJunkMailItemsReceivedPerMonth;
}
}, new ShortArrayList());
</pre></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#collectShort(org.eclipse.collections.api.block.function.primitive.ShortFunction,R)">collectShort</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#collectShort(org.eclipse.collections.api.block.function.primitive.ShortFunction,R)">collectShort</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>shortFunction</code> - a <a href="../../api/block/function/primitive/ShortFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive"><code>ShortFunction</code></a> to use as the collect transformation function</dd>
<dd><code>target</code> - the MutableShortCollection to append to for all elements in this <code>RichIterable</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>target</code>, which contains appended elements as a result of the collect transformation</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="flatCollectShort(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.collection.primitive.MutableShortCollection)">
<!-- -->
</a><a id="flatCollectShort(org.eclipse.collections.api.block.function.Function,R)">flatCollectShort</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="typeParameters">&lt;R extends <a href="../../api/collection/primitive/MutableShortCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableShortCollection</a>&gt;</span>&nbsp;<span class="returnType">R</span>&nbsp;<span class="memberName">flatCollectShort</span>&#8203;(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? extends <a href="../../api/ShortIterable.html" title="interface in org.eclipse.collections.api">ShortIterable</a>&gt;&nbsp;function,
R&nbsp;target)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#flatCollectShort(org.eclipse.collections.api.block.function.Function,R)">RichIterable</a></code></span></div>
<div class="block">Same as flatCollect, only the results are collected into the target collection.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#flatCollectShort(org.eclipse.collections.api.block.function.Function,R)">flatCollectShort</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>function</code> - The <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function"><code>Function</code></a> to apply</dd>
<dd><code>target</code> - The collection into which results should be added.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>target</code>, which will contain a flattened collection of results produced by applying the given <code>function</code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../api/RichIterable.html#flatCollect(org.eclipse.collections.api.block.function.Function)"><code>RichIterable.flatCollect(Function)</code></a></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="groupBy(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.multimap.MutableMultimap)">
<!-- -->
</a><a id="groupBy(org.eclipse.collections.api.block.function.Function,R)">groupBy</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="typeParameters">&lt;V,&#8203;
R extends <a href="../../api/multimap/MutableMultimap.html" title="interface in org.eclipse.collections.api.multimap">MutableMultimap</a>&lt;V,&#8203;
<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&gt;</span>&nbsp;<span class="returnType">R</span>&nbsp;<span class="memberName">groupBy</span>&#8203;(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? extends V&gt;&nbsp;function,
R&nbsp;target)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#groupBy(org.eclipse.collections.api.block.function.Function,R)">RichIterable</a></code></span></div>
<div class="block">Same as <a href="../../api/RichIterable.html#groupBy(org.eclipse.collections.api.block.function.Function)"><code>RichIterable.groupBy(Function)</code></a>, except that the results are gathered into the specified <code>target</code>
multimap.
<p>
Example using a Java 8 method reference:
<pre>
FastListMultimap&lt;String, Person&gt; peopleByLastName =
people.groupBy(Person::getLastName, new FastListMultimap&lt;String, Person&gt;());
</pre>
<p>
Example using an anonymous inner class:
<pre>
FastListMultimap&lt;String, Person&gt; peopleByLastName =
people.groupBy(new Function&lt;Person, String&gt;()
{
public String valueOf(Person person)
{
return person.getLastName();
}
}, new FastListMultimap&lt;String, Person&gt;());
</pre></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#groupBy(org.eclipse.collections.api.block.function.Function,R)">groupBy</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#groupBy(org.eclipse.collections.api.block.function.Function,R)">groupBy</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="groupByEach(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.multimap.MutableMultimap)">
<!-- -->
</a><a id="groupByEach(org.eclipse.collections.api.block.function.Function,R)">groupByEach</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="typeParameters">&lt;V,&#8203;
R extends <a href="../../api/multimap/MutableMultimap.html" title="interface in org.eclipse.collections.api.multimap">MutableMultimap</a>&lt;V,&#8203;
<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&gt;</span>&nbsp;<span class="returnType">R</span>&nbsp;<span class="memberName">groupByEach</span>&#8203;(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Iterable</a>&lt;V&gt;&gt;&nbsp;function,
R&nbsp;target)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#groupByEach(org.eclipse.collections.api.block.function.Function,R)">RichIterable</a></code></span></div>
<div class="block">Same as <a href="../../api/RichIterable.html#groupByEach(org.eclipse.collections.api.block.function.Function)"><code>RichIterable.groupByEach(Function)</code></a>, except that the results are gathered into the specified <code>target</code>
multimap.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#groupByEach(org.eclipse.collections.api.block.function.Function,R)">groupByEach</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#groupByEach(org.eclipse.collections.api.block.function.Function,R)">groupByEach</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="sumOfInt(org.eclipse.collections.api.block.function.primitive.IntFunction)">sumOfInt</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">long</span>&nbsp;<span class="memberName">sumOfInt</span>&#8203;(<span class="arguments"><a href="../../api/block/function/primitive/IntFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">IntFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;function)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#sumOfInt(org.eclipse.collections.api.block.function.primitive.IntFunction)">RichIterable</a></code></span></div>
<div class="block">Returns the final long result of evaluating function for each element of the iterable and adding the results
together.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#sumOfInt(org.eclipse.collections.api.block.function.primitive.IntFunction)">sumOfInt</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#sumOfInt(org.eclipse.collections.api.block.function.primitive.IntFunction)">sumOfInt</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="sumOfFloat(org.eclipse.collections.api.block.function.primitive.FloatFunction)">sumOfFloat</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">double</span>&nbsp;<span class="memberName">sumOfFloat</span>&#8203;(<span class="arguments"><a href="../../api/block/function/primitive/FloatFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">FloatFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;function)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#sumOfFloat(org.eclipse.collections.api.block.function.primitive.FloatFunction)">RichIterable</a></code></span></div>
<div class="block">Returns the final double result of evaluating function for each element of the iterable and adding the results
together. It uses Kahan summation algorithm to reduce numerical error.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#sumOfFloat(org.eclipse.collections.api.block.function.primitive.FloatFunction)">sumOfFloat</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#sumOfFloat(org.eclipse.collections.api.block.function.primitive.FloatFunction)">sumOfFloat</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="sumOfLong(org.eclipse.collections.api.block.function.primitive.LongFunction)">sumOfLong</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">long</span>&nbsp;<span class="memberName">sumOfLong</span>&#8203;(<span class="arguments"><a href="../../api/block/function/primitive/LongFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">LongFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;function)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#sumOfLong(org.eclipse.collections.api.block.function.primitive.LongFunction)">RichIterable</a></code></span></div>
<div class="block">Returns the final long result of evaluating function for each element of the iterable and adding the results
together.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#sumOfLong(org.eclipse.collections.api.block.function.primitive.LongFunction)">sumOfLong</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#sumOfLong(org.eclipse.collections.api.block.function.primitive.LongFunction)">sumOfLong</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="sumOfDouble(org.eclipse.collections.api.block.function.primitive.DoubleFunction)">sumOfDouble</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">double</span>&nbsp;<span class="memberName">sumOfDouble</span>&#8203;(<span class="arguments"><a href="../../api/block/function/primitive/DoubleFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">DoubleFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;function)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#sumOfDouble(org.eclipse.collections.api.block.function.primitive.DoubleFunction)">RichIterable</a></code></span></div>
<div class="block">Returns the final double result of evaluating function for each element of the iterable and adding the results
together. It uses Kahan summation algorithm to reduce numerical error.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#sumOfDouble(org.eclipse.collections.api.block.function.primitive.DoubleFunction)">sumOfDouble</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#sumOfDouble(org.eclipse.collections.api.block.function.primitive.DoubleFunction)">sumOfDouble</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="injectInto(java.lang.Object,org.eclipse.collections.api.block.function.Function2)">
<!-- -->
</a><a id="injectInto(IV,org.eclipse.collections.api.block.function.Function2)">injectInto</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="typeParameters">&lt;IV&gt;</span>&nbsp;<span class="returnType">IV</span>&nbsp;<span class="memberName">injectInto</span>&#8203;(<span class="arguments">IV&nbsp;injectedValue,
<a href="../../api/block/function/Function2.html" title="interface in org.eclipse.collections.api.block.function">Function2</a>&lt;? super IV,&#8203;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? extends IV&gt;&nbsp;function)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#injectInto(IV,org.eclipse.collections.api.block.function.Function2)">RichIterable</a></code></span></div>
<div class="block">Returns the final result of evaluating function using each element of the iterable and the previous evaluation
result as the parameters. The injected value is used for the first parameter of the first evaluation, and the current
item in the iterable is used as the second parameter. This method is commonly called fold or sometimes reduce.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#injectInto(IV,org.eclipse.collections.api.block.function.Function2)">injectInto</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#injectInto(IV,org.eclipse.collections.api.block.function.Function2)">injectInto</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="injectInto(int,org.eclipse.collections.api.block.function.primitive.IntObjectToIntFunction)">injectInto</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">int</span>&nbsp;<span class="memberName">injectInto</span>&#8203;(<span class="arguments">int&nbsp;injectedValue,
<a href="../../api/block/function/primitive/IntObjectToIntFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">IntObjectToIntFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;function)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#injectInto(int,org.eclipse.collections.api.block.function.primitive.IntObjectToIntFunction)">RichIterable</a></code></span></div>
<div class="block">Returns the final int result of evaluating function using each element of the iterable and the previous evaluation
result as the parameters. The injected value is used for the first parameter of the first evaluation, and the current
item in the iterable is used as the second parameter.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#injectInto(int,org.eclipse.collections.api.block.function.primitive.IntObjectToIntFunction)">injectInto</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#injectInto(int,org.eclipse.collections.api.block.function.primitive.IntObjectToIntFunction)">injectInto</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="injectInto(long,org.eclipse.collections.api.block.function.primitive.LongObjectToLongFunction)">injectInto</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">long</span>&nbsp;<span class="memberName">injectInto</span>&#8203;(<span class="arguments">long&nbsp;injectedValue,
<a href="../../api/block/function/primitive/LongObjectToLongFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">LongObjectToLongFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;function)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#injectInto(long,org.eclipse.collections.api.block.function.primitive.LongObjectToLongFunction)">RichIterable</a></code></span></div>
<div class="block">Returns the final long result of evaluating function using each element of the iterable and the previous evaluation
result as the parameters. The injected value is used for the first parameter of the first evaluation, and the current
item in the iterable is used as the second parameter.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#injectInto(long,org.eclipse.collections.api.block.function.primitive.LongObjectToLongFunction)">injectInto</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#injectInto(long,org.eclipse.collections.api.block.function.primitive.LongObjectToLongFunction)">injectInto</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="injectInto(double,org.eclipse.collections.api.block.function.primitive.DoubleObjectToDoubleFunction)">injectInto</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">double</span>&nbsp;<span class="memberName">injectInto</span>&#8203;(<span class="arguments">double&nbsp;injectedValue,
<a href="../../api/block/function/primitive/DoubleObjectToDoubleFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">DoubleObjectToDoubleFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;function)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#injectInto(double,org.eclipse.collections.api.block.function.primitive.DoubleObjectToDoubleFunction)">RichIterable</a></code></span></div>
<div class="block">Returns the final double result of evaluating function using each element of the iterable and the previous evaluation
result as the parameters. The injected value is used for the first parameter of the first evaluation, and the current
item in the iterable is used as the second parameter.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#injectInto(double,org.eclipse.collections.api.block.function.primitive.DoubleObjectToDoubleFunction)">injectInto</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#injectInto(double,org.eclipse.collections.api.block.function.primitive.DoubleObjectToDoubleFunction)">injectInto</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="injectInto(float,org.eclipse.collections.api.block.function.primitive.FloatObjectToFloatFunction)">injectInto</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">float</span>&nbsp;<span class="memberName">injectInto</span>&#8203;(<span class="arguments">float&nbsp;injectedValue,
<a href="../../api/block/function/primitive/FloatObjectToFloatFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">FloatObjectToFloatFunction</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;function)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#injectInto(float,org.eclipse.collections.api.block.function.primitive.FloatObjectToFloatFunction)">RichIterable</a></code></span></div>
<div class="block">Returns the final float result of evaluating function using each element of the iterable and the previous evaluation
result as the parameters. The injected value is used for the first parameter of the first evaluation, and the current
item in the iterable is used as the second parameter.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#injectInto(float,org.eclipse.collections.api.block.function.primitive.FloatObjectToFloatFunction)">injectInto</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#injectInto(float,org.eclipse.collections.api.block.function.primitive.FloatObjectToFloatFunction)">injectInto</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="injectIntoWith(java.lang.Object,org.eclipse.collections.api.block.function.Function3,java.lang.Object)">
<!-- -->
</a><a id="injectIntoWith(IV,org.eclipse.collections.api.block.function.Function3,P)">injectIntoWith</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="typeParameters">&lt;IV,&#8203;
P&gt;</span>&nbsp;<span class="returnType">IV</span>&nbsp;<span class="memberName">injectIntoWith</span>&#8203;(<span class="arguments">IV&nbsp;injectedValue,
<a href="../../api/block/function/Function3.html" title="interface in org.eclipse.collections.api.block.function">Function3</a>&lt;? super IV,&#8203;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>,&#8203;? super P,&#8203;? extends IV&gt;&nbsp;function,
P&nbsp;parameter)</span></div>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="toStringOfItemToCount()">toStringOfItemToCount</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></span>&nbsp;<span class="memberName">toStringOfItemToCount</span>()</div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/bag/Bag.html#toStringOfItemToCount()">Bag</a></code></span></div>
<div class="block">Returns a string representation of this bag. The string representation consists of a list of element-count mappings.
<pre>
Assert.assertEquals("{1=1, 2=2, 3=3}", Bags.mutable.with(1, 2, 2, 3, 3, 3).toStringOfItemToCount());
</pre>
This string representation is similar to <a href="https://docs.oracle.com/javase/8/docs/api/java/util/AbstractMap.html?is-external=true#toString()" title="class or interface in java.util" class="externalLink"><code>AbstractMap.toString()</code></a>, not <a href="../../api/RichIterable.html#toString()"><code>RichIterable.toString()</code></a>,
whereas the <code>toString()</code> implementation for a Bag is consistent with <a href="../../api/RichIterable.html#toString()"><code>RichIterable.toString()</code></a>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/bag/Bag.html#toStringOfItemToCount()">toStringOfItemToCount</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/bag/Bag.html" title="interface in org.eclipse.collections.api.bag">Bag</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a string representation of this bag</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="toList()">toList</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType"><a href="../../api/list/MutableList.html" title="interface in org.eclipse.collections.api.list">MutableList</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</span>&nbsp;<span class="memberName">toList</span>()</div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#toList()">RichIterable</a></code></span></div>
<div class="block">Converts the collection to a MutableList implementation.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#toList()">toList</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#toList()">toList</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="toSortedList(java.util.Comparator)">toSortedList</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType"><a href="../../api/list/MutableList.html" title="interface in org.eclipse.collections.api.list">MutableList</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</span>&nbsp;<span class="memberName">toSortedList</span>&#8203;(<span class="arguments"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util" class="externalLink">Comparator</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;comparator)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#toSortedList(java.util.Comparator)">RichIterable</a></code></span></div>
<div class="block">Converts the collection to a MutableList implementation and sorts it using the specified comparator.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#toSortedList(java.util.Comparator)">toSortedList</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="toSet()">toSet</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType"><a href="../../api/set/MutableSet.html" title="interface in org.eclipse.collections.api.set">MutableSet</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</span>&nbsp;<span class="memberName">toSet</span>()</div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#toSet()">RichIterable</a></code></span></div>
<div class="block">Converts the collection to a MutableSet implementation.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#toSet()">toSet</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#toSet()">toSet</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="toSortedSet()">toSortedSet</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType"><a href="../../api/set/sorted/MutableSortedSet.html" title="interface in org.eclipse.collections.api.set.sorted">MutableSortedSet</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</span>&nbsp;<span class="memberName">toSortedSet</span>()</div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#toSortedSet()">RichIterable</a></code></span></div>
<div class="block">Converts the collection to a MutableSortedSet implementation and sorts it using the natural order of the
elements.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#toSortedSet()">toSortedSet</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#toSortedSet()">toSortedSet</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="toSortedSet(java.util.Comparator)">toSortedSet</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType"><a href="../../api/set/sorted/MutableSortedSet.html" title="interface in org.eclipse.collections.api.set.sorted">MutableSortedSet</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</span>&nbsp;<span class="memberName">toSortedSet</span>&#8203;(<span class="arguments"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util" class="externalLink">Comparator</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;comparator)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#toSortedSet(java.util.Comparator)">RichIterable</a></code></span></div>
<div class="block">Converts the collection to a MutableSortedSet implementation and sorts it using the specified comparator.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#toSortedSet(java.util.Comparator)">toSortedSet</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#toSortedSet(java.util.Comparator)">toSortedSet</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="toBag()">toBag</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType"><a href="../../api/bag/MutableBag.html" title="interface in org.eclipse.collections.api.bag">MutableBag</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</span>&nbsp;<span class="memberName">toBag</span>()</div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#toBag()">RichIterable</a></code></span></div>
<div class="block">Converts the collection to the default MutableBag implementation.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#toBag()">toBag</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#toBag()">toBag</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="toSortedBag()">toSortedBag</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType"><a href="../../api/bag/sorted/MutableSortedBag.html" title="interface in org.eclipse.collections.api.bag.sorted">MutableSortedBag</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</span>&nbsp;<span class="memberName">toSortedBag</span>()</div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#toSortedBag()">RichIterable</a></code></span></div>
<div class="block">Converts the collection to a MutableSortedBag implementation and sorts it using the natural order of the
elements.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#toSortedBag()">toSortedBag</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#toSortedBag()">toSortedBag</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="toSortedBag(java.util.Comparator)">toSortedBag</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType"><a href="../../api/bag/sorted/MutableSortedBag.html" title="interface in org.eclipse.collections.api.bag.sorted">MutableSortedBag</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</span>&nbsp;<span class="memberName">toSortedBag</span>&#8203;(<span class="arguments"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util" class="externalLink">Comparator</a>&lt;? super <a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;&nbsp;comparator)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../api/RichIterable.html#toSortedBag(java.util.Comparator)">RichIterable</a></code></span></div>
<div class="block">Converts the collection to the MutableSortedBag implementation and sorts it using the specified comparator.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../api/RichIterable.html#toSortedBag(java.util.Comparator)">toSortedBag</a></code>&nbsp;in interface&nbsp;<code><a href="../../api/RichIterable.html" title="interface in org.eclipse.collections.api">RichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../AbstractRichIterable.html#toSortedBag(java.util.Comparator)">toSortedBag</a></code>&nbsp;in class&nbsp;<code><a href="../AbstractRichIterable.html" title="class in org.eclipse.collections.impl">AbstractRichIterable</a>&lt;<a href="AbstractBag.html" title="type parameter in AbstractBag">T</a>&gt;</code></dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
</div>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/AbstractBag.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 2004&#x2013;2020. All rights reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>