Skip to content

Commit

Permalink
Merged for javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
fluentfuture committed Jun 9, 2024
2 parents dde0d41 + ba83e79 commit 8c9ea12
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions mug/src/main/java/com/google/mu/collect/Sequence.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@
* recursive. That is, if your Sequence is the result of 1 million concatenations, you won't run
* into stack overflow error because under the hood, it's a heap-allocated immutable tree structure.
*
* <p>The expected use case is to perform frequent concatenations using the {@code concat()}
* methods. O(n) materialization cost will be (lazily) paid before the first time accessing the
* elements through the {@link List} interface such as {@link List#get}, {@link List#equals},
* or {@link #toString} etc.
* <p>The expected use case is to concatenate lots of smaller {@code Sequence}s using the {@code
* concat()} methods to create the final Sequence. O(n) materialization cost will be (lazily) paid
* before the first time accessing the elements of the final Sequence through the {@link List}
* interface such as {@link List#get}, {@link List#equals}, {@link #toString} etc. You may also
* want to copy the final Sequence into a more conventional List such as {@link
* com.google.common.collect.ImmutableList#copyOf Guava ImmutableList}.
*
* <p>On the other hand, it's inefficient to materialize, concatenate then materialize the
* concatenated Sequence...
Expand Down

0 comments on commit 8c9ea12

Please sign in to comment.