OpenJDK / lambda / lambda / jdk
changeset 7621:622996f1e9f2
Merge
author | mduigou |
---|---|
date | Tue, 12 Mar 2013 17:46:41 -0700 |
parents | c4384d0a2706 d2dc88bd3817 |
children | 85912d2b4773 |
files | |
diffstat | 5 files changed, 135 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/classes/java/lang/invoke/LambdaForm.java Tue Mar 12 17:45:56 2013 -0700 +++ b/src/share/classes/java/lang/invoke/LambdaForm.java Tue Mar 12 17:46:41 2013 -0700 @@ -69,7 +69,7 @@ * A lambda has a void result if and only if its result index is -1. * If a temporary has the type "V", it cannot be the subject of a NameRef, * even though possesses a number. - * Note that all reference types are erased to "L", which stands for {@code Object). + * Note that all reference types are erased to "L", which stands for {@code Object}. * All subword types (boolean, byte, short, char) are erased to "I" which is {@code int}. * The other types stand for the usual primitive types. * <p>
--- a/src/share/classes/java/util/SortedSet.java Tue Mar 12 17:45:56 2013 -0700 +++ b/src/share/classes/java/util/SortedSet.java Tue Mar 12 17:46:41 2013 -0700 @@ -222,7 +222,7 @@ /** * Creates a {@code Spliterator}, over the elements in this sorted set, that - * reports {@code SIZED}, {@code DISTINCT}, {@ocde SORTED} and + * reports {@code SIZED}, {@code DISTINCT}, {@code SORTED} and * {@code ORDERED}. Overriding implementations are expected to document if * the {@code Spliterator} reports any additional and relevant * characteristic values.
--- a/src/share/classes/java/util/stream/ForEachOps.java Tue Mar 12 17:45:56 2013 -0700 +++ b/src/share/classes/java/util/stream/ForEachOps.java Tue Mar 12 17:46:41 2013 -0700 @@ -34,7 +34,7 @@ import java.util.Objects; /** - * A factory for creating instances of {@code TerminalOp) that implement + * A factory for creating instances of {@code TerminalOp} that implement * {@code forEach} or {@code forEachUntil} traversal over elements of a stream. * * <p>{@code forEach} traverses all elements of a stream and sends those
--- a/src/share/classes/java/util/stream/Node.java Tue Mar 12 17:45:56 2013 -0700 +++ b/src/share/classes/java/util/stream/Node.java Tue Mar 12 17:46:41 2013 -0700 @@ -64,7 +64,7 @@ * Returns a {@link Spliterator} describing the elements contained in this * {@code Node}. * - * @return a {@code Spliterator describing the elements contained in this + * @return a {@code Spliterator} describing the elements contained in this * {@code Node}. */ Spliterator<T> spliterator();
--- a/src/share/classes/java/util/stream/StreamOpFlag.java Tue Mar 12 17:45:56 2013 -0700 +++ b/src/share/classes/java/util/stream/StreamOpFlag.java Tue Mar 12 17:46:41 2013 -0700 @@ -39,12 +39,68 @@ * and terminal operations. Not all stream flags are meaningful for all * entities; the following table summarizes which flags are meaningful in what * contexts: - * <pre> - * DISTINCT SORTED ORDERED SIZED SHORT_CIRCUIT PARALLEL - * Stream source Y Y Y Y N Y - * Intermediate operation PCI PCI PCI PC PI PC - * Terminal operation N N PC N PI N - * </pre> + * + * <div> + * <table> + * <caption>Type Characteristics</caption> + * <thead class="tableSubHeadingColor"> + * <tr> + * <th colspan="2"> </th> + * <th>{@code DISTINCT}</th> + * <th>{@code SORTED}</th> + * <th>{@code ORDERED}</th> + * <th>{@code SIZED}</th> + * <th>{@code SHORT_CIRCUIT}</th> + * <th>{@code PARALLEL}</th> + * </tr> + * </thead> + * <tbody> + * <tr> + * <th colspan="2" class="tableSubHeadingColor">Stream source</th> + * <td>Y</td> + * <td>Y</td> + * <td>Y</td> + * <td>Y</td> + * <td>N</td> + * <td>Y</td> + * </tr> + * <tr> + * <th colspan="2" class="tableSubHeadingColor">Intermediate operation</th> + * <td>PCI</td> + * <td>PCI</td> + * <td>PCI</td> + * <td>PC</td> + * <td>PI</td> + * <td>PC</td> + * </tr> + * <tr> + * <th colspan="2" class="tableSubHeadingColor">Terminal operation</th> + * <td>N</td> + * <td>N</td> + * <td>PC</td> + * <td>N</td> + * <td>PI</td> + * <td>N</td> + * </tr> +* </tbody> +* <tfoot> +* <tr> +* <th class="tableSubHeadingColor" colspan="2">Legend</th> +* <th colspan="6" rowspan="7"> </th> +* </tr> +* <tr> +* <th class="tableSubHeadingColor">Flag</th> +* <th class="tableSubHeadingColor">Meaning</th> +* <th colspan="6"></th> +* </tr> +* <tr><td>Y</td><td>Allowed</td></tr> +* <tr><td>N</td><td>Invalid</td></tr> +* <tr><td>P</td><td>Preserves</td></tr> +* <tr><td>C</td><td>Clears</td></tr> +* <tr><td>I</td><td>Injects</td></tr> +* </tfoot> + * </table> + * </div> * * <p>In the above table, "PCI" means "may preserve, clear, or inject"; "PC" * means "may preserve or clear", "PI" means "may preserve or inject", and "N" @@ -158,24 +214,81 @@ * Each characteristic takes up 2 bits in a bit set to accommodate * preserving, clearing and setting/injecting information. * - * This applies to stream flags, intermediate/terminal operation flags, and + * <p>This applies to stream flags, intermediate/terminal operation flags, and * combined stream and operation flags. Even though the former only requires * 1 bit of information per characteristic, is it more efficient when * combining flags to align set and inject bits. * - * Characteristics belong to certain types, see the Type enum. Bit masks for + * <p>Characteristics belong to certain types, see the Type enum. Bit masks for * the types are constructed as per the following table: * - * DISTINCT SORTED ORDERED SIZED SHORT_CIRCUIT PARALLEL - * SPLITERATOR 01 01 01 01 00 00 - * STREAM 01 01 01 01 00 01 - * OP 11 11 11 10 01 10 - * TERMINAL_OP 00 00 10 00 01 00 - * UPSTREAM_TERMINAL_OP 00 00 10 00 00 00 - * - * 01 = set/inject - * 10 = clear - * 11 = preserve + * <div> + * <table> + * <caption>Type Characteristics</caption> + * <thead> + * <tr> + * <th>{@code DISTINCT}</th> + * <th>{@code SORTED}</th> + * <th>{@code ORDERED}</th> + * <th>{@code SIZED}</th> + * <th>{@code SHORT_CIRCUIT}</th> + * <th>{@code PARALLEL}</th> + * </tr> + * </thead> + * <tbody> + * <tr> + * <th>{@code SPLITERATOR}</th> + * <td>{@code 01}</td> + * <td>{@code 01}</td> + * <td>{@code 01}</td> + * <td>{@code 01}</td> + * <td>{@code 00}</td> + * <td>{@code 00}</td> + * </tr> + * <tr> + * <th>{@code STREAM}</th> + * <td>{@code 01}</td> + * <td>{@code 01}</td> + * <td>{@code 01}</td> + * <td>{@code 01}</td> + * <td>{@code 00}</td> + * <td>{@code 01}</td> + * </tr> + * <tr> + * <th>{@code OP}</th> + * <td>{@code 11}</td> + * <td>{@code 11}</td> + * <td>{@code 11}</td> + * <td>{@code 10}</td> + * <td>{@code 01}</td> + * <td>{@code 10}</td> + * </tr> + * <tr> + * <th>{@code TERMINAL_OP}</th> + * <td>{@code 00}</td> + * <td>{@code 00}</td> + * <td>{@code 10}</td> + * <td>{@code 00}</td> + * <td>{@code 01}</td> + * <td>{@code 00}</td> + * </tr> + * <tr> + * <th>{@code UPSTREAM_TERMINAL_OP}</th> + * <td>{@code 00}</td> + * <td>{@code 00}</td> + * <td>{@code 10}</td> + * <td>{@code 00}</td> + * <td>{@code 00}</td> + * <td>{@code 00}</td> + * </tr> + * </tbody> + * <tfoot> + * <tr> + * <td colspan="7">{@code 01} = set/inject {@code 10} = clear {@code 11} = preserve</td> + * </tr> + * </tfoot> + * </table> + * </div> * * Construction of the columns is performed using a simple builder for * non-zero values.