| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (14.0.2) on Thu Aug 20 21:25:36 CDT 2020 --> |
| <title>Collectors2 (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.collector, class: Collectors2"> |
| <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":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9,"i27":9,"i28":9,"i29":9,"i30":9,"i31":9,"i32":9,"i33":9,"i34":9,"i35":9,"i36":9,"i37":9,"i38":9,"i39":9,"i40":9,"i41":9,"i42":9,"i43":9,"i44":9,"i45":9,"i46":9,"i47":9,"i48":9,"i49":9,"i50":9,"i51":9,"i52":9,"i53":9,"i54":9,"i55":9,"i56":9,"i57":9,"i58":9,"i59":9,"i60":9,"i61":9,"i62":9,"i63":9,"i64":9,"i65":9,"i66":9,"i67":9,"i68":9,"i69":9,"i70":9,"i71":9,"i72":9,"i73":9,"i74":9,"i75":9,"i76":9,"i77":9,"i78":9}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static 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/Collectors2.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: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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> <a href="package-summary.html">org.eclipse.collections.impl.collector</a></div> |
| <h1 title="Class Collectors2" class="title">Class Collectors2</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">org.eclipse.collections.impl.collector.Collectors2</div> |
| </div> |
| <section class="description"> |
| <hr> |
| <pre>public final class <span class="typeNameLabel">Collectors2</span> |
| extends <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></pre> |
| <div class="block"><p>A set of Collectors for Eclipse Collections types and algorithms.</p> |
| |
| <p>Includes converter Collectors to{Immutable}{Sorted}{List/Set/Bag/Map/BiMap/Multimap}.<br> |
| Includes Collectors for select, reject, partition.<br> |
| Includes Collectors for collect, collect{Boolean/Byte/Char/Short/Int/Float/Long/Double}.<br> |
| Includes Collectors for makeString, zip, chunk.<br> |
| Includes Collectors for sumBy{Int/Float/Long/Double}.</p> |
| |
| <p>Use these Collectors with @<a href="../../api/RichIterable.html#reduceInPlace(java.util.stream.Collector)"><code>RichIterable.reduceInPlace(Collector)</code></a> and @<a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Stream.html?is-external=true#collect(java.util.stream.Collector)" title="class or interface in java.util.stream" class="externalLink"><code>Stream.collect(Collector)</code></a>.</p></div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>8.0</dd> |
| </dl> |
| </section> |
| <section class="summary"> |
| <ul class="blockList"> |
| <!-- ========== 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="t1" class="tableTab" onclick="show(1);">Static 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>static <T,​ |
| K,​ |
| R extends <a href="../../api/map/MutableMapIterable.html" title="interface in org.eclipse.collections.api.map">MutableMapIterable</a><K,​ |
| T>><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#aggregateBy(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function0,org.eclipse.collections.api.block.function.Function2,java.util.function.Supplier)">aggregateBy</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy, |
| <a href="../../api/block/function/Function0.html" title="interface in org.eclipse.collections.api.block.function">Function0</a><? extends T> zeroValueFactory, |
| <a href="../../api/block/function/Function2.html" title="interface in org.eclipse.collections.api.block.function">Function2</a><? super T,​? super T,​? extends T> aggregator, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</code></th> |
| <td class="colLast"> |
| <div class="block">Groups the elements using the <code>groupBy</code> function and all the elements that map to the same key are |
| aggregated together using the <code>aggregator</code> function.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i1"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/list/MutableList.html" title="interface in org.eclipse.collections.api.list">MutableList</a><<a href="../../api/list/MutableList.html" title="interface in org.eclipse.collections.api.list">MutableList</a><T>>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#chunk(int)">chunk</a></span>​(int size)</code></th> |
| <td class="colLast"> |
| <div class="block">Partitions elements in fixed size chunks.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i2"> |
| <td class="colFirst"><code>static <T,​ |
| V,​ |
| 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><V>><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#collect(org.eclipse.collections.api.block.function.Function,java.util.function.Supplier)">collect</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> function, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a new collection with the results of applying the specified function on each element of the source |
| collection.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i3"> |
| <td class="colFirst"><code>static <T,​ |
| R extends <a href="../../api/collection/primitive/MutableBooleanCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableBooleanCollection</a>><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#collectBoolean(org.eclipse.collections.api.block.function.primitive.BooleanFunction,java.util.function.Supplier)">collectBoolean</a></span>​(<a href="../../api/block/function/primitive/BooleanFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">BooleanFunction</a><? super T> function, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a new MutableBooleanCollection with the results of applying the specified BooleanFunction on each element |
| of the source.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i4"> |
| <td class="colFirst"><code>static <T,​ |
| R extends <a href="../../api/collection/primitive/MutableByteCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableByteCollection</a>><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#collectByte(org.eclipse.collections.api.block.function.primitive.ByteFunction,java.util.function.Supplier)">collectByte</a></span>​(<a href="../../api/block/function/primitive/ByteFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">ByteFunction</a><? super T> function, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a new MutableByteCollection with the results of applying the specified ByteFunction on each element |
| of the source.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i5"> |
| <td class="colFirst"><code>static <T,​ |
| R extends <a href="../../api/collection/primitive/MutableCharCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableCharCollection</a>><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#collectChar(org.eclipse.collections.api.block.function.primitive.CharFunction,java.util.function.Supplier)">collectChar</a></span>​(<a href="../../api/block/function/primitive/CharFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">CharFunction</a><? super T> function, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a new MutableCharCollection with the results of applying the specified CharFunction on each element |
| of the source.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i6"> |
| <td class="colFirst"><code>static <T,​ |
| R extends <a href="../../api/collection/primitive/MutableDoubleCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableDoubleCollection</a>><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#collectDouble(org.eclipse.collections.api.block.function.primitive.DoubleFunction,java.util.function.Supplier)">collectDouble</a></span>​(<a href="../../api/block/function/primitive/DoubleFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">DoubleFunction</a><? super T> function, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a new MutableDoubleCollection with the results of applying the specified DoubleFunction on each element |
| of the source.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i7"> |
| <td class="colFirst"><code>static <T,​ |
| R extends <a href="../../api/collection/primitive/MutableFloatCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableFloatCollection</a>><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#collectFloat(org.eclipse.collections.api.block.function.primitive.FloatFunction,java.util.function.Supplier)">collectFloat</a></span>​(<a href="../../api/block/function/primitive/FloatFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">FloatFunction</a><? super T> function, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a new MutableFloatCollection with the results of applying the specified FloatFunction on each element |
| of the source.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i8"> |
| <td class="colFirst"><code>static <T,​ |
| R extends <a href="../../api/collection/primitive/MutableIntCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableIntCollection</a>><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#collectInt(org.eclipse.collections.api.block.function.primitive.IntFunction,java.util.function.Supplier)">collectInt</a></span>​(<a href="../../api/block/function/primitive/IntFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">IntFunction</a><? super T> function, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a new MutableIntCollection with the results of applying the specified IntFunction on each element |
| of the source.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i9"> |
| <td class="colFirst"><code>static <T,​ |
| R extends <a href="../../api/collection/primitive/MutableLongCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableLongCollection</a>><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#collectLong(org.eclipse.collections.api.block.function.primitive.LongFunction,java.util.function.Supplier)">collectLong</a></span>​(<a href="../../api/block/function/primitive/LongFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">LongFunction</a><? super T> function, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a new MutableLongCollection with the results of applying the specified LongFunction on each element |
| of the source.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i10"> |
| <td class="colFirst"><code>static <T,​ |
| R extends <a href="../../api/collection/primitive/MutableShortCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableShortCollection</a>><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#collectShort(org.eclipse.collections.api.block.function.primitive.ShortFunction,java.util.function.Supplier)">collectShort</a></span>​(<a href="../../api/block/function/primitive/ShortFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">ShortFunction</a><? super T> function, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a new MutableShortCollection with the results of applying the specified ShortFunction on each element |
| of the source.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i11"> |
| <td class="colFirst"><code>static <T,​ |
| P,​ |
| V,​ |
| 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><V>><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#collectWith(org.eclipse.collections.api.block.function.Function2,P,java.util.function.Supplier)">collectWith</a></span>​(<a href="../../api/block/function/Function2.html" title="interface in org.eclipse.collections.api.block.function">Function2</a><? super T,​? super P,​? extends V> function, |
| P parameter, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a new collection with the results of applying the specified function on each element of the source |
| collection with the specified parameter.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i12"> |
| <td class="colFirst"><code>static <T,​ |
| K> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/bag/MutableBag.html" title="interface in org.eclipse.collections.api.bag">MutableBag</a><K>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#countBy(org.eclipse.collections.api.block.function.Function)">countBy</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> function)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the counts of all of the values returned by applying the specified function to each |
| item of the Stream.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i13"> |
| <td class="colFirst"><code>static <T,​ |
| K> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/bag/MutableBag.html" title="interface in org.eclipse.collections.api.bag">MutableBag</a><K>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#countByEach(org.eclipse.collections.api.block.function.Function)">countByEach</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? 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><K>> function)</code></th> |
| <td class="colLast"> |
| <div class="block">Same as <a href="#countBy(org.eclipse.collections.api.block.function.Function)"><code>countBy(Function)</code></a>, except the result of applying the specified function will return a |
| collection of keys for each value.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i14"> |
| <td class="colFirst"><code>static <T,​ |
| V,​ |
| 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><V>><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#flatCollect(org.eclipse.collections.api.block.function.Function,java.util.function.Supplier)">flatCollect</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? 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><V>> function, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</code></th> |
| <td class="colLast"> |
| <div class="block">The method <code>flatCollect</code> is a special case of <a href="#collect(org.eclipse.collections.api.block.function.Function,java.util.function.Supplier)"><code>collect(Function, Supplier)</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i15"> |
| <td class="colFirst"><code>static <T,​ |
| K,​ |
| R extends <a href="../../api/multimap/MutableMultimap.html" title="interface in org.eclipse.collections.api.multimap">MutableMultimap</a><K,​ |
| T>><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#groupBy(org.eclipse.collections.api.block.function.Function,java.util.function.Supplier)">groupBy</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as an MutableMultimap grouping each element using the specified groupBy Function.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i16"> |
| <td class="colFirst"><code>static <T,​ |
| K,​ |
| V,​ |
| R extends <a href="../../api/multimap/MutableMultimap.html" title="interface in org.eclipse.collections.api.multimap">MutableMultimap</a><K,​ |
| V>><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#groupByAndCollect(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function,java.util.function.Supplier)">groupByAndCollect</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy, |
| <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> valueFunction, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as an MutableMultimap grouping each element using the specified groupBy Function and |
| converting each element to the value returned by applying the specified Function valueFunction.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i17"> |
| <td class="colFirst"><code>static <T,​ |
| K,​ |
| R extends <a href="../../api/multimap/MutableMultimap.html" title="interface in org.eclipse.collections.api.multimap">MutableMultimap</a><K,​ |
| T>><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#groupByEach(org.eclipse.collections.api.block.function.Function,java.util.function.Supplier)">groupByEach</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? 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><K>> groupBy, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</code></th> |
| <td class="colLast"> |
| <div class="block">Same as <a href="#groupBy(org.eclipse.collections.api.block.function.Function,java.util.function.Supplier)"><code>groupBy(Function, Supplier)</code></a>, except the result of evaluating groupBy function will return a |
| collection of keys for each value.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i18"> |
| <td class="colFirst"><code>static <T,​ |
| K,​ |
| R extends <a href="../../api/map/MutableMapIterable.html" title="interface in org.eclipse.collections.api.map">MutableMapIterable</a><K,​ |
| T>><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#groupByUniqueKey(org.eclipse.collections.api.block.function.Function,java.util.function.Supplier)">groupByUniqueKey</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</code></th> |
| <td class="colLast"> |
| <div class="block">Same as <a href="#groupBy(org.eclipse.collections.api.block.function.Function,java.util.function.Supplier)"><code>groupBy(Function, Supplier)</code></a>, except the result of evaluating groupBy function should return a |
| unique key, or else an exception is thrown.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i19"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<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="#makeString()">makeString</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a String composed of elements separated by ", ".</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i20"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<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="#makeString(java.lang.CharSequence)">makeString</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a> separator)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a String composed of elements separated by the specified separator.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i21"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<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="#makeString(java.lang.CharSequence,java.lang.CharSequence,java.lang.CharSequence)">makeString</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a> start, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a> separator, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a> end)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a String composed of elements separated by the specified separator and beginning with start |
| String and ending with end String.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i22"> |
| <td class="colFirst"><code>static <T,​ |
| R extends <a href="../../api/partition/PartitionMutableCollection.html" title="interface in org.eclipse.collections.api.partition">PartitionMutableCollection</a><T>><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#partition(org.eclipse.collections.api.block.predicate.Predicate,java.util.function.Supplier)">partition</a></span>​(<a href="../../api/block/predicate/Predicate.html" title="interface in org.eclipse.collections.api.block.predicate">Predicate</a><? super T> predicate, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns all elements of the stream split into a PartitionMutableCollection after evaluating the predicate.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i23"> |
| <td class="colFirst"><code>static <T,​ |
| P,​ |
| R extends <a href="../../api/partition/PartitionMutableCollection.html" title="interface in org.eclipse.collections.api.partition">PartitionMutableCollection</a><T>><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#partitionWith(org.eclipse.collections.api.block.predicate.Predicate2,P,java.util.function.Supplier)">partitionWith</a></span>​(<a href="../../api/block/predicate/Predicate2.html" title="interface in org.eclipse.collections.api.block.predicate">Predicate2</a><? super T,​? super P> predicate, |
| P parameter, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns all elements of the stream split into a PartitionMutableCollection after evaluating the predicate.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i24"> |
| <td class="colFirst"><code>static <T,​ |
| 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><T>><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#reject(org.eclipse.collections.api.block.predicate.Predicate,java.util.function.Supplier)">reject</a></span>​(<a href="../../api/block/predicate/Predicate.html" title="interface in org.eclipse.collections.api.block.predicate">Predicate</a><? super T> predicate, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns all elements of the stream that return false when evaluating the predicate.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i25"> |
| <td class="colFirst"><code>static <T,​ |
| P,​ |
| 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><T>><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rejectWith(org.eclipse.collections.api.block.predicate.Predicate2,P,java.util.function.Supplier)">rejectWith</a></span>​(<a href="../../api/block/predicate/Predicate2.html" title="interface in org.eclipse.collections.api.block.predicate">Predicate2</a><? super T,​? super P> predicate, |
| P parameter, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns all elements of the stream that return false when evaluating the predicate with the parameter.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i26"> |
| <td class="colFirst"><code>static <T,​ |
| 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><T>><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#select(org.eclipse.collections.api.block.predicate.Predicate,java.util.function.Supplier)">select</a></span>​(<a href="../../api/block/predicate/Predicate.html" title="interface in org.eclipse.collections.api.block.predicate">Predicate</a><? super T> predicate, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns all elements of the stream that return true when evaluating the predicate.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i27"> |
| <td class="colFirst"><code>static <T,​ |
| P,​ |
| 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><T>><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#selectWith(org.eclipse.collections.api.block.predicate.Predicate2,P,java.util.function.Supplier)">selectWith</a></span>​(<a href="../../api/block/predicate/Predicate2.html" title="interface in org.eclipse.collections.api.block.predicate">Predicate2</a><? super T,​? super P> predicate, |
| P parameter, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns all elements of the stream that return true when evaluating the predicate with the parameter.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i28"> |
| <td class="colFirst"><code>static <T,​ |
| V> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/map/MutableMap.html" title="interface in org.eclipse.collections.api.map">MutableMap</a><V,​<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math" class="externalLink">BigDecimal</a>>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sumByBigDecimal(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">sumByBigDecimal</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> groupBy, |
| <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math" class="externalLink">BigDecimal</a>> function)</code></th> |
| <td class="colLast"> |
| <div class="block">Groups and sums the values using the two specified functions.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i29"> |
| <td class="colFirst"><code>static <T,​ |
| V> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/map/MutableMap.html" title="interface in org.eclipse.collections.api.map">MutableMap</a><V,​<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math" class="externalLink">BigInteger</a>>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sumByBigInteger(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">sumByBigInteger</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> groupBy, |
| <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math" class="externalLink">BigInteger</a>> function)</code></th> |
| <td class="colLast"> |
| <div class="block">Groups and sums the values using the two specified functions.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i30"> |
| <td class="colFirst"><code>static <T,​ |
| V> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/map/primitive/MutableObjectDoubleMap.html" title="interface in org.eclipse.collections.api.map.primitive">MutableObjectDoubleMap</a><V>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sumByDouble(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.primitive.DoubleFunction)">sumByDouble</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> groupBy, |
| <a href="../../api/block/function/primitive/DoubleFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">DoubleFunction</a><? super T> function)</code></th> |
| <td class="colLast"> |
| <div class="block">Groups and sums the values using the two specified functions.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i31"> |
| <td class="colFirst"><code>static <T,​ |
| V> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/map/primitive/MutableObjectDoubleMap.html" title="interface in org.eclipse.collections.api.map.primitive">MutableObjectDoubleMap</a><V>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sumByFloat(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.primitive.FloatFunction)">sumByFloat</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> groupBy, |
| <a href="../../api/block/function/primitive/FloatFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">FloatFunction</a><? super T> function)</code></th> |
| <td class="colLast"> |
| <div class="block">Groups and sums the values using the two specified functions.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i32"> |
| <td class="colFirst"><code>static <T,​ |
| V> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/map/primitive/MutableObjectLongMap.html" title="interface in org.eclipse.collections.api.map.primitive">MutableObjectLongMap</a><V>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sumByInt(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.primitive.IntFunction)">sumByInt</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> groupBy, |
| <a href="../../api/block/function/primitive/IntFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">IntFunction</a><? super T> function)</code></th> |
| <td class="colLast"> |
| <div class="block">Groups and sums the values using the two specified functions.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i33"> |
| <td class="colFirst"><code>static <T,​ |
| V> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/map/primitive/MutableObjectLongMap.html" title="interface in org.eclipse.collections.api.map.primitive">MutableObjectLongMap</a><V>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sumByLong(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.primitive.LongFunction)">sumByLong</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> groupBy, |
| <a href="../../api/block/function/primitive/LongFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">LongFunction</a><? super T> function)</code></th> |
| <td class="colLast"> |
| <div class="block">Groups and sums the values using the two specified functions.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i34"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="BigDecimalSummaryStatistics.html" title="class in org.eclipse.collections.impl.collector">BigDecimalSummaryStatistics</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#summarizingBigDecimal(org.eclipse.collections.api.block.function.Function)">summarizingBigDecimal</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math" class="externalLink">BigDecimal</a>> function)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a BigDecimalSummaryStatistics applying the specified function to each element of the stream or collection.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i35"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="BigIntegerSummaryStatistics.html" title="class in org.eclipse.collections.impl.collector">BigIntegerSummaryStatistics</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#summarizingBigInteger(org.eclipse.collections.api.block.function.Function)">summarizingBigInteger</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math" class="externalLink">BigInteger</a>> function)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a BigIntegerSummaryStatistics applying the specified function to each element of the stream or collection.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i36"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math" class="externalLink">BigDecimal</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#summingBigDecimal(org.eclipse.collections.api.block.function.Function)">summingBigDecimal</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math" class="externalLink">BigDecimal</a>> function)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a BigDecimal sum applying the specified function to each element of the stream or collection.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i37"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math" class="externalLink">BigInteger</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#summingBigInteger(org.eclipse.collections.api.block.function.Function)">summingBigInteger</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math" class="externalLink">BigInteger</a>> function)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a BigInteger sum applying the specified function to each element of the stream or collection.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i38"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/bag/MutableBag.html" title="interface in org.eclipse.collections.api.bag">MutableBag</a><T>></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">Returns the elements as a MutableBag.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i39"> |
| <td class="colFirst"><code>static <T,​ |
| K> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/multimap/bag/MutableBagMultimap.html" title="interface in org.eclipse.collections.api.multimap.bag">MutableBagMultimap</a><K,​T>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toBagMultimap(org.eclipse.collections.api.block.function.Function)">toBagMultimap</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as an MutableBagMultimap grouping each element using the specified groupBy Function.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i40"> |
| <td class="colFirst"><code>static <T,​ |
| K,​ |
| V> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/multimap/bag/MutableBagMultimap.html" title="interface in org.eclipse.collections.api.multimap.bag">MutableBagMultimap</a><K,​V>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toBagMultimap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toBagMultimap</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy, |
| <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> valueFunction)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as an MutableBagMultimap grouping each element using the specified groupBy Function and |
| converting each element to the value returned by applying the specified Function valueFunction.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i41"> |
| <td class="colFirst"><code>static <T,​ |
| K,​ |
| V> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/bimap/MutableBiMap.html" title="interface in org.eclipse.collections.api.bimap">MutableBiMap</a><K,​V>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toBiMap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toBiMap</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> keyFunction, |
| <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> valueFunction)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as a MutableBiMap applying the keyFunction and valueFunction to each element.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i42"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/bag/ImmutableBag.html" title="interface in org.eclipse.collections.api.bag">ImmutableBag</a><T>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toImmutableBag()">toImmutableBag</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as an ImmutableBag.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i43"> |
| <td class="colFirst"><code>static <T,​ |
| K> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/multimap/bag/ImmutableBagMultimap.html" title="interface in org.eclipse.collections.api.multimap.bag">ImmutableBagMultimap</a><K,​T>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toImmutableBagMultimap(org.eclipse.collections.api.block.function.Function)">toImmutableBagMultimap</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as an ImmutableBagMultimap grouping each element using the specified groupBy Function.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i44"> |
| <td class="colFirst"><code>static <T,​ |
| K,​ |
| V> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/multimap/bag/ImmutableBagMultimap.html" title="interface in org.eclipse.collections.api.multimap.bag">ImmutableBagMultimap</a><K,​V>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toImmutableBagMultimap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toImmutableBagMultimap</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy, |
| <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> valueFunction)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as an ImmutableBagMultimap grouping each element using the specified groupBy Function and |
| converting each element to the value returned by applying the specified Function valueFunction.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i45"> |
| <td class="colFirst"><code>static <T,​ |
| K,​ |
| V> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/bimap/ImmutableBiMap.html" title="interface in org.eclipse.collections.api.bimap">ImmutableBiMap</a><K,​V>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toImmutableBiMap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toImmutableBiMap</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> keyFunction, |
| <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> valueFunction)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as an ImmutableBiMap applying the keyFunction and valueFunction to each element.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i46"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/list/ImmutableList.html" title="interface in org.eclipse.collections.api.list">ImmutableList</a><T>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toImmutableList()">toImmutableList</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as an ImmutableList.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i47"> |
| <td class="colFirst"><code>static <T,​ |
| K> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/multimap/list/ImmutableListMultimap.html" title="interface in org.eclipse.collections.api.multimap.list">ImmutableListMultimap</a><K,​T>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toImmutableListMultimap(org.eclipse.collections.api.block.function.Function)">toImmutableListMultimap</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as an ImmutableListMultimap grouping each element using the specified groupBy Function.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i48"> |
| <td class="colFirst"><code>static <T,​ |
| K,​ |
| V> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/multimap/list/ImmutableListMultimap.html" title="interface in org.eclipse.collections.api.multimap.list">ImmutableListMultimap</a><K,​V>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toImmutableListMultimap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toImmutableListMultimap</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy, |
| <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> valueFunction)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as an ImmutableListMultimap grouping each element using the specified groupBy Function and |
| converting each element to the value returned by applying the specified Function valueFunction.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i49"> |
| <td class="colFirst"><code>static <T,​ |
| K,​ |
| V> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/map/ImmutableMap.html" title="interface in org.eclipse.collections.api.map">ImmutableMap</a><K,​V>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toImmutableMap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toImmutableMap</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> keyFunction, |
| <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> valueFunction)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as an ImmutableMap applying the keyFunction and valueFunction to each element.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i50"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/set/ImmutableSet.html" title="interface in org.eclipse.collections.api.set">ImmutableSet</a><T>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toImmutableSet()">toImmutableSet</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as an ImmutableSet.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i51"> |
| <td class="colFirst"><code>static <T,​ |
| K> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/multimap/set/ImmutableSetMultimap.html" title="interface in org.eclipse.collections.api.multimap.set">ImmutableSetMultimap</a><K,​T>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toImmutableSetMultimap(org.eclipse.collections.api.block.function.Function)">toImmutableSetMultimap</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as an ImmutableSetMultimap grouping each element using the specified groupBy Function.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i52"> |
| <td class="colFirst"><code>static <T,​ |
| K,​ |
| V> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/multimap/set/ImmutableSetMultimap.html" title="interface in org.eclipse.collections.api.multimap.set">ImmutableSetMultimap</a><K,​V>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toImmutableSetMultimap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toImmutableSetMultimap</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy, |
| <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> valueFunction)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as an ImmutableSetMultimap grouping each element using the specified groupBy Function and |
| converting each element to the value returned by applying the specified Function valueFunction.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i53"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/bag/sorted/ImmutableSortedBag.html" title="interface in org.eclipse.collections.api.bag.sorted">ImmutableSortedBag</a><T>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toImmutableSortedBag()">toImmutableSortedBag</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as an ImmutableSortedBag.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i54"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/bag/sorted/ImmutableSortedBag.html" title="interface in org.eclipse.collections.api.bag.sorted">ImmutableSortedBag</a><T>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toImmutableSortedBag(java.util.Comparator)">toImmutableSortedBag</a></span>​(<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><? super T> comparator)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as an ImmutableSortedBag using the specified comparator.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i55"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/list/ImmutableList.html" title="interface in org.eclipse.collections.api.list">ImmutableList</a><T>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toImmutableSortedList()">toImmutableSortedList</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as an ImmutableList that has been sorted.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i56"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/list/ImmutableList.html" title="interface in org.eclipse.collections.api.list">ImmutableList</a><T>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toImmutableSortedList(java.util.Comparator)">toImmutableSortedList</a></span>​(<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><? super T> comparator)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as an ImmutableList that has been sorted using the specified comparator.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i57"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/set/sorted/ImmutableSortedSet.html" title="interface in org.eclipse.collections.api.set.sorted">ImmutableSortedSet</a><T>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toImmutableSortedSet()">toImmutableSortedSet</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as an ImmutableSortedSet.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i58"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/set/sorted/ImmutableSortedSet.html" title="interface in org.eclipse.collections.api.set.sorted">ImmutableSortedSet</a><T>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toImmutableSortedSet(java.util.Comparator)">toImmutableSortedSet</a></span>​(<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><? super T> comparator)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as an ImmutableSortedSet using the specified comparator.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i59"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/stack/ImmutableStack.html" title="interface in org.eclipse.collections.api.stack">ImmutableStack</a><T>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toImmutableStack()">toImmutableStack</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as an ImmutableStack.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i60"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/list/MutableList.html" title="interface in org.eclipse.collections.api.list">MutableList</a><T>></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">Returns the elements as a MutableList.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i61"> |
| <td class="colFirst"><code>static <T,​ |
| K> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/multimap/list/MutableListMultimap.html" title="interface in org.eclipse.collections.api.multimap.list">MutableListMultimap</a><K,​T>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toListMultimap(org.eclipse.collections.api.block.function.Function)">toListMultimap</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as an MutableListMultimap grouping each element using the specified groupBy Function.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i62"> |
| <td class="colFirst"><code>static <T,​ |
| K,​ |
| V> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/multimap/list/MutableListMultimap.html" title="interface in org.eclipse.collections.api.multimap.list">MutableListMultimap</a><K,​V>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toListMultimap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toListMultimap</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy, |
| <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> valueFunction)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as an MutableListMultimap grouping each element using the specified groupBy Function and |
| converting each element to the value returned by applying the specified Function valueFunction.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i63"> |
| <td class="colFirst"><code>static <T,​ |
| K,​ |
| V> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/map/MutableMap.html" title="interface in org.eclipse.collections.api.map">MutableMap</a><K,​V>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toMap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toMap</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> keyFunction, |
| <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> valueFunction)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as a MutableMap applying the keyFunction and valueFunction to each element.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i64"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/set/MutableSet.html" title="interface in org.eclipse.collections.api.set">MutableSet</a><T>></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">Returns the elements as a MutableSet.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i65"> |
| <td class="colFirst"><code>static <T,​ |
| K> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/multimap/set/MutableSetMultimap.html" title="interface in org.eclipse.collections.api.multimap.set">MutableSetMultimap</a><K,​T>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toSetMultimap(org.eclipse.collections.api.block.function.Function)">toSetMultimap</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as an MutableSetMultimap grouping each element using the specified groupBy Function.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i66"> |
| <td class="colFirst"><code>static <T,​ |
| K,​ |
| V> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/multimap/set/MutableSetMultimap.html" title="interface in org.eclipse.collections.api.multimap.set">MutableSetMultimap</a><K,​V>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toSetMultimap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toSetMultimap</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy, |
| <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> valueFunction)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as an MutableSetMultimap grouping each element using the specified groupBy Function and |
| converting each element to the value returned by applying the specified Function valueFunction.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i67"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/bag/sorted/MutableSortedBag.html" title="interface in org.eclipse.collections.api.bag.sorted">MutableSortedBag</a><T>></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">Returns the elements as a MutableSortedBag.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i68"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/bag/sorted/MutableSortedBag.html" title="interface in org.eclipse.collections.api.bag.sorted">MutableSortedBag</a><T>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toSortedBag(java.util.Comparator)">toSortedBag</a></span>​(<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><? super T> comparator)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as a MutableSortedBag using the specified comparator.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i69"> |
| <td class="colFirst"><code>static <T,​ |
| V extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Comparable</a><? super V>><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/bag/sorted/MutableSortedBag.html" title="interface in org.eclipse.collections.api.bag.sorted">MutableSortedBag</a><T>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toSortedBagBy(org.eclipse.collections.api.block.function.Function)">toSortedBagBy</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> function)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as a MutableSortedBag using the specified function.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i70"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/list/MutableList.html" title="interface in org.eclipse.collections.api.list">MutableList</a><T>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toSortedList()">toSortedList</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as a MutableList that has been sorted.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i71"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/list/MutableList.html" title="interface in org.eclipse.collections.api.list">MutableList</a><T>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toSortedList(java.util.Comparator)">toSortedList</a></span>​(<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><? super T> comparator)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as a MutableList that has been sorted using the specified comparator.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i72"> |
| <td class="colFirst"><code>static <T,​ |
| V extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Comparable</a><? super V>><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/list/MutableList.html" title="interface in org.eclipse.collections.api.list">MutableList</a><T>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toSortedListBy(org.eclipse.collections.api.block.function.Function)">toSortedListBy</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> function)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as a MutableList that has been sorted using the specified comparator.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i73"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/set/sorted/MutableSortedSet.html" title="interface in org.eclipse.collections.api.set.sorted">MutableSortedSet</a><T>></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">Returns the elements as a MutableSortedSet.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i74"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/set/sorted/MutableSortedSet.html" title="interface in org.eclipse.collections.api.set.sorted">MutableSortedSet</a><T>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toSortedSet(java.util.Comparator)">toSortedSet</a></span>​(<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><? super T> comparator)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as a MutableSortedSet using the specified comparator.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i75"> |
| <td class="colFirst"><code>static <T,​ |
| V extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Comparable</a><? super V>><br><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/set/sorted/MutableSortedSet.html" title="interface in org.eclipse.collections.api.set.sorted">MutableSortedSet</a><T>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toSortedSetBy(org.eclipse.collections.api.block.function.Function)">toSortedSetBy</a></span>​(<a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> function)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as a MutableSortedSet using the specified function to compare each element.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i76"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/stack/MutableStack.html" title="interface in org.eclipse.collections.api.stack">MutableStack</a><T>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toStack()">toStack</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the elements as a MutableStack.</div> |
| </td> |
| </tr> |
| <tr class="rowColor" id="i77"> |
| <td class="colFirst"><code>static <T,​ |
| S> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/list/MutableList.html" title="interface in org.eclipse.collections.api.list">MutableList</a><<a href="../../api/tuple/Pair.html" title="interface in org.eclipse.collections.api.tuple">Pair</a><T,​S>>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#zip(java.lang.Iterable)">zip</a></span>​(<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><S> other)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a <code>MutableList</code> formed from this stream of elements and another <code>Iterable</code> by |
| combining corresponding elements in pairs.</div> |
| </td> |
| </tr> |
| <tr class="altColor" id="i78"> |
| <td class="colFirst"><code>static <T> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/list/MutableList.html" title="interface in org.eclipse.collections.api.list">MutableList</a><<a href="../../api/tuple/primitive/ObjectIntPair.html" title="interface in org.eclipse.collections.api.tuple.primitive">ObjectIntPair</a><T>>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#zipWithIndex()">zipWithIndex</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a <code>MutableList</code> of pairs formed from this stream of elements its indices.</div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| <div class="inheritedList"> |
| <h3>Methods inherited from class 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#toString()" title="class or interface in java.lang" class="externalLink">toString</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> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <section class="details"> |
| <ul class="blockList"> |
| <!-- ============ 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="makeString()">makeString</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T></span> <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<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> <span class="memberName">makeString</span>()</div> |
| <div class="block"><p>Returns a String composed of elements separated by ", ".</p> |
| <p>Examples:</p> |
| <code>System.out.println(Interval.oneTo(5).stream().collect(Collectors2.makeString()));</code><br> |
| <code>System.out.println(Interval.oneTo(5).reduceInPlace(Collectors2.makeString()));</code> |
| <p>Prints:</p> |
| <pre> |
| 1, 2, 3, 4, 5 |
| 1, 2, 3, 4, 5 |
| </pre> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#makeString()"><code>RichIterable.makeString()</code></a> |
| </p> |
| <code>System.out.println(Interval.oneTo(5).makeString());</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="makeString(java.lang.CharSequence)">makeString</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T></span> <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<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> <span class="memberName">makeString</span>​(<span class="arguments"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a> separator)</span></div> |
| <div class="block"><p>Returns a String composed of elements separated by the specified separator.</p> |
| <p>Examples:</p> |
| <code>System.out.println(Interval.oneTo(5).stream().collect(Collectors2.makeString("")));</code><br> |
| <code>System.out.println(Interval.oneTo(5).reduceInPlace(Collectors2.makeString("")));</code> |
| <p>Prints:</p> |
| <pre> |
| 12345 |
| 12345 |
| </pre> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#makeString(java.lang.String)"><code>RichIterable.makeString(String)</code></a> |
| </p> |
| <code>System.out.println(Interval.oneTo(5).makeString(""));</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="makeString(java.lang.CharSequence,java.lang.CharSequence,java.lang.CharSequence)">makeString</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T></span> <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<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> <span class="memberName">makeString</span>​(<span class="arguments"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a> start, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a> separator, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a> end)</span></div> |
| <div class="block"><p>Returns a String composed of elements separated by the specified separator and beginning with start |
| String and ending with end String.</p> |
| <p>Examples:</p> |
| <code>System.out.println(Interval.oneTo(5).stream().collect(Collectors2.makeString("[", ":", "]")));</code><br> |
| <code>System.out.println(Interval.oneTo(5).reduceInPlace(Collectors2.makeString("[", ":", "]")));</code> |
| <p>Prints:</p> |
| <pre> |
| [1:2:3:4:5] |
| [1:2:3:4:5] |
| </pre> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#makeString(java.lang.String,java.lang.String,java.lang.String)"><code>RichIterable.makeString(String, String, String)</code></a>} |
| </p> |
| <code>System.out.println(Interval.oneTo(5).makeString("[", ":", "]"));</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toList()">toList</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T></span> <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/list/MutableList.html" title="interface in org.eclipse.collections.api.list">MutableList</a><T>></span> <span class="memberName">toList</span>()</div> |
| <div class="block"><p>Returns the elements as a MutableList.</p> |
| <p>Examples:</p> |
| <code>MutableList<Integer> numbers1 = Interval.oneTo(5).stream().collect(Collectors2.toList());</code><br> |
| <code>MutableList<Integer> numbers2 = Interval.oneTo(5).reduceInPlace(Collectors2.toList());</code> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#toList()"><code>RichIterable.toList()</code></a>} |
| </p> |
| <code>MutableList<Integer> numbers = Interval.oneTo(5).toList();</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toImmutableList()">toImmutableList</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T></span> <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/list/ImmutableList.html" title="interface in org.eclipse.collections.api.list">ImmutableList</a><T>></span> <span class="memberName">toImmutableList</span>()</div> |
| <div class="block"><p>Returns the elements as an ImmutableList.</p> |
| <p>Examples:</p> |
| <code>ImmutableList<Integer> numbers1 = Interval.oneTo(5).stream().collect(Collectors2.toImmutableList());</code><br> |
| <code>ImmutableList<Integer> numbers2 = Interval.oneTo(5).reduceInPlace(Collectors2.toImmutableList());</code> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#toList()"><code>RichIterable.toList()</code></a> followed by: @<a href="../../api/list/MutableList.html#toImmutable()"><code>MutableList.toImmutable()</code></a>. |
| </p> |
| <code>ImmutableList<Integer> numbers = Interval.oneTo(5).toList().toImmutable();</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toSet()">toSet</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T></span> <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/set/MutableSet.html" title="interface in org.eclipse.collections.api.set">MutableSet</a><T>></span> <span class="memberName">toSet</span>()</div> |
| <div class="block"><p>Returns the elements as a MutableSet.</p> |
| <p>Examples:</p> |
| <code>MutableSet<Integer> set1 = Interval.oneTo(5).stream().collect(Collectors2.toSet());</code><br> |
| <code>MutableSet<Integer> set2 =Interval.oneTo(5).reduceInPlace(Collectors2.toSet());</code> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#toSet()"><code>RichIterable.toSet()</code></a>} |
| </p> |
| <code>MutableSet<Integer> set = Interval.oneTo(5).toSet();</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toImmutableSet()">toImmutableSet</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T></span> <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/set/ImmutableSet.html" title="interface in org.eclipse.collections.api.set">ImmutableSet</a><T>></span> <span class="memberName">toImmutableSet</span>()</div> |
| <div class="block"><p>Returns the elements as an ImmutableSet.</p> |
| <p>Examples:</p> |
| <code>ImmutableSet<Integer> set1 = Interval.oneTo(5).stream().collect(Collectors2.toImmutableSet());</code><br> |
| <code>ImmutableSet<Integer> set2 = Interval.oneTo(5).reduceInPlace(Collectors2.toImmutableSet());</code> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#toSet()"><code>RichIterable.toSet()</code></a> followed by: @<a href="../../api/set/MutableSet.html#toImmutable()"><code>MutableSet.toImmutable()</code></a>. |
| </p> |
| <code>ImmutableSet<Integer> set = Interval.oneTo(5).toSet().toImmutable();</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toSortedSet()">toSortedSet</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/set/sorted/MutableSortedSet.html" title="interface in org.eclipse.collections.api.set.sorted">MutableSortedSet</a><T>></span> <span class="memberName">toSortedSet</span>()</div> |
| <div class="block"><p>Returns the elements as a MutableSortedSet.</p> |
| <p>Examples:</p> |
| <code>MutableSortedSet<Integer> set1 = Interval.oneTo(5).stream().collect(Collectors2.toSortedSet());</code><br> |
| <code>MutableSortedSet<Integer> set2 = Interval.oneTo(5).reduceInPlace(Collectors2.toSortedSet());</code> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#toSortedSet()"><code>RichIterable.toSortedSet()</code></a>}. |
| </p> |
| <code>MutableSortedSet<Integer> set = Interval.oneTo(5).toSortedSet();</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toImmutableSortedSet()">toImmutableSortedSet</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/set/sorted/ImmutableSortedSet.html" title="interface in org.eclipse.collections.api.set.sorted">ImmutableSortedSet</a><T>></span> <span class="memberName">toImmutableSortedSet</span>()</div> |
| <div class="block"><p>Returns the elements as an ImmutableSortedSet.</p> |
| <p>Examples:</p> |
| <code>ImmutableSortedSet<Integer> set1 = Interval.oneTo(5).stream().collect(Collectors2.toImmutableSortedSet());</code><br> |
| <code>ImmutableSortedSet<Integer> set2 = Interval.oneTo(5).reduceInPlace(Collectors2.toImmutableSortedSet());</code> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#toSortedSet()"><code>RichIterable.toSortedSet()</code></a> followed by: @<a href="../../api/set/sorted/MutableSortedSet.html#toImmutable()"><code>MutableSortedSet.toImmutable()</code></a>. |
| </p> |
| <code>ImmutableSortedSet<Integer> set = Interval.oneTo(5).toSortedSet().toImmutable();</code></div> |
| </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 static</span> <span class="typeParameters"><T></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/set/sorted/MutableSortedSet.html" title="interface in org.eclipse.collections.api.set.sorted">MutableSortedSet</a><T>></span> <span class="memberName">toSortedSet</span>​(<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><? super T> comparator)</span></div> |
| <div class="block"><p>Returns the elements as a MutableSortedSet using the specified comparator.</p> |
| <p>Examples:</p> |
| <code>MutableSortedSet<Integer> set1 = Interval.oneTo(5).stream().collect(Collectors2.toSortedSet(Comparator.naturalOrder()));</code><br> |
| <code>MutableSortedSet<Integer> set2 = Interval.oneTo(5).reduceInPlace(Collectors2.toSortedSet(Comparator.naturalOrder()));</code> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#toSortedSet(java.util.Comparator)"><code>RichIterable.toSortedSet(Comparator)</code></a>. |
| </p> |
| <code>MutableSortedSet<Integer> set = Interval.oneTo(5).toSortedSet(Comparator.naturalOrder());</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toSortedSetBy(org.eclipse.collections.api.block.function.Function)">toSortedSetBy</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| V extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Comparable</a><? super V>></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/set/sorted/MutableSortedSet.html" title="interface in org.eclipse.collections.api.set.sorted">MutableSortedSet</a><T>></span> <span class="memberName">toSortedSetBy</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> function)</span></div> |
| <div class="block"><p>Returns the elements as a MutableSortedSet using the specified function to compare each element.</p> |
| <p>Examples:</p> |
| <code>MutableSortedSet<Integer> set1 = Interval.oneTo(5).stream().collect(Collectors2.toSortedSetBy(Object::toString));</code><br> |
| <code>MutableSortedSet<Integer> set2 = Interval.oneTo(5).reduceInPlace(Collectors2.toSortedSetBy(Object::toString));</code> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#toSortedSetBy(org.eclipse.collections.api.block.function.Function)"><code>RichIterable.toSortedSetBy(Function)</code></a>. |
| </p> |
| <code>MutableSortedSet<Integer> set = Interval.oneTo(5).toSortedSetBy(Object::toString);</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toImmutableSortedSet(java.util.Comparator)">toImmutableSortedSet</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/set/sorted/ImmutableSortedSet.html" title="interface in org.eclipse.collections.api.set.sorted">ImmutableSortedSet</a><T>></span> <span class="memberName">toImmutableSortedSet</span>​(<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><? super T> comparator)</span></div> |
| <div class="block"><p>Returns the elements as an ImmutableSortedSet using the specified comparator.</p> |
| <p>Examples:</p> |
| <code>ImmutableSortedSet<Integer> set1 = Interval.oneTo(5).stream().collect(Collectors2.toImmutableSortedSet(Comparator.naturalOrder()));</code><br> |
| <code>ImmutableSortedSet<Integer> set2 = Interval.oneTo(5).reduceInPlace(Collectors2.toImmutableSortedSet(Comparator.naturalOrder()));</code> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#toSortedSet(java.util.Comparator)"><code>RichIterable.toSortedSet(Comparator)</code></a> followed by: @<a href="../../api/set/sorted/MutableSortedSet.html#toImmutable()"><code>MutableSortedSet.toImmutable()</code></a>. |
| </p> |
| <code>ImmutableSortedSet<Integer> set = Interval.oneTo(5).toSortedSet(Comparator.naturalOrder()).toImmutable();</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toBag()">toBag</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T></span> <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/bag/MutableBag.html" title="interface in org.eclipse.collections.api.bag">MutableBag</a><T>></span> <span class="memberName">toBag</span>()</div> |
| <div class="block"><p>Returns the elements as a MutableBag.</p> |
| <p>Examples:</p> |
| <code>MutableBag<Integer> bag1 = Interval.oneTo(5).stream().collect(Collectors2.toBag());</code><br> |
| <code>MutableBag<Integer> bag2 = Interval.oneTo(5).reduceInPlace(Collectors2.toBag());</code> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#toBag()"><code>RichIterable.toBag()</code></a>} |
| </p> |
| <code>MutableBag<Integer> bag = Interval.oneTo(5).toBag();</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toImmutableBag()">toImmutableBag</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T></span> <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/bag/ImmutableBag.html" title="interface in org.eclipse.collections.api.bag">ImmutableBag</a><T>></span> <span class="memberName">toImmutableBag</span>()</div> |
| <div class="block"><p>Returns the elements as an ImmutableBag.</p> |
| <p>Examples:</p> |
| <code>ImmutableBag<Integer> bag1 = Interval.oneTo(5).stream().collect(Collectors2.toImmutableBag());</code><br> |
| <code>ImmutableBag<Integer> bag2 = Interval.oneTo(5).reduceInPlace(Collectors2.toImmutableBag());</code> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#toBag()"><code>RichIterable.toBag()</code></a> followed by: @<a href="../../api/bag/MutableBag.html#toImmutable()"><code>MutableBag.toImmutable()</code></a>. |
| </p> |
| <code>ImmutableBag<Integer> bag = Interval.oneTo(5).toBag().toImmutable();</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toSortedList()">toSortedList</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T></span> <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/list/MutableList.html" title="interface in org.eclipse.collections.api.list">MutableList</a><T>></span> <span class="memberName">toSortedList</span>()</div> |
| <div class="block"><p>Returns the elements as a MutableList that has been sorted.</p> |
| <p>Examples:</p> |
| <code>MutableList<Integer> list1 = Interval.oneTo(5).stream().collect(Collectors2.toSortedList());</code><br> |
| <code>MutableList<Integer> list2 = Interval.oneTo(5).reduceInPlace(Collectors2.toSortedList());</code> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#toSortedList()"><code>RichIterable.toSortedList()</code></a>} |
| </p> |
| <code>MutableList<Integer> list = Interval.oneTo(5).toSortedList();</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toImmutableSortedList()">toImmutableSortedList</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T></span> <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/list/ImmutableList.html" title="interface in org.eclipse.collections.api.list">ImmutableList</a><T>></span> <span class="memberName">toImmutableSortedList</span>()</div> |
| <div class="block"><p>Returns the elements as an ImmutableList that has been sorted.</p> |
| <p>Examples:</p> |
| <code>ImmutableList<Integer> list1 = Interval.oneTo(5).stream().collect(Collectors2.toImmutableSortedList());</code><br> |
| <code>ImmutableList<Integer> list2 = Interval.oneTo(5).reduceInPlace(Collectors2.toImmutableSortedList());</code> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#toSortedList()"><code>RichIterable.toSortedList()</code></a> followed by: @<a href="../../api/list/MutableList.html#toImmutable()"><code>MutableList.toImmutable()</code></a>. |
| </p> |
| <code>ImmutableList<Integer> list = Interval.oneTo(5).toSortedList().toImmutable();</code></div> |
| </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 static</span> <span class="typeParameters"><T></span> <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/list/MutableList.html" title="interface in org.eclipse.collections.api.list">MutableList</a><T>></span> <span class="memberName">toSortedList</span>​(<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><? super T> comparator)</span></div> |
| <div class="block"><p>Returns the elements as a MutableList that has been sorted using the specified comparator.</p> |
| <p>Examples:</p> |
| <code>MutableList<Integer> list1 = Interval.oneTo(5).stream().collect(Collectors2.toSortedList(Comparators.naturalOrder()));</code><br> |
| <code>MutableList<Integer> list2 = Interval.oneTo(5).reduceInPlace(Collectors2.toSortedList(Comparators.naturalOrder()));</code> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#toSortedList(java.util.Comparator)"><code>RichIterable.toSortedList(Comparator)</code></a>} |
| </p> |
| <code>MutableList<Integer> list = Interval.oneTo(5).toSortedList(Comparators.naturalOrder());</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toSortedListBy(org.eclipse.collections.api.block.function.Function)">toSortedListBy</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| V extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Comparable</a><? super V>></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/list/MutableList.html" title="interface in org.eclipse.collections.api.list">MutableList</a><T>></span> <span class="memberName">toSortedListBy</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> function)</span></div> |
| <div class="block"><p>Returns the elements as a MutableList that has been sorted using the specified comparator.</p> |
| <p>Examples:</p> |
| <code>MutableList<Integer> list1 = Interval.oneTo(5).stream().collect(Collectors2.toSortedListBy(Object::toString));</code><br> |
| <code>MutableList<Integer> list2 = Interval.oneTo(5).reduceInPlace(Collectors2.toSortedListBy(Object::toString));</code> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#toSortedListBy(org.eclipse.collections.api.block.function.Function)"><code>RichIterable.toSortedListBy(Function)</code></a>} |
| </p> |
| <code>MutableList<Integer> list = Interval.oneTo(5).toSortedListBy(Object::toString);</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toImmutableSortedList(java.util.Comparator)">toImmutableSortedList</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T></span> <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/list/ImmutableList.html" title="interface in org.eclipse.collections.api.list">ImmutableList</a><T>></span> <span class="memberName">toImmutableSortedList</span>​(<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><? super T> comparator)</span></div> |
| <div class="block"><p>Returns the elements as an ImmutableList that has been sorted using the specified comparator.</p> |
| <p>Examples:</p> |
| <code>ImmutableList<Integer> list1 = Interval.oneTo(5).stream().collect(Collectors2.toImmutableSortedList(Comparator.naturalOrder()));</code><br> |
| <code>ImmutableList<Integer> list2 = Interval.oneTo(5).reduceInPlace(Collectors2.toImmutableSortedList(Comparator.naturalOrder()));</code> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#toSortedList(java.util.Comparator)"><code>RichIterable.toSortedList(Comparator)</code></a> followed by: @<a href="../../api/list/MutableList.html#toImmutable()"><code>MutableList.toImmutable()</code></a>. |
| </p> |
| <code>ImmutableList<Integer> list = Interval.oneTo(5).toSortedList(Comparator.naturalOrder()).toImmutable();</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toSortedBag()">toSortedBag</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/bag/sorted/MutableSortedBag.html" title="interface in org.eclipse.collections.api.bag.sorted">MutableSortedBag</a><T>></span> <span class="memberName">toSortedBag</span>()</div> |
| <div class="block"><p>Returns the elements as a MutableSortedBag.</p> |
| <p>Examples:</p> |
| <code>MutableSortedBag<Integer> bag1 = Interval.oneTo(5).stream().collect(Collectors2.toSortedBag());</code><br> |
| <code>MutableSortedBag<Integer> bag2 = Interval.oneTo(5).reduceInPlace(Collectors2.toSortedBag());</code> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#toSortedBag()"><code>RichIterable.toSortedBag()</code></a>} |
| </p> |
| <code>MutableSortedBag<Integer> bag = Interval.oneTo(5).toSortedBag();</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toImmutableSortedBag()">toImmutableSortedBag</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/bag/sorted/ImmutableSortedBag.html" title="interface in org.eclipse.collections.api.bag.sorted">ImmutableSortedBag</a><T>></span> <span class="memberName">toImmutableSortedBag</span>()</div> |
| <div class="block"><p>Returns the elements as an ImmutableSortedBag.</p> |
| <p>Examples:</p> |
| <code>ImmutableSortedBag<Integer> bag1 = Interval.oneTo(5).stream().collect(Collectors2.toImmutableSortedBag());</code><br> |
| <code>ImmutableSortedBag<Integer> bag2 = Interval.oneTo(5).reduceInPlace(Collectors2.toImmutableSortedBag());</code> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#toSortedBag()"><code>RichIterable.toSortedBag()</code></a> followed by: @<a href="../../api/list/MutableList.html#toImmutable()"><code>MutableList.toImmutable()</code></a>. |
| </p> |
| <code>ImmutableSortedBag<Integer> bag = Interval.oneTo(5).toSortedBag().toImmutable();</code></div> |
| </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 static</span> <span class="typeParameters"><T></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/bag/sorted/MutableSortedBag.html" title="interface in org.eclipse.collections.api.bag.sorted">MutableSortedBag</a><T>></span> <span class="memberName">toSortedBag</span>​(<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><? super T> comparator)</span></div> |
| <div class="block"><p>Returns the elements as a MutableSortedBag using the specified comparator.</p> |
| <p>Examples:</p> |
| <code>MutableSortedBag<Integer> bag1 = Interval.oneTo(5).stream().collect(Collectors2.toSortedBag(Comparators.naturalOrder()));</code><br> |
| <code>MutableSortedBag<Integer> bag2 = Interval.oneTo(5).reduceInPlace(Collectors2.toSortedBag(Comparators.naturalOrder()));</code> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#toSortedBag(java.util.Comparator)"><code>RichIterable.toSortedBag(Comparator)</code></a> |
| </p> |
| <code>MutableSortedBag<Integer> bag = Interval.oneTo(5).toSortedBag(Comparators.naturalOrder());</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toSortedBagBy(org.eclipse.collections.api.block.function.Function)">toSortedBagBy</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| V extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Comparable</a><? super V>></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/bag/sorted/MutableSortedBag.html" title="interface in org.eclipse.collections.api.bag.sorted">MutableSortedBag</a><T>></span> <span class="memberName">toSortedBagBy</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> function)</span></div> |
| <div class="block"><p>Returns the elements as a MutableSortedBag using the specified function.</p> |
| <p>Examples:</p> |
| <code>MutableSortedBag<Integer> bag1 = Interval.oneTo(5).stream().collect(Collectors2.toSortedBagBy(Object::toString));</code><br> |
| <code>MutableSortedBag<Integer> bag2 = Interval.oneTo(5).reduceInPlace(Collectors2.toSortedBagBy(Object::toString));</code> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#toSortedBagBy(org.eclipse.collections.api.block.function.Function)"><code>RichIterable.toSortedBagBy(Function)</code></a>} |
| </p> |
| <code>MutableSortedBag<Integer> bag = Interval.oneTo(5).toSortedBagBy(Object::toString);</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toImmutableSortedBag(java.util.Comparator)">toImmutableSortedBag</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/bag/sorted/ImmutableSortedBag.html" title="interface in org.eclipse.collections.api.bag.sorted">ImmutableSortedBag</a><T>></span> <span class="memberName">toImmutableSortedBag</span>​(<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><? super T> comparator)</span></div> |
| <div class="block"><p>Returns the elements as an ImmutableSortedBag using the specified comparator.</p> |
| <p>Examples:</p> |
| <code>ImmutableSortedBag<Integer> bag1 = Interval.oneTo(5).stream().collect(Collectors2.toImmutableSortedBag(Comparator.naturalOrder()));</code><br> |
| <code>ImmutableSortedBag<Integer> bag1 = Interval.oneTo(5).reduceInPlace(Collectors2.toImmutableSortedBag(Comparator.naturalOrder()));</code> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#toSortedBag(java.util.Comparator)"><code>RichIterable.toSortedBag(Comparator)</code></a> followed by: @<a href="../../api/bag/MutableBag.html#toImmutable()"><code>MutableBag.toImmutable()</code></a>. |
| </p> |
| <code>ImmutableSortedBag<Integer> bag = Interval.oneTo(5).toSortedBag(Comparator.naturalOrder()).toImmutable();</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toStack()">toStack</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T></span> <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/stack/MutableStack.html" title="interface in org.eclipse.collections.api.stack">MutableStack</a><T>></span> <span class="memberName">toStack</span>()</div> |
| <div class="block"><p>Returns the elements as a MutableStack.</p> |
| <p>Examples:</p> |
| <code>MutableStack<Integer> stack1 = Interval.oneTo(5).stream().collect(Collectors2.toStack());</code><br> |
| <code>MutableStack<Integer> stack2 = Interval.oneTo(5).reduceInPlace(Collectors2.toStack());</code> |
| <p> |
| Equivalent to using @<a href="../../api/ordered/OrderedIterable.html#toStack()"><code>OrderedIterable.toStack()</code></a>} |
| </p> |
| <code>MutableStack<Integer> stack = Interval.oneTo(5).toList().toStack();</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toImmutableStack()">toImmutableStack</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T></span> <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/stack/ImmutableStack.html" title="interface in org.eclipse.collections.api.stack">ImmutableStack</a><T>></span> <span class="memberName">toImmutableStack</span>()</div> |
| <div class="block"><p>Returns the elements as an ImmutableStack.</p> |
| <p>Examples:</p> |
| <code>ImmutableStack<Integer> stack1 = Interval.oneTo(5).stream().collect(Collectors2.toImmutableStack());</code><br> |
| <code>ImmutableStack<Integer> stack2 = Interval.oneTo(5).reduceInPlace(Collectors2.toImmutableStack());</code> |
| <p> |
| Equivalent to using @<a href="../../api/ordered/OrderedIterable.html#toStack()"><code>OrderedIterable.toStack()</code></a> followed by: @<a href="../../api/stack/StackIterable.html#toImmutable()"><code>StackIterable.toImmutable()</code></a>} |
| </p> |
| <code>ImmutableStack<Integer> stack = Interval.oneTo(5).toList().toStack().toImmutable();</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toBiMap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toBiMap</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| K,​ |
| V></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/bimap/MutableBiMap.html" title="interface in org.eclipse.collections.api.bimap">MutableBiMap</a><K,​V>></span> <span class="memberName">toBiMap</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> keyFunction, |
| <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> valueFunction)</span></div> |
| <div class="block"><p>Returns the elements as a MutableBiMap applying the keyFunction and valueFunction to each element.</p> |
| <p>Examples:</p> |
| <code>BiMap<Integer, String> biMap1 = |
| Interval.oneTo(5).stream().collect(Collectors2.toBiMap(Functions.identity(), Object::toString));</code><br> |
| <code>BiMap<Integer, String> biMap1 = |
| Interval.oneTo(5).reduceInPlace(Collectors2.toBiMap(Functions.identity(), Object::toString));</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toImmutableBiMap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toImmutableBiMap</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| K,​ |
| V></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/bimap/ImmutableBiMap.html" title="interface in org.eclipse.collections.api.bimap">ImmutableBiMap</a><K,​V>></span> <span class="memberName">toImmutableBiMap</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> keyFunction, |
| <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> valueFunction)</span></div> |
| <div class="block"><p>Returns the elements as an ImmutableBiMap applying the keyFunction and valueFunction to each element.</p> |
| <p>Examples:</p> |
| <code>MutableBiMap<Integer, String> biMap1 = |
| Interval.oneTo(5).stream().collect(Collectors2.toImmutableBiMap(Functions.identity(), Object::toString));</code><br> |
| <code>MutableBiMap<Integer, String> biMap2 = |
| Interval.oneTo(5).reduceInPlace(Collectors2.toImmutableBiMap(Functions.identity(), Object::toString));</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toMap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toMap</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| K,​ |
| V></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/map/MutableMap.html" title="interface in org.eclipse.collections.api.map">MutableMap</a><K,​V>></span> <span class="memberName">toMap</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> keyFunction, |
| <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> valueFunction)</span></div> |
| <div class="block"><p>Returns the elements as a MutableMap applying the keyFunction and valueFunction to each element.</p> |
| <p>Examples:</p> |
| <code>MutableMap<Integer, String> map1 = |
| Interval.oneTo(5).stream().collect(Collectors2.toMap(Functions.identity(), Object::toString));</code><br> |
| <code>MutableMap<Integer, String> map2 = |
| Interval.oneTo(5).reduceInPlace(Collectors2.toMap(Functions.identity(), Object::toString));</code> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#toMap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)"><code>RichIterable.toMap(Function, Function)</code></a> |
| </p> |
| <code>MutableMap<Integer, String> map = Interval.oneTo(5).toMap(Functions.identity(), Object::toString);</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toImmutableMap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toImmutableMap</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| K,​ |
| V></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/map/ImmutableMap.html" title="interface in org.eclipse.collections.api.map">ImmutableMap</a><K,​V>></span> <span class="memberName">toImmutableMap</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> keyFunction, |
| <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> valueFunction)</span></div> |
| <div class="block"><p>Returns the elements as an ImmutableMap applying the keyFunction and valueFunction to each element.</p> |
| <p>Examples:</p> |
| <code>ImmutableMap<Integer, String> map1 = |
| Interval.oneTo(5).stream().collect(Collectors2.toImmutableMap(Functions.identity(), Object::toString));</code><br> |
| <code>ImmutableMap<Integer, String> map2 = |
| Interval.oneTo(5).reduceInPlace(Collectors2.toImmutableMap(Functions.identity(), Object::toString));</code> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#toMap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)"><code>RichIterable.toMap(Function, Function)</code></a> |
| </p> |
| <code>ImmutableMap<Integer, String> map = Interval.oneTo(5).toMap(Functions.identity(), Object::toString).toImmutable();</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="countBy(org.eclipse.collections.api.block.function.Function)">countBy</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| K></span> <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/bag/MutableBag.html" title="interface in org.eclipse.collections.api.bag">MutableBag</a><K>></span> <span class="memberName">countBy</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> function)</span></div> |
| <div class="block">Returns the counts of all of the values returned by applying the specified function to each |
| item of the Stream.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>9.1</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="countByEach(org.eclipse.collections.api.block.function.Function)">countByEach</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| K></span> <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/bag/MutableBag.html" title="interface in org.eclipse.collections.api.bag">MutableBag</a><K>></span> <span class="memberName">countByEach</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? 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><K>> function)</span></div> |
| <div class="block"><p>Same as <a href="#countBy(org.eclipse.collections.api.block.function.Function)"><code>countBy(Function)</code></a>, except the result of applying the specified function will return a |
| collection of keys for each value.</p></div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>9.2</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="groupBy(org.eclipse.collections.api.block.function.Function,java.util.function.Supplier)">groupBy</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| K,​ |
| R extends <a href="../../api/multimap/MutableMultimap.html" title="interface in org.eclipse.collections.api.multimap">MutableMultimap</a><K,​ |
| T>></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></span> <span class="memberName">groupBy</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</span></div> |
| <div class="block"><p>Returns the elements as an MutableMultimap grouping each element using the specified groupBy Function.</p> |
| <p>Examples:</p> |
| <code>MutableListMultimap<String, Integer> multimap1 = |
| Interval.oneTo(5).stream().collect(Collectors2.groupBy(Object::toString, Multimaps.mutable.list::empty));</code><br> |
| <code>MutableListMultimap<String, Integer> multimap2 = |
| Interval.oneTo(5).reduceInPlace(Collectors2.groupBy(Object::toString, Multimaps.mutable.list::empty));</code> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#groupBy(org.eclipse.collections.api.block.function.Function,R)"><code>RichIterable.groupBy(Function, MutableMultimap)</code></a> |
| </p> |
| <code>MutableListMultimap<String, Integer> multimap = Interval.oneTo(5).groupBy(Object::toString, Multimaps.mutable.list.empty());</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="groupByEach(org.eclipse.collections.api.block.function.Function,java.util.function.Supplier)">groupByEach</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| K,​ |
| R extends <a href="../../api/multimap/MutableMultimap.html" title="interface in org.eclipse.collections.api.multimap">MutableMultimap</a><K,​ |
| T>></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></span> <span class="memberName">groupByEach</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? 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><K>> groupBy, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</span></div> |
| <div class="block"><p>Same as <a href="#groupBy(org.eclipse.collections.api.block.function.Function,java.util.function.Supplier)"><code>groupBy(Function, Supplier)</code></a>, except the result of evaluating groupBy function will return a |
| collection of keys for each value.</p> |
| |
| <p>Equivalent to using @<a href="../../api/RichIterable.html#groupByEach(org.eclipse.collections.api.block.function.Function,R)"><code>RichIterable.groupByEach(Function, MutableMultimap)</code></a></p></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="groupByUniqueKey(org.eclipse.collections.api.block.function.Function,java.util.function.Supplier)">groupByUniqueKey</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| K,​ |
| R extends <a href="../../api/map/MutableMapIterable.html" title="interface in org.eclipse.collections.api.map">MutableMapIterable</a><K,​ |
| T>></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></span> <span class="memberName">groupByUniqueKey</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</span></div> |
| <div class="block"><p>Same as <a href="#groupBy(org.eclipse.collections.api.block.function.Function,java.util.function.Supplier)"><code>groupBy(Function, Supplier)</code></a>, except the result of evaluating groupBy function should return a |
| unique key, or else an exception is thrown.</p> |
| |
| <p>Equivalent to using <a href="../../api/RichIterable.html#groupByUniqueKey(org.eclipse.collections.api.block.function.Function,R)"><code>RichIterable.groupByUniqueKey(Function, MutableMapIterable)</code></a></p></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="groupByAndCollect(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function,java.util.function.Supplier)">groupByAndCollect</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| K,​ |
| V,​ |
| R extends <a href="../../api/multimap/MutableMultimap.html" title="interface in org.eclipse.collections.api.multimap">MutableMultimap</a><K,​ |
| V>></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></span> <span class="memberName">groupByAndCollect</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy, |
| <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> valueFunction, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</span></div> |
| <div class="block"><p>Returns the elements as an MutableMultimap grouping each element using the specified groupBy Function and |
| converting each element to the value returned by applying the specified Function valueFunction.</p> |
| <p>Examples:</p> |
| <code>MutableListMultimap<String, String> multimap1 = |
| Interval.oneTo(5).stream().collect(Collectors2.groupByAndCollect(Object::toString, Object::toString, Multimaps.mutable.list::empty));</code><br> |
| <code>MutableListMultimap<String, String> multimap2 = |
| Interval.oneTo(5).reduceInPlace(Collectors2.groupByAndCollect(Object::toString, Object::toString, Multimaps.mutable.list::empty));</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="aggregateBy(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function0,org.eclipse.collections.api.block.function.Function2,java.util.function.Supplier)">aggregateBy</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| K,​ |
| R extends <a href="../../api/map/MutableMapIterable.html" title="interface in org.eclipse.collections.api.map">MutableMapIterable</a><K,​ |
| T>></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></span> <span class="memberName">aggregateBy</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy, |
| <a href="../../api/block/function/Function0.html" title="interface in org.eclipse.collections.api.block.function">Function0</a><? extends T> zeroValueFactory, |
| <a href="../../api/block/function/Function2.html" title="interface in org.eclipse.collections.api.block.function">Function2</a><? super T,​? super T,​? extends T> aggregator, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</span></div> |
| <div class="block">Groups the elements using the <code>groupBy</code> function and all the elements that map to the same key are |
| aggregated together using the <code>aggregator</code> function. The second parameter, the <code>zeroValueFactory</code> |
| function, creates the initial value in each aggregation. Aggregate results are allowed to be immutable as they |
| will be replaced in the map.</div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toListMultimap(org.eclipse.collections.api.block.function.Function)">toListMultimap</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| K></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/multimap/list/MutableListMultimap.html" title="interface in org.eclipse.collections.api.multimap.list">MutableListMultimap</a><K,​T>></span> <span class="memberName">toListMultimap</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy)</span></div> |
| <div class="block"><p>Returns the elements as an MutableListMultimap grouping each element using the specified groupBy Function.</p> |
| <p>Examples:</p> |
| <code>MutableListMultimap<String, Integer> multimap1 = |
| Interval.oneTo(5).stream().collect(Collectors2.toListMultimap(Object::toString));</code><br> |
| <code>MutableListMultimap<String, Integer> multimap2 = |
| Interval.oneTo(5).reduceInPlace(Collectors2.toListMultimap(Object::toString));</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toListMultimap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toListMultimap</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| K,​ |
| V></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/multimap/list/MutableListMultimap.html" title="interface in org.eclipse.collections.api.multimap.list">MutableListMultimap</a><K,​V>></span> <span class="memberName">toListMultimap</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy, |
| <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> valueFunction)</span></div> |
| <div class="block"><p>Returns the elements as an MutableListMultimap grouping each element using the specified groupBy Function and |
| converting each element to the value returned by applying the specified Function valueFunction.</p> |
| <p>Examples:</p> |
| <code>MutableListMultimap<String, String> multimap1 = |
| Interval.oneTo(5).stream().collect(Collectors2.toListMultimap(Object::toString, Object::toString));</code><br> |
| <code>MutableListMultimap<String, String> multimap2 = |
| Interval.oneTo(5).reduceInPlace(Collectors2.toListMultimap(Object::toString, Object::toString));</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toSetMultimap(org.eclipse.collections.api.block.function.Function)">toSetMultimap</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| K></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/multimap/set/MutableSetMultimap.html" title="interface in org.eclipse.collections.api.multimap.set">MutableSetMultimap</a><K,​T>></span> <span class="memberName">toSetMultimap</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy)</span></div> |
| <div class="block"><p>Returns the elements as an MutableSetMultimap grouping each element using the specified groupBy Function.</p> |
| <p>Examples:</p> |
| <code>MutableSetMultimap<String, Integer> multimap1 = |
| Interval.oneTo(5).stream().collect(Collectors2.toSetMultimap(Object::toString));</code><br> |
| <code>MutableSetMultimap<String, Integer> multimap2 = |
| Interval.oneTo(5).reduceInPlace(Collectors2.toSetMultimap(Object::toString));</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toSetMultimap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toSetMultimap</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| K,​ |
| V></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/multimap/set/MutableSetMultimap.html" title="interface in org.eclipse.collections.api.multimap.set">MutableSetMultimap</a><K,​V>></span> <span class="memberName">toSetMultimap</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy, |
| <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> valueFunction)</span></div> |
| <div class="block"><p>Returns the elements as an MutableSetMultimap grouping each element using the specified groupBy Function and |
| converting each element to the value returned by applying the specified Function valueFunction.</p> |
| <p>Examples:</p> |
| <code>MutableSetMultimap<String, String> multimap1 = |
| Interval.oneTo(5).stream().collect(Collectors2.toSetMultimap(Object::toString, Object::toString));</code><br> |
| <code>MutableSetMultimap<String, String> multimap2 = |
| Interval.oneTo(5).reduceInPlace(Collectors2.toSetMultimap(Object::toString, Object::toString));</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toBagMultimap(org.eclipse.collections.api.block.function.Function)">toBagMultimap</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| K></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/multimap/bag/MutableBagMultimap.html" title="interface in org.eclipse.collections.api.multimap.bag">MutableBagMultimap</a><K,​T>></span> <span class="memberName">toBagMultimap</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy)</span></div> |
| <div class="block"><p>Returns the elements as an MutableBagMultimap grouping each element using the specified groupBy Function.</p> |
| <p>Examples:</p> |
| <code>MutableBagMultimap<String, Integer> multimap1 = |
| Interval.oneTo(5).stream().collect(Collectors2.toBagMultimap(Object::toString));</code><br> |
| <code>MutableBagMultimap<String, Integer> multimap2 = |
| Interval.oneTo(5).reduceInPlace(Collectors2.toBagMultimap(Object::toString));</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toBagMultimap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toBagMultimap</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| K,​ |
| V></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/multimap/bag/MutableBagMultimap.html" title="interface in org.eclipse.collections.api.multimap.bag">MutableBagMultimap</a><K,​V>></span> <span class="memberName">toBagMultimap</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy, |
| <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> valueFunction)</span></div> |
| <div class="block"><p>Returns the elements as an MutableBagMultimap grouping each element using the specified groupBy Function and |
| converting each element to the value returned by applying the specified Function valueFunction.</p> |
| <p>Examples:</p> |
| <code>MutableBagMultimap<String, String> multimap1 = |
| Interval.oneTo(5).stream().collect(Collectors2.toBagMultimap(Object::toString, Object::toString));</code><br> |
| <code>MutableBagMultimap<String, String> multimap2 = |
| Interval.oneTo(5).reduceInPlace(Collectors2.toBagMultimap(Object::toString, Object::toString));</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toImmutableListMultimap(org.eclipse.collections.api.block.function.Function)">toImmutableListMultimap</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| K></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/multimap/list/ImmutableListMultimap.html" title="interface in org.eclipse.collections.api.multimap.list">ImmutableListMultimap</a><K,​T>></span> <span class="memberName">toImmutableListMultimap</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy)</span></div> |
| <div class="block"><p>Returns the elements as an ImmutableListMultimap grouping each element using the specified groupBy Function.</p> |
| <p>Examples:</p> |
| <code>ImmutableListMultimap<String, Integer> multimap1 = |
| Interval.oneTo(5).stream().collect(Collectors2.toImmutableListMultimap(Object::toString));</code><br> |
| <code>ImmutableListMultimap<String, Integer> multimap2 = |
| Interval.oneTo(5).reduceInPlace(Collectors2.toImmutableListMultimap(Object::toString));</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toImmutableListMultimap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toImmutableListMultimap</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| K,​ |
| V></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/multimap/list/ImmutableListMultimap.html" title="interface in org.eclipse.collections.api.multimap.list">ImmutableListMultimap</a><K,​V>></span> <span class="memberName">toImmutableListMultimap</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy, |
| <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> valueFunction)</span></div> |
| <div class="block"><p>Returns the elements as an ImmutableListMultimap grouping each element using the specified groupBy Function and |
| converting each element to the value returned by applying the specified Function valueFunction.</p> |
| <p>Examples:</p> |
| <code>ImmutableListMultimap<String, String> multimap1 = |
| Interval.oneTo(5).stream().collect(Collectors2.toImmutableListMultimap(Object::toString, Object::toString));</code><br> |
| <code>ImmutableListMultimap<String, String> multimap2 = |
| Interval.oneTo(5).reduceInPlace(Collectors2.toImmutableListMultimap(Object::toString, Object::toString));</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toImmutableSetMultimap(org.eclipse.collections.api.block.function.Function)">toImmutableSetMultimap</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| K></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/multimap/set/ImmutableSetMultimap.html" title="interface in org.eclipse.collections.api.multimap.set">ImmutableSetMultimap</a><K,​T>></span> <span class="memberName">toImmutableSetMultimap</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy)</span></div> |
| <div class="block"><p>Returns the elements as an ImmutableSetMultimap grouping each element using the specified groupBy Function.</p> |
| <p>Examples:</p> |
| <code>ImmutableSetMultimap<String, Integer> multimap1 = |
| Interval.oneTo(5).stream().collect(Collectors2.toImmutableSetMultimap(Object::toString));</code><br> |
| <code>ImmutableSetMultimap<String, Integer> multimap2 = |
| Interval.oneTo(5).reduceInPlace(Collectors2.toImmutableSetMultimap(Object::toString));</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toImmutableSetMultimap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toImmutableSetMultimap</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| K,​ |
| V></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/multimap/set/ImmutableSetMultimap.html" title="interface in org.eclipse.collections.api.multimap.set">ImmutableSetMultimap</a><K,​V>></span> <span class="memberName">toImmutableSetMultimap</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy, |
| <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> valueFunction)</span></div> |
| <div class="block"><p>Returns the elements as an ImmutableSetMultimap grouping each element using the specified groupBy Function and |
| converting each element to the value returned by applying the specified Function valueFunction.</p> |
| <p>Examples:</p> |
| <code>ImmutableSetMultimap<String, String> multimap1 = |
| Interval.oneTo(5).stream().collect(Collectors2.toImmutableSetMultimap(Object::toString, Object::toString));</code><br> |
| <code>ImmutableSetMultimap<String, String> multimap2 = |
| Interval.oneTo(5).reduceInPlace(Collectors2.toImmutableSetMultimap(Object::toString, Object::toString));</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toImmutableBagMultimap(org.eclipse.collections.api.block.function.Function)">toImmutableBagMultimap</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| K></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/multimap/bag/ImmutableBagMultimap.html" title="interface in org.eclipse.collections.api.multimap.bag">ImmutableBagMultimap</a><K,​T>></span> <span class="memberName">toImmutableBagMultimap</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy)</span></div> |
| <div class="block"><p>Returns the elements as an ImmutableBagMultimap grouping each element using the specified groupBy Function.</p> |
| <p>Examples:</p> |
| <code>ImmutableBagMultimap<String, Integer> multimap1 = |
| Interval.oneTo(5).stream().collect(Collectors2.toImmutableBagMultimap(Object::toString));</code><br> |
| <code>ImmutableBagMultimap<String, Integer> multimap2 = |
| Interval.oneTo(5).reduceInPlace(Collectors2.toImmutableBagMultimap(Object::toString));</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="toImmutableBagMultimap(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">toImmutableBagMultimap</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| K,​ |
| V></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/multimap/bag/ImmutableBagMultimap.html" title="interface in org.eclipse.collections.api.multimap.bag">ImmutableBagMultimap</a><K,​V>></span> <span class="memberName">toImmutableBagMultimap</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends K> groupBy, |
| <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> valueFunction)</span></div> |
| <div class="block"><p>Returns the elements as an ImmutableBagMultimap grouping each element using the specified groupBy Function and |
| converting each element to the value returned by applying the specified Function valueFunction.</p> |
| <p>Examples:</p> |
| <code>ImmutableBagMultimap<String, String> multimap1 = |
| Interval.oneTo(5).stream().collect(Collectors2.toImmutableBagMultimap(Object::toString, Object::toString));</code><br> |
| <code>ImmutableBagMultimap<String, String> multimap2 = |
| Interval.oneTo(5).reduceInPlace(Collectors2.toImmutableBagMultimap(Object::toString, Object::toString));</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="chunk(int)">chunk</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/list/MutableList.html" title="interface in org.eclipse.collections.api.list">MutableList</a><<a href="../../api/list/MutableList.html" title="interface in org.eclipse.collections.api.list">MutableList</a><T>>></span> <span class="memberName">chunk</span>​(<span class="arguments">int size)</span></div> |
| <div class="block"><p>Partitions elements in fixed size chunks.</p> |
| <p>Examples:</p> |
| <code>MutableList<MutableList<Integer>> chunks1 = Interval.oneTo(10).stream().collect(Collectors2.chunk(2));</code><br> |
| <code>MutableList<MutableList<Integer>> chunks2 = Interval.oneTo(10).reduceInPlace(Collectors2.chunk(2));</code> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#chunk(int)"><code>RichIterable.chunk(int)</code></a> |
| </p> |
| <code>LazyIterable<RichIterable<Integer>> chunks = Interval.oneTo(10).chunk(2);</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="zip(java.lang.Iterable)">zip</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| S></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/list/MutableList.html" title="interface in org.eclipse.collections.api.list">MutableList</a><<a href="../../api/tuple/Pair.html" title="interface in org.eclipse.collections.api.tuple">Pair</a><T,​S>>></span> <span class="memberName">zip</span>​(<span class="arguments"><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><S> other)</span></div> |
| <div class="block"><p>Returns a <code>MutableList</code> formed from this stream of elements and another <code>Iterable</code> by |
| combining corresponding elements in pairs.</p> |
| <p>If one of the two <code>Iterable</code>s is longer than the other, its remaining elements are ignored.</p> |
| <p>Examples:</p> |
| <code>MutableList<Pair<Integer, Integer>> zipped1 = Interval.oneTo(10).stream().collect(Collectors2.zip(Interval.oneTo(10)));</code><br> |
| <code>MutableList<Pair<Integer, Integer>> zipped2 = Interval.oneTo(10).reduceInPlace(Collectors2.zip(Interval.oneTo(10)));</code><br> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#zip(java.lang.Iterable)"><code>RichIterable.zip(Iterable)</code></a> |
| </p> |
| <code>LazyIterable<Pair<Integer, Integer>> zip = Interval.oneTo(10).zip(Interval.oneTo(10));</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="zipWithIndex()">zipWithIndex</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/list/MutableList.html" title="interface in org.eclipse.collections.api.list">MutableList</a><<a href="../../api/tuple/primitive/ObjectIntPair.html" title="interface in org.eclipse.collections.api.tuple.primitive">ObjectIntPair</a><T>>></span> <span class="memberName">zipWithIndex</span>()</div> |
| <div class="block"><p>Returns a <code>MutableList</code> of pairs formed from this stream of elements its indices.</p> |
| <p>Examples:</p> |
| <code>MutableList<ObjectIntPair<Integer>> zipWithIndex1 = Interval.oneTo(10).stream().collect(Collectors2.zipWithIndex());</code><br> |
| <code>MutableList<ObjectIntPair<Integer>> zipWithIndex2 = Interval.oneTo(10).reduceInPlace(Collectors2.zipWithIndex());</code> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#zipWithIndex()"><code>RichIterable.zipWithIndex()</code></a> |
| </p> |
| <code>LazyIterable<Pair<Integer, Integer>> zipWithIndex = Interval.oneTo(10).zipWithIndex();</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="sumByInt(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.primitive.IntFunction)">sumByInt</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| V></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/map/primitive/MutableObjectLongMap.html" title="interface in org.eclipse.collections.api.map.primitive">MutableObjectLongMap</a><V>></span> <span class="memberName">sumByInt</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> groupBy, |
| <a href="../../api/block/function/primitive/IntFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">IntFunction</a><? super T> function)</span></div> |
| <div class="block"><p>Groups and sums the values using the two specified functions.</p> |
| <p>Examples:</p> |
| <code>MutableObjectLongMap<Integer> sumBy1 = |
| Interval.oneTo(10).stream().collect(Collectors2.sumByInt(each -> Integer.valueOf(each % 2), Integer::intValue));</code><br> |
| <code>MutableObjectLongMap<Integer> sumBy2 = |
| Interval.oneTo(10).reduceInPlace(Collectors2.sumByInt(each -> Integer.valueOf(each % 2), Integer::intValue));</code><br> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#sumByInt(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.primitive.IntFunction)"><code>RichIterable.sumByInt(Function, IntFunction)</code></a> |
| </p> |
| <code>ObjectLongMap<Integer> sumBy = |
| Interval.oneTo(10).sumByInt(each -> Integer.valueOf(each % 2), Integer::intValue));</code><br></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="sumByLong(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.primitive.LongFunction)">sumByLong</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| V></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/map/primitive/MutableObjectLongMap.html" title="interface in org.eclipse.collections.api.map.primitive">MutableObjectLongMap</a><V>></span> <span class="memberName">sumByLong</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> groupBy, |
| <a href="../../api/block/function/primitive/LongFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">LongFunction</a><? super T> function)</span></div> |
| <div class="block"><p>Groups and sums the values using the two specified functions.</p> |
| <p>Examples:</p> |
| <code>MutableObjectLongMap<Long> sumBy1 = |
| Interval.oneTo(10).stream().collect(Collectors2.sumByLong(each -> Long.valueOf(each % 2), Integer::longValue));</code><br> |
| <code>MutableObjectLongMap<Long> sumBy2 = |
| Interval.oneTo(10).reduceInPlace(Collectors2.sumByLong(each -> Long.valueOf(each % 2), Integer::longValue));</code><br> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#sumByLong(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.primitive.LongFunction)"><code>RichIterable.sumByLong(Function, LongFunction)</code></a> |
| </p> |
| <code>ObjectLongMap<Long> sumBy = |
| Interval.oneTo(10).sumByLong(each -> Long.valueOf(each % 2), Integer::longValue));</code><br></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="sumByFloat(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.primitive.FloatFunction)">sumByFloat</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| V></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/map/primitive/MutableObjectDoubleMap.html" title="interface in org.eclipse.collections.api.map.primitive">MutableObjectDoubleMap</a><V>></span> <span class="memberName">sumByFloat</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> groupBy, |
| <a href="../../api/block/function/primitive/FloatFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">FloatFunction</a><? super T> function)</span></div> |
| <div class="block"><p>Groups and sums the values using the two specified functions.</p> |
| <p>Examples:</p> |
| <code>MutableObjectDoubleMap<Integer> sumBy1 = |
| Interval.oneTo(10).stream().collect(Collectors2.sumByFloat(each -> ((int)each % 2), Integer::floatValue));</code><br> |
| <code>MutableObjectDoubleMap<Integer> sumBy2 = |
| Interval.oneTo(10).reduceInPlace(Collectors2.sumByFloat(each -> ((int)each % 2), Integer::floatValue));</code><br> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#sumByFloat(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.primitive.FloatFunction)"><code>RichIterable.sumByFloat(Function, FloatFunction)</code></a> |
| </p> |
| <code>ObjectDoubleMap<Integer> sumBy = |
| Interval.oneTo(10).sumByFloat(each -> ((int)each % 2), Integer::floatValue));</code><br></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="sumByDouble(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.primitive.DoubleFunction)">sumByDouble</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| V></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/map/primitive/MutableObjectDoubleMap.html" title="interface in org.eclipse.collections.api.map.primitive">MutableObjectDoubleMap</a><V>></span> <span class="memberName">sumByDouble</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> groupBy, |
| <a href="../../api/block/function/primitive/DoubleFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">DoubleFunction</a><? super T> function)</span></div> |
| <div class="block"><p>Groups and sums the values using the two specified functions.</p> |
| <p>Examples:</p> |
| <code>MutableObjectDoubleMap<Integer> sumBy1 = |
| Interval.oneTo(10).stream().collect(Collectors2.sumByDouble(each -> ((int)each % 2), Integer::doubleValue));</code><br> |
| <code>MutableObjectDoubleMap<Integer> sumBy2 = |
| Interval.oneTo(10).reduceInPlace(Collectors2.sumByDouble(each -> ((int)each % 2), Integer::doubleValue));</code><br> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#sumByDouble(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.primitive.DoubleFunction)"><code>RichIterable.sumByDouble(Function, DoubleFunction)</code></a> |
| </p> |
| <code>ObjectDoubleMap<Integer> sumBy = |
| Interval.oneTo(10).sumByDouble(each -> ((int)each % 2), Integer::doubleValue));</code><br></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="sumByBigDecimal(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">sumByBigDecimal</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| V></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/map/MutableMap.html" title="interface in org.eclipse.collections.api.map">MutableMap</a><V,​<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math" class="externalLink">BigDecimal</a>>></span> <span class="memberName">sumByBigDecimal</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> groupBy, |
| <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math" class="externalLink">BigDecimal</a>> function)</span></div> |
| <div class="block"><p>Groups and sums the values using the two specified functions.</p> |
| <p>Examples:</p> |
| <code>MutableMap<Integer, BigDecimal> sumBy1 = |
| Interval.oneTo(10).stream().collect(Collectors2.sumByBigDecimal(each -> (each.intValue() % 2), BigDecimal::new));</code><br> |
| <code>MutableMap<Integer, BigDecimal> sumBy2 = |
| Interval.oneTo(10).reduceInPlace(Collectors2.sumByBigDecimal(each -> (each.intValue() % 2), BigDecimal::new));</code><br> |
| <p> |
| Equivalent to using @<a href="../utility/Iterate.html#sumByBigDecimal(java.lang.Iterable,org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)"><code>Iterate.sumByBigDecimal(Iterable, Function, Function)</code></a> |
| </p> |
| <code>MutableMap<Integer, BigDecimal> sumBy = |
| Iterate.sumByBigDecimal(Interval.oneTo(10), each -> (each.intValue() % 2), BigDecimal::new));</code><br></div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>8.1</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="sumByBigInteger(org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)">sumByBigInteger</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| V></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="../../api/map/MutableMap.html" title="interface in org.eclipse.collections.api.map">MutableMap</a><V,​<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math" class="externalLink">BigInteger</a>>></span> <span class="memberName">sumByBigInteger</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> groupBy, |
| <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math" class="externalLink">BigInteger</a>> function)</span></div> |
| <div class="block"><p>Groups and sums the values using the two specified functions.</p> |
| <p>Examples:</p> |
| <code>MutableMap<Integer, BigInteger> sumBy1 = |
| Interval.oneTo(10).stream().collect(Collectors2.sumByBigInteger(each -> (each.intValue() % 2), each -> BigInteger.valueOf(each.longValue())));</code><br> |
| <code>MutableMap<Integer, BigInteger> sumBy2 = |
| Interval.oneTo(10).reduceInPlace(Collectors2.sumByBigInteger(each -> (each.intValue() % 2), each -> BigInteger.valueOf(each.longValue())));</code><br> |
| <p> |
| Equivalent to using @<a href="../utility/Iterate.html#sumByBigInteger(java.lang.Iterable,org.eclipse.collections.api.block.function.Function,org.eclipse.collections.api.block.function.Function)"><code>Iterate.sumByBigInteger(Iterable, Function, Function)</code></a> |
| </p> |
| <code>MutableMap<Integer, BigInteger> sumBy = |
| Iterate.sumByBigInteger(Interval.oneTo(10), each -> (each.intValue() % 2), each -> BigInteger.valueOf(each.longValue())));</code><br></div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>8.1</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="select(org.eclipse.collections.api.block.predicate.Predicate,java.util.function.Supplier)">select</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| 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><T>></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></span> <span class="memberName">select</span>​(<span class="arguments"><a href="../../api/block/predicate/Predicate.html" title="interface in org.eclipse.collections.api.block.predicate">Predicate</a><? super T> predicate, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</span></div> |
| <div class="block"><p>Returns all elements of the stream that return true when evaluating the predicate. This method is also |
| commonly called filter. The new collection is created as the result of evaluating the provided Supplier.</p> |
| <p>Examples:</p> |
| <code>MutableList<Integer> evens1 = |
| Interval.oneTo(10).stream().collect(Collectors2.select(e -> e % 2 == 0, Lists.mutable::empty));</code><br> |
| <code>MutableList<Integer> evens2 = |
| Interval.oneTo(10).reduceInPlace(Collectors2.select(e -> e % 2 == 0, Lists.mutable::empty));</code><br> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#select(org.eclipse.collections.api.block.predicate.Predicate,R)"><code>RichIterable.select(Predicate, Collection)</code></a> |
| </p> |
| <code>MutableList<Integer> evens = Interval.oneTo(10).select(e -> e % 2 == 0, Lists.mutable.empty());</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="selectWith(org.eclipse.collections.api.block.predicate.Predicate2,java.lang.Object,java.util.function.Supplier)"> |
| <!-- --> |
| </a><a id="selectWith(org.eclipse.collections.api.block.predicate.Predicate2,P,java.util.function.Supplier)">selectWith</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| P,​ |
| 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><T>></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></span> <span class="memberName">selectWith</span>​(<span class="arguments"><a href="../../api/block/predicate/Predicate2.html" title="interface in org.eclipse.collections.api.block.predicate">Predicate2</a><? super T,​? super P> predicate, |
| P parameter, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</span></div> |
| <div class="block"><p>Returns all elements of the stream that return true when evaluating the predicate with the parameter. |
| The new collection is created as the result of evaluating the provided Supplier.</p> |
| <p>Examples:</p> |
| <code>MutableList<Integer> evens1 = |
| Interval.oneTo(10).stream().collect(Collectors2.selectWith((e, p) -> e % p == 0, 2, Lists.mutable::empty));</code><br> |
| <code>MutableList<Integer> evens2 = |
| Interval.oneTo(10).reduceInPlace(Collectors2.selectWith((e, p) -> e % p == 0, 2, Lists.mutable::empty));</code><br> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#selectWith(org.eclipse.collections.api.block.predicate.Predicate2,P,R)"><code>RichIterable.selectWith(Predicate2, Object, Collection)</code></a> |
| </p> |
| <code>MutableList<Integer> evens = Interval.oneTo(10).selectWith((e, p) -> e % p == 0, 2, Lists.mutable.empty());</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="reject(org.eclipse.collections.api.block.predicate.Predicate,java.util.function.Supplier)">reject</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| 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><T>></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></span> <span class="memberName">reject</span>​(<span class="arguments"><a href="../../api/block/predicate/Predicate.html" title="interface in org.eclipse.collections.api.block.predicate">Predicate</a><? super T> predicate, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</span></div> |
| <div class="block"><p>Returns all elements of the stream that return false when evaluating the predicate. This method is also |
| commonly called filterNot. The new collection is created as the result of evaluating the provided Supplier.</p> |
| <p>Examples:</p> |
| <code>MutableList<Integer> odds1 = |
| Interval.oneTo(10).stream().collect(Collectors2.reject(e -> e % 2 == 0, Lists.mutable::empty));</code><br> |
| <code>MutableList<Integer> odds2 = |
| Interval.oneTo(10).reduceInPlace(Collectors2.reject(e -> e % 2 == 0, Lists.mutable::empty));</code><br> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#reject(org.eclipse.collections.api.block.predicate.Predicate,R)"><code>RichIterable.reject(Predicate, Collection)</code></a> |
| </p> |
| <code>MutableList<Integer> odds = Interval.oneTo(10).reject(e -> e % 2 == 0, Lists.mutable.empty());</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="rejectWith(org.eclipse.collections.api.block.predicate.Predicate2,java.lang.Object,java.util.function.Supplier)"> |
| <!-- --> |
| </a><a id="rejectWith(org.eclipse.collections.api.block.predicate.Predicate2,P,java.util.function.Supplier)">rejectWith</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| P,​ |
| 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><T>></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></span> <span class="memberName">rejectWith</span>​(<span class="arguments"><a href="../../api/block/predicate/Predicate2.html" title="interface in org.eclipse.collections.api.block.predicate">Predicate2</a><? super T,​? super P> predicate, |
| P parameter, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</span></div> |
| <div class="block"><p>Returns all elements of the stream that return false when evaluating the predicate with the parameter. |
| The new collection is created as the result of evaluating the provided Supplier.</p> |
| <p>Examples:</p> |
| <code>MutableList<Integer> odds1 = |
| Interval.oneTo(10).stream().collect(Collectors2.rejectWith((e, p) -> e % p == 0, 2, Lists.mutable::empty));</code><br> |
| <code>MutableList<Integer> odds2 = |
| Interval.oneTo(10).reduceInPlace(Collectors2.rejectWith((e, p) -> e % p == 0, 2, Lists.mutable::empty));</code><br> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#rejectWith(org.eclipse.collections.api.block.predicate.Predicate2,P,R)"><code>RichIterable.rejectWith(Predicate2, Object, Collection)</code></a> |
| </p> |
| <code>MutableList<Integer> odds = Interval.oneTo(10).rejectWith((e, p) -> e % p == 0, 2, Lists.mutable.empty());</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="partition(org.eclipse.collections.api.block.predicate.Predicate,java.util.function.Supplier)">partition</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| R extends <a href="../../api/partition/PartitionMutableCollection.html" title="interface in org.eclipse.collections.api.partition">PartitionMutableCollection</a><T>></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></span> <span class="memberName">partition</span>​(<span class="arguments"><a href="../../api/block/predicate/Predicate.html" title="interface in org.eclipse.collections.api.block.predicate">Predicate</a><? super T> predicate, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</span></div> |
| <div class="block"><p>Returns all elements of the stream split into a PartitionMutableCollection after evaluating the predicate. |
| The new PartitionMutableCollection is created as the result of evaluating the provided Supplier.</p> |
| <p>Examples:</p> |
| <code>PartitionMutableList<Integer> evensAndOdds1 = |
| Interval.oneTo(10).stream().collect(Collectors2.partition(e -> e % 2 == 0, PartitionFastList::new));</code><br> |
| <code>PartitionMutableList<Integer> evensAndOdds2 = |
| Interval.oneTo(10).reduceInPlace(Collectors2.partition(e -> e % 2 == 0, PartitionFastList::new));</code><br> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#partition(org.eclipse.collections.api.block.predicate.Predicate)"><code>RichIterable.partition(Predicate)</code></a> |
| </p> |
| <code>PartitionMutableList<Integer> evensAndOdds = Interval.oneTo(10).partition(e -> e % 2 == 0);</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="partitionWith(org.eclipse.collections.api.block.predicate.Predicate2,java.lang.Object,java.util.function.Supplier)"> |
| <!-- --> |
| </a><a id="partitionWith(org.eclipse.collections.api.block.predicate.Predicate2,P,java.util.function.Supplier)">partitionWith</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| P,​ |
| R extends <a href="../../api/partition/PartitionMutableCollection.html" title="interface in org.eclipse.collections.api.partition">PartitionMutableCollection</a><T>></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></span> <span class="memberName">partitionWith</span>​(<span class="arguments"><a href="../../api/block/predicate/Predicate2.html" title="interface in org.eclipse.collections.api.block.predicate">Predicate2</a><? super T,​? super P> predicate, |
| P parameter, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</span></div> |
| <div class="block"><p>Returns all elements of the stream split into a PartitionMutableCollection after evaluating the predicate. |
| The new PartitionMutableCollection is created as the result of evaluating the provided Supplier.</p> |
| <p>Examples:</p> |
| <code>PartitionMutableList<Integer> evensAndOdds1 = |
| Interval.oneTo(10).stream().collect(Collectors2.partitionWith((e, p) -> e % p == 0, 2, PartitionFastList::new));</code><br> |
| <code>PartitionMutableList<Integer> evensAndOdds2 = |
| Interval.oneTo(10).reduceInPlace(Collectors2.partitionWith((e, p) -> e % p == 0, 2, PartitionFastList::new));</code><br> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#partitionWith(org.eclipse.collections.api.block.predicate.Predicate2,P)"><code>RichIterable.partitionWith(Predicate2, Object)</code></a> |
| </p> |
| <code>PartitionMutableList<Integer> evensAndOdds = Interval.oneTo(10).partitionWith((e, p) -> e % p == 0, 2);</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="collect(org.eclipse.collections.api.block.function.Function,java.util.function.Supplier)">collect</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| V,​ |
| 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><V>></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></span> <span class="memberName">collect</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? extends V> function, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</span></div> |
| <div class="block"><p>Returns a new collection with the results of applying the specified function on each element of the source |
| collection. This method is also commonly called transform or map. The new collection is created as the result |
| of evaluating the provided Supplier.</p> |
| <p>Examples:</p> |
| <code>MutableList<String> collect1 = |
| Interval.oneTo(10).stream().collect(Collectors2.collect(Object::toString, Lists.mutable::empty));</code><br> |
| <code>MutableList<String> collect2 = |
| Interval.oneTo(10).reduceInPlace(Collectors2.collect(Object::toString, Lists.mutable::empty));</code><br> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#collect(org.eclipse.collections.api.block.function.Function,R)"><code>RichIterable.collect(Function, Collection)</code></a> |
| </p> |
| <code>MutableList<String> collect = Interval.oneTo(10).collect(Object::toString, Lists.mutable.empty());</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="flatCollect(org.eclipse.collections.api.block.function.Function,java.util.function.Supplier)">flatCollect</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| V,​ |
| 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><V>></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></span> <span class="memberName">flatCollect</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​? 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><V>> function, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</span></div> |
| <div class="block">The method <code>flatCollect</code> is a special case of <a href="#collect(org.eclipse.collections.api.block.function.Function,java.util.function.Supplier)"><code>collect(Function, Supplier)</code></a>. With <code>collect</code>, |
| when the <a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function"><code>Function</code></a> returns a collection, the result is a collection of collections. <code>flatCollect</code> outputs |
| a single "flattened" collection instead. This method is commonly called flatMap. |
| <p>Example:</p> |
| <pre><code> |
| List<MutableList<String>> lists = |
| Lists.mutable.with( |
| Lists.mutable.with("a", "b"), |
| Lists.mutable.with("c", "d"), |
| Lists.mutable.with("e")); |
| |
| MutableList<String> flattened = |
| lists.stream().collect(Collectors2.flatCollect(l -> l, Lists.mutable::empty)); |
| |
| Assert.assertEquals(Lists.mutable.with("a", "b", "c", "d", "e"), flattened);</code></pre></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="collectWith(org.eclipse.collections.api.block.function.Function2,java.lang.Object,java.util.function.Supplier)"> |
| <!-- --> |
| </a><a id="collectWith(org.eclipse.collections.api.block.function.Function2,P,java.util.function.Supplier)">collectWith</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| P,​ |
| V,​ |
| 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><V>></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></span> <span class="memberName">collectWith</span>​(<span class="arguments"><a href="../../api/block/function/Function2.html" title="interface in org.eclipse.collections.api.block.function">Function2</a><? super T,​? super P,​? extends V> function, |
| P parameter, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</span></div> |
| <div class="block"><p>Returns a new collection with the results of applying the specified function on each element of the source |
| collection with the specified parameter. This method is also commonly called transform or map. The new collection |
| is created as the result of evaluating the provided Supplier.</p> |
| <p>Examples:</p> |
| <code>MutableList<Integer> collect1 = |
| Interval.oneTo(10).stream().collect(Collectors2.collectWith(Integer::sum, Integer.valueOf(10), Lists.mutable::empty));</code><br> |
| <code>MutableList<Integer> collect2 = |
| Interval.oneTo(10).reduceInPlace(Collectors2.collectWith(Integer::sum, Integer.valueOf(10), Lists.mutable::empty));</code><br> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#collectWith(org.eclipse.collections.api.block.function.Function2,P,R)"><code>RichIterable.collectWith(Function2, Object, Collection)</code></a> |
| </p> |
| <code>MutableList<Integer> collect = Interval.oneTo(10).collectWith(Integer::sum, Integer.valueOf(10), Lists.mutable.empty());</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="collectBoolean(org.eclipse.collections.api.block.function.primitive.BooleanFunction,java.util.function.Supplier)">collectBoolean</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| R extends <a href="../../api/collection/primitive/MutableBooleanCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableBooleanCollection</a>></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></span> <span class="memberName">collectBoolean</span>​(<span class="arguments"><a href="../../api/block/function/primitive/BooleanFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">BooleanFunction</a><? super T> function, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</span></div> |
| <div class="block"><p>Returns a new MutableBooleanCollection with the results of applying the specified BooleanFunction on each element |
| of the source. The new collection is created as the result of evaluating the provided Supplier.</p> |
| <p>Examples:</p> |
| <code>MutableBooleanList collect1 = |
| Interval.oneTo(10).stream().collect(Collectors2.collectBoolean(each -> each % 2 == 0, BooleanLists.mutable::empty));</code><br> |
| <code>MutableBooleanList collect2 = |
| Interval.oneTo(10).reduceInPlace(Collectors2.collectBoolean(each -> each % 2 == 0, BooleanLists.mutable::empty));</code><br> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#collectBoolean(org.eclipse.collections.api.block.function.primitive.BooleanFunction,R)"><code>RichIterable.collectBoolean(BooleanFunction, MutableBooleanCollection)</code></a> |
| </p> |
| <code>MutableBooleanList collect = |
| Interval.oneTo(10).collectBoolean(each -> each % 2 == 0, BooleanLists.mutable.empty());</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="collectByte(org.eclipse.collections.api.block.function.primitive.ByteFunction,java.util.function.Supplier)">collectByte</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| R extends <a href="../../api/collection/primitive/MutableByteCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableByteCollection</a>></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></span> <span class="memberName">collectByte</span>​(<span class="arguments"><a href="../../api/block/function/primitive/ByteFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">ByteFunction</a><? super T> function, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</span></div> |
| <div class="block"><p>Returns a new MutableByteCollection with the results of applying the specified ByteFunction on each element |
| of the source. The new collection is created as the result of evaluating the provided Supplier.</p> |
| <p>Examples:</p> |
| <code>MutableByteList collect1 = |
| Interval.oneTo(10).stream().collect(Collectors2.collectByte(each -> (byte) (each % Byte.MAX_VALUE), ByteLists.mutable::empty));</code><br> |
| <code>MutableByteList collect2 = |
| Interval.oneTo(10).reduceInPlace(Collectors2.collectByte(each -> (byte) (each % Byte.MAX_VALUE), ByteLists.mutable::empty));</code><br> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#collectByte(org.eclipse.collections.api.block.function.primitive.ByteFunction,R)"><code>RichIterable.collectByte(ByteFunction, MutableByteCollection)</code></a> |
| </p> |
| <code>MutableByteList collect = |
| Interval.oneTo(10).collectByte(each -> (byte) (each % Byte.MAX_VALUE), ByteLists.mutable.empty());</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="collectChar(org.eclipse.collections.api.block.function.primitive.CharFunction,java.util.function.Supplier)">collectChar</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| R extends <a href="../../api/collection/primitive/MutableCharCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableCharCollection</a>></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></span> <span class="memberName">collectChar</span>​(<span class="arguments"><a href="../../api/block/function/primitive/CharFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">CharFunction</a><? super T> function, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</span></div> |
| <div class="block"><p>Returns a new MutableCharCollection with the results of applying the specified CharFunction on each element |
| of the source. The new collection is created as the result of evaluating the provided Supplier.</p> |
| <p>Examples:</p> |
| <code>MutableCharList collect1 = |
| Interval.oneTo(10).stream().collect(Collectors2.collectChar(each -> (char) (each % Character.MAX_VALUE), CharLists.mutable::empty));</code><br> |
| <code>MutableCharList collect2 = |
| Interval.oneTo(10).reduceInPlace(Collectors2.collectChar(each -> (char) (each % Character.MAX_VALUE), CharLists.mutable::empty));</code><br> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#collectChar(org.eclipse.collections.api.block.function.primitive.CharFunction,R)"><code>RichIterable.collectChar(CharFunction, MutableCharCollection)</code></a> |
| </p> |
| <code>MutableCharList collect = |
| Interval.oneTo(10).collectChar(each -> (char) (each % Character.MAX_VALUE), CharLists.mutable.empty());</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="collectShort(org.eclipse.collections.api.block.function.primitive.ShortFunction,java.util.function.Supplier)">collectShort</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| R extends <a href="../../api/collection/primitive/MutableShortCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableShortCollection</a>></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></span> <span class="memberName">collectShort</span>​(<span class="arguments"><a href="../../api/block/function/primitive/ShortFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">ShortFunction</a><? super T> function, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</span></div> |
| <div class="block"><p>Returns a new MutableShortCollection with the results of applying the specified ShortFunction on each element |
| of the source. The new collection is created as the result of evaluating the provided Supplier.</p> |
| <p>Examples:</p> |
| <code>MutableShortList collect1 = |
| Interval.oneTo(10).stream().collect(Collectors2.collectShort(each -> (short) (each % Short.MAX_VALUE), ShortLists.mutable::empty));</code><br> |
| <code>MutableShortList collect2 = |
| Interval.oneTo(10).reduceInPlace(Collectors2.collectShort(each -> (short) (each % Short.MAX_VALUE), ShortLists.mutable::empty));</code><br> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#collectShort(org.eclipse.collections.api.block.function.primitive.ShortFunction,R)"><code>RichIterable.collectShort(ShortFunction, MutableShortCollection)</code></a> |
| </p> |
| <code>MutableShortList collect = |
| Interval.oneTo(10).collectShort(each -> (short) (each % Short.MAX_VALUE), ShortLists.mutable.empty());</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="collectInt(org.eclipse.collections.api.block.function.primitive.IntFunction,java.util.function.Supplier)">collectInt</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| R extends <a href="../../api/collection/primitive/MutableIntCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableIntCollection</a>></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></span> <span class="memberName">collectInt</span>​(<span class="arguments"><a href="../../api/block/function/primitive/IntFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">IntFunction</a><? super T> function, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</span></div> |
| <div class="block"><p>Returns a new MutableIntCollection with the results of applying the specified IntFunction on each element |
| of the source. The new collection is created as the result of evaluating the provided Supplier.</p> |
| <p>Examples:</p> |
| <code>MutableIntList collect1 = |
| Interval.oneTo(10).stream().collect(Collectors2.collectInt(each -> each, IntLists.mutable::empty));</code><br> |
| <code>MutableIntList collect2 = |
| Interval.oneTo(10).reduceInPlace(Collectors2.collectInt(each -> each, IntLists.mutable::empty));</code><br> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#collectInt(org.eclipse.collections.api.block.function.primitive.IntFunction,R)"><code>RichIterable.collectInt(IntFunction, MutableIntCollection)</code></a> |
| </p> |
| <code>MutableIntList collect = |
| Interval.oneTo(10).collectInt(each -> each, IntLists.mutable.empty());</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="collectFloat(org.eclipse.collections.api.block.function.primitive.FloatFunction,java.util.function.Supplier)">collectFloat</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| R extends <a href="../../api/collection/primitive/MutableFloatCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableFloatCollection</a>></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></span> <span class="memberName">collectFloat</span>​(<span class="arguments"><a href="../../api/block/function/primitive/FloatFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">FloatFunction</a><? super T> function, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</span></div> |
| <div class="block"><p>Returns a new MutableFloatCollection with the results of applying the specified FloatFunction on each element |
| of the source. The new collection is created as the result of evaluating the provided Supplier.</p> |
| <p>Examples:</p> |
| <code>MutableFloatList collect1 = |
| Interval.oneTo(10).stream().collect(Collectors2.collectFloat(each -> (float) each, FloatLists.mutable::empty));</code><br> |
| <code>MutableFloatList collect2 = |
| Interval.oneTo(10).reduceInPlace(Collectors2.collectFloat(each -> (float) each, FloatLists.mutable::empty));</code><br> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#collectFloat(org.eclipse.collections.api.block.function.primitive.FloatFunction,R)"><code>RichIterable.collectFloat(FloatFunction, MutableFloatCollection)</code></a> |
| </p> |
| <code>MutableFloatList collect = |
| Interval.oneTo(10).collectFloat(each -> (float) each, FloatLists.mutable.empty());</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="collectLong(org.eclipse.collections.api.block.function.primitive.LongFunction,java.util.function.Supplier)">collectLong</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| R extends <a href="../../api/collection/primitive/MutableLongCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableLongCollection</a>></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></span> <span class="memberName">collectLong</span>​(<span class="arguments"><a href="../../api/block/function/primitive/LongFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">LongFunction</a><? super T> function, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</span></div> |
| <div class="block"><p>Returns a new MutableLongCollection with the results of applying the specified LongFunction on each element |
| of the source. The new collection is created as the result of evaluating the provided Supplier.</p> |
| <p>Examples:</p> |
| <code>MutableLongList collect1 = |
| Interval.oneTo(10).stream().collect(Collectors2.collectLong(each -> (long) each, LongLists.mutable::empty));</code><br> |
| <code>MutableLongList collect2 = |
| Interval.oneTo(10).reduceInPlace(Collectors2.collectLong(each -> (long) each, LongLists.mutable::empty));</code><br> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#collectLong(org.eclipse.collections.api.block.function.primitive.LongFunction,R)"><code>RichIterable.collectLong(LongFunction, MutableLongCollection)</code></a> |
| </p> |
| <code>MutableLongList collect = |
| Interval.oneTo(10).collectLong(each -> (long) each, LongLists.mutable.empty());</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="collectDouble(org.eclipse.collections.api.block.function.primitive.DoubleFunction,java.util.function.Supplier)">collectDouble</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T,​ |
| R extends <a href="../../api/collection/primitive/MutableDoubleCollection.html" title="interface in org.eclipse.collections.api.collection.primitive">MutableDoubleCollection</a>></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​R></span> <span class="memberName">collectDouble</span>​(<span class="arguments"><a href="../../api/block/function/primitive/DoubleFunction.html" title="interface in org.eclipse.collections.api.block.function.primitive">DoubleFunction</a><? super T> function, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html?is-external=true" title="class or interface in java.util.function" class="externalLink">Supplier</a><R> supplier)</span></div> |
| <div class="block"><p>Returns a new MutableDoubleCollection with the results of applying the specified DoubleFunction on each element |
| of the source. The new collection is created as the result of evaluating the provided Supplier.</p> |
| <p>Examples:</p> |
| <code>MutableDoubleList collect1 = |
| Interval.oneTo(10).stream().collect(Collectors2.collectDouble(each -> (double) each, DoubleLists.mutable::empty));</code><br> |
| <code>MutableDoubleList collect2 = |
| Interval.oneTo(10).reduceInPlace(Collectors2.collectDouble(each -> (double) each, DoubleLists.mutable::empty));</code><br> |
| <p> |
| Equivalent to using @<a href="../../api/RichIterable.html#collectDouble(org.eclipse.collections.api.block.function.primitive.DoubleFunction,R)"><code>RichIterable.collectDouble(DoubleFunction, MutableDoubleCollection)</code></a> |
| </p> |
| <code>MutableDoubleList collect = |
| Interval.oneTo(10).collectDouble(each -> (double) each, DoubleLists.mutable.empty());</code></div> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="summarizingBigDecimal(org.eclipse.collections.api.block.function.Function)">summarizingBigDecimal</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="BigDecimalSummaryStatistics.html" title="class in org.eclipse.collections.impl.collector">BigDecimalSummaryStatistics</a>></span> <span class="memberName">summarizingBigDecimal</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math" class="externalLink">BigDecimal</a>> function)</span></div> |
| <div class="block">Returns a BigDecimalSummaryStatistics applying the specified function to each element of the stream or collection.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>8.1</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="summarizingBigInteger(org.eclipse.collections.api.block.function.Function)">summarizingBigInteger</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T></span> |
| <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="BigIntegerSummaryStatistics.html" title="class in org.eclipse.collections.impl.collector">BigIntegerSummaryStatistics</a>></span> <span class="memberName">summarizingBigInteger</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math" class="externalLink">BigInteger</a>> function)</span></div> |
| <div class="block">Returns a BigIntegerSummaryStatistics applying the specified function to each element of the stream or collection.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>8.1</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="summingBigDecimal(org.eclipse.collections.api.block.function.Function)">summingBigDecimal</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T></span> <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math" class="externalLink">BigDecimal</a>></span> <span class="memberName">summingBigDecimal</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math" class="externalLink">BigDecimal</a>> function)</span></div> |
| <div class="block">Returns a BigDecimal sum applying the specified function to each element of the stream or collection.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>8.1</dd> |
| </dl> |
| </section> |
| </li> |
| <li class="blockList"> |
| <section class="detail"> |
| <h3><a id="summingBigInteger(org.eclipse.collections.api.block.function.Function)">summingBigInteger</a></h3> |
| <div class="memberSignature"><span class="modifiers">public static</span> <span class="typeParameters"><T></span> <span class="returnType"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/stream/Collector.html?is-external=true" title="class or interface in java.util.stream" class="externalLink">Collector</a><T,​?,​<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math" class="externalLink">BigInteger</a>></span> <span class="memberName">summingBigInteger</span>​(<span class="arguments"><a href="../../api/block/function/Function.html" title="interface in org.eclipse.collections.api.block.function">Function</a><? super T,​<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math" class="externalLink">BigInteger</a>> function)</span></div> |
| <div class="block">Returns a BigInteger sum applying the specified function to each element of the stream or collection.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>8.1</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/Collectors2.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: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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 © 2004–2020. All rights reserved.</small></p> |
| </footer> |
| </div> |
| </div> |
| </body> |
| </html> |