| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (9.0.1) on Fri Dec 28 04:30:34 EST 2018 --> |
| <title>JsonCollectors (JSR 374 (JSON Processing) API 1.1.5 API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="date" content="2018-12-28"> |
| <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../jquery/jquery-ui.css" title="Style"> |
| <script type="text/javascript" src="../../../script.js"></script> |
| <script type="text/javascript" src="../../../jquery/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="../../../jquery/jquery-1.10.2.js"></script> |
| <script type="text/javascript" src="../../../jquery/jquery-ui.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="JsonCollectors (JSR 374 (JSON Processing) API 1.1.5 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":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="fixedNav"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../overview-summary.html">Overview</a></li> |
| <li><a href="../../../java.json-summary.html">Module</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/JsonCollectors.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"> |
| <ul class="navList"> |
| <li>Prev Class</li> |
| <li><a href="../../../javax/json/stream/JsonGenerationException.html" title="class in javax.json.stream"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?javax/json/stream/JsonCollectors.html" target="_top">Frames</a></li> |
| <li><a href="JsonCollectors.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><span>SEARCH: </span> |
| <input type="text" id="search" value=" " disabled="disabled"> |
| <input type="reset" id="reset" value=" " disabled="disabled"> |
| </li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <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> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle"><span class="moduleLabelInType">Module</span> <a href="../../../java.json-summary.html">java.json</a></div> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="../../../javax/json/stream/package-summary.html">javax.json.stream</a></div> |
| <h2 title="Class JsonCollectors" class="title">Class JsonCollectors</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>javax.json.stream.JsonCollectors</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public final class <span class="typeNameLabel">JsonCollectors</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">Object</a></pre> |
| <div class="block">This class contains some implementations of <code>java.util.stream.Collector</code> for accumulating |
| <a href="../../../javax/json/JsonValue.html" title="interface in javax.json"><code>JsonValue</code></a>s into <a href="../../../javax/json/JsonArray.html" title="interface in javax.json"><code>JsonArray</code></a> and <a href="../../../javax/json/JsonObject.html" title="interface in javax.json"><code>JsonObject</code></a>.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.1</dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <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> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>static <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">Collector</a><<a href="../../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="../../../javax/json/JsonArrayBuilder.html" title="interface in javax.json">JsonArrayBuilder</a>>,<a href="../../../javax/json/JsonObject.html" title="interface in javax.json">JsonObject</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../javax/json/stream/JsonCollectors.html#groupingBy-java.util.function.Function-">groupingBy</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html?is-external=true" title="class or interface in java.util.function">Function</a><<a href="../../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> classifier)</code></th> |
| <td class="colLast"> |
| <div class="block">Constructs a <code>java.util.stream.Collector</code> that implements a "group by" operation on the |
| input <code>JsonValue</code> elements.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>static <T extends <a href="../../../javax/json/JsonArrayBuilder.html" title="interface in javax.json">JsonArrayBuilder</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">Collector</a><<a href="../../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,T>,<a href="../../../javax/json/JsonObject.html" title="interface in javax.json">JsonObject</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../javax/json/stream/JsonCollectors.html#groupingBy-java.util.function.Function-java.util.stream.Collector-">groupingBy</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html?is-external=true" title="class or interface in java.util.function">Function</a><<a href="../../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> classifier, |
| <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">Collector</a><<a href="../../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a>,T,<a href="../../../javax/json/JsonArray.html" title="interface in javax.json">JsonArray</a>> downstream)</code></th> |
| <td class="colLast"> |
| <div class="block">Constructs a <code>java.util.stream.Collector</code> that implements a "group by" operation on the |
| input <code>JsonValue</code> elements.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>static <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">Collector</a><<a href="../../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a>,<a href="../../../javax/json/JsonArrayBuilder.html" title="interface in javax.json">JsonArrayBuilder</a>,<a href="../../../javax/json/JsonArray.html" title="interface in javax.json">JsonArray</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../javax/json/stream/JsonCollectors.html#toJsonArray--">toJsonArray</a></span>​()</code></th> |
| <td class="colLast"> |
| <div class="block">Constructs a <code>java.util.stream.Collector</code> that accumulates the input <code>JsonValue</code> |
| elements into a <code>JsonArray</code>.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static <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">Collector</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">Map.Entry</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="../../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a>>,<a href="../../../javax/json/JsonObjectBuilder.html" title="interface in javax.json">JsonObjectBuilder</a>,<a href="../../../javax/json/JsonObject.html" title="interface in javax.json">JsonObject</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../javax/json/stream/JsonCollectors.html#toJsonObject--">toJsonObject</a></span>​()</code></th> |
| <td class="colLast"> |
| <div class="block">Constructs a <code>java.util.stream.Collector</code> that accumulates the input <code>Map.Entry<String,JsonValue></code> |
| elements into a <code>JsonObject</code>.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static <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">Collector</a><<a href="../../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a>,<a href="../../../javax/json/JsonObjectBuilder.html" title="interface in javax.json">JsonObjectBuilder</a>,<a href="../../../javax/json/JsonObject.html" title="interface in javax.json">JsonObject</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../javax/json/stream/JsonCollectors.html#toJsonObject-java.util.function.Function-java.util.function.Function-">toJsonObject</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html?is-external=true" title="class or interface in java.util.function">Function</a><<a href="../../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> keyMapper, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html?is-external=true" title="class or interface in java.util.function">Function</a><<a href="../../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a>,<a href="../../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a>> valueMapper)</code></th> |
| <td class="colLast"> |
| <div class="block">Constructs a <code>java.util.stream.Collector</code> that accumulates the input <code>JsonValue</code> |
| elements into a <code>JsonObject</code>.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <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">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <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">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</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">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">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">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">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">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">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">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">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="toJsonArray--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toJsonArray</h4> |
| <pre>public static <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">Collector</a><<a href="../../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a>,<a href="../../../javax/json/JsonArrayBuilder.html" title="interface in javax.json">JsonArrayBuilder</a>,<a href="../../../javax/json/JsonArray.html" title="interface in javax.json">JsonArray</a>> toJsonArray​()</pre> |
| <div class="block">Constructs a <code>java.util.stream.Collector</code> that accumulates the input <code>JsonValue</code> |
| elements into a <code>JsonArray</code>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the constructed Collector</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="toJsonObject--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toJsonObject</h4> |
| <pre>public static <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">Collector</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">Map.Entry</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="../../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a>>,<a href="../../../javax/json/JsonObjectBuilder.html" title="interface in javax.json">JsonObjectBuilder</a>,<a href="../../../javax/json/JsonObject.html" title="interface in javax.json">JsonObject</a>> toJsonObject​()</pre> |
| <div class="block">Constructs a <code>java.util.stream.Collector</code> that accumulates the input <code>Map.Entry<String,JsonValue></code> |
| elements into a <code>JsonObject</code>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the constructed Collector</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="toJsonObject-java.util.function.Function-java.util.function.Function-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toJsonObject</h4> |
| <pre>public static <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">Collector</a><<a href="../../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a>,<a href="../../../javax/json/JsonObjectBuilder.html" title="interface in javax.json">JsonObjectBuilder</a>,<a href="../../../javax/json/JsonObject.html" title="interface in javax.json">JsonObject</a>> toJsonObject​(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html?is-external=true" title="class or interface in java.util.function">Function</a><<a href="../../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> keyMapper, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html?is-external=true" title="class or interface in java.util.function">Function</a><<a href="../../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a>,<a href="../../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a>> valueMapper)</pre> |
| <div class="block">Constructs a <code>java.util.stream.Collector</code> that accumulates the input <code>JsonValue</code> |
| elements into a <code>JsonObject</code>. The name/value pairs of the <code>JsonObject</code> are computed |
| by applying the provided mapping functions.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>keyMapper</code> - a mapping function to produce names.</dd> |
| <dd><code>valueMapper</code> - a mapping function to produce values</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the constructed Collector</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="groupingBy-java.util.function.Function-java.util.stream.Collector-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>groupingBy</h4> |
| <pre>public static <T extends <a href="../../../javax/json/JsonArrayBuilder.html" title="interface in javax.json">JsonArrayBuilder</a>> <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">Collector</a><<a href="../../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,T>,<a href="../../../javax/json/JsonObject.html" title="interface in javax.json">JsonObject</a>> groupingBy​(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html?is-external=true" title="class or interface in java.util.function">Function</a><<a href="../../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> classifier, |
| <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">Collector</a><<a href="../../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a>,T,<a href="../../../javax/json/JsonArray.html" title="interface in javax.json">JsonArray</a>> downstream)</pre> |
| <div class="block">Constructs a <code>java.util.stream.Collector</code> that implements a "group by" operation on the |
| input <code>JsonValue</code> elements. A classifier function maps the input <code>JsonValue</code>s to keys, and |
| the <code>JsonValue</code>s are partitioned into groups according to the value of the key. |
| A reduction operation is performed on the <code>JsonValue</code>s in each group, using the |
| downstream <code>Collector</code>. For each group, the key and the results of the reduction operation |
| become the name/value pairs of the resultant <code>JsonObject</code>.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - the intermediate accumulation <code>JsonArrayBuilder</code> of the downstream collector</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>classifier</code> - a function mapping the input <code>JsonValue</code>s to a String, producing keys</dd> |
| <dd><code>downstream</code> - a <code>Collector</code> that implements a reduction operation on the |
| <code>JsonValue</code>s in each group.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the constructed <code>Collector</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="groupingBy-java.util.function.Function-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>groupingBy</h4> |
| <pre>public static <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">Collector</a><<a href="../../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="../../../javax/json/JsonArrayBuilder.html" title="interface in javax.json">JsonArrayBuilder</a>>,<a href="../../../javax/json/JsonObject.html" title="interface in javax.json">JsonObject</a>> groupingBy​(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html?is-external=true" title="class or interface in java.util.function">Function</a><<a href="../../../javax/json/JsonValue.html" title="interface in javax.json">JsonValue</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> classifier)</pre> |
| <div class="block">Constructs a <code>java.util.stream.Collector</code> that implements a "group by" operation on the |
| input <code>JsonValue</code> elements. A classifier function maps the input <code>JsonValue</code>s to keys, and |
| the <code>JsonValue</code>s are partitioned into groups according to the value of the key. |
| The <code>JsonValue</code>s in each group are added to a <code>JsonArray</code>. The key and the |
| <code>JsonArray</code> in each group becomes the name/value pair of the resultant <code>JsonObject</code>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>classifier</code> - a function mapping the input <code>JsonValue</code>s to a String, producing keys</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the constructed <code>Collector</code></dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../overview-summary.html">Overview</a></li> |
| <li><a href="../../../java.json-summary.html">Module</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/JsonCollectors.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"> |
| <ul class="navList"> |
| <li>Prev Class</li> |
| <li><a href="../../../javax/json/stream/JsonGenerationException.html" title="class in javax.json.stream"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?javax/json/stream/JsonCollectors.html" target="_top">Frames</a></li> |
| <li><a href="JsonCollectors.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <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> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2012-2018, <a href="http://www.oracle.com">Oracle</a> and/or its affiliates. All Rights Reserved. Use is subject to <a href="../../../doc-files/speclicense.html" target="_top">license terms</a>. <br>Comments to : jsonp-dev@eclipse.org</small></p> |
| </body> |
| </html> |