Skip to content

Commit

Permalink
Add some classes to package-info for primitives and `util.concurr…
Browse files Browse the repository at this point in the history
…ent`.

(Also, mention `FluentFuture` inside `ListenableFuture`.)

I also re-ordered some sections. There is an argument that the `primitives` static utilities still belong above the value types, but it depends on how you weigh total usages for the group of classes vs. usage of individual popular classes, how you adjust for utilities available in newer versions of Java, and how much we want to be prescriptive in suggesting things. I put some weight on "value types are a good thing."

RELNOTES=n/a
PiperOrigin-RevId: 543537713
  • Loading branch information
cpovirk authored and Google Java Core Libraries committed Jun 26, 2023
1 parent 1df87a8 commit 641d9e6
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 30 deletions.
15 changes: 9 additions & 6 deletions android/guava/src/com/google/common/primitives/package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

/**
* Static utilities for the eight primitive types and {@code void}, and value types for treating
* them as unsigned.
* them as unsigned or storing them in immutable arrays.
*
* <p>This package is a part of the open-source <a href="https://github.com/google/guava">Guava</a>
* library.
Expand All @@ -24,10 +24,14 @@
*
* <h2>Contents</h2>
*
* <h3>General static utilities</h3>
* <h3>Value types</h3>
*
* <ul>
* <li>{@link Primitives}
* <li>{@link ImmutableDoubleArray}
* <li>{@link ImmutableIntArray}
* <li>{@link ImmutableLongrray}
* <li>{@link UnsignedInteger}
* <li>{@link UnsignedLong}
* </ul>
*
* <h3>Per-type static utilities</h3>
Expand All @@ -53,11 +57,10 @@
* <li>{@link Shorts}
* </ul>
*
* <h3>Value types</h3>
* <h3>General static utilities</h3>
*
* <ul>
* <li>{@link UnsignedInteger}
* <li>{@link UnsignedLong}
* <li>{@link Primitives}
* </ul>
*/
@ParametersAreNonnullByDefault
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@
*
* <p>The main purpose of {@code ListenableFuture} is to help you chain together a graph of
* asynchronous operations. You can chain them together manually with calls to methods like {@link
* Futures#transform(ListenableFuture, com.google.common.base.Function, Executor)
* Futures.transform}, but you will often find it easier to use a framework. Frameworks automate the
* process, often adding features like monitoring, debugging, and cancellation. Examples of
* frameworks include:
* Futures#transform(ListenableFuture, com.google.common.base.Function, Executor) Futures.transform}
* (or {@link FluentFuture#transform(com.google.common.base.Function, Executor)
* FluentFuture.transform}), but you will often find it easier to use a framework. Frameworks
* automate the process, often adding features like monitoring, debugging, and cancellation.
* Examples of frameworks include:
*
* <ul>
* <li><a href="https://dagger.dev/producers.html">Dagger Producers</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
/**
* Concurrency utilities.
*
* <p>Commonly used types include {@link ListenableFuture} and {@link Service}.
* <p>Commonly used types include {@link ClosingFuture}, {@link ListenableFuture}, and {@link
* Service}.
*
* <p>Commonly used utilities include {@link Futures}, {@link MoreExecutors}, and {@link
* ThreadFactoryBuilder}.
* <p>Commonly used utilities include {@link Futures}, {@link MoreExecutors}, {@link
* ThreadFactoryBuilder}, and {@link Uninterruptibles}.
*
* <p>This package is a part of the open-source <a href="https://github.com/google/guava">Guava</a>
* library.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@
*
* <p>The main purpose of {@code ListenableFuture} is to help you chain together a graph of
* asynchronous operations. You can chain them together manually with calls to methods like {@link
* Futures#transform(ListenableFuture, com.google.common.base.Function, Executor)
* Futures.transform}, but you will often find it easier to use a framework. Frameworks automate the
* process, often adding features like monitoring, debugging, and cancellation. Examples of
* frameworks include:
* Futures#transform(ListenableFuture, com.google.common.base.Function, Executor) Futures.transform}
* (or {@link FluentFuture#transform(com.google.common.base.Function, Executor)
* FluentFuture.transform}), but you will often find it easier to use a framework. Frameworks
* automate the process, often adding features like monitoring, debugging, and cancellation.
* Examples of frameworks include:
*
* <ul>
* <li><a href="https://dagger.dev/producers.html">Dagger Producers</a>
Expand Down
15 changes: 9 additions & 6 deletions guava/src/com/google/common/primitives/package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

/**
* Static utilities for the eight primitive types and {@code void}, and value types for treating
* them as unsigned.
* them as unsigned or storing them in immutable arrays.
*
* <p>This package is a part of the open-source <a href="https://github.com/google/guava">Guava</a>
* library.
Expand All @@ -24,10 +24,14 @@
*
* <h2>Contents</h2>
*
* <h3>General static utilities</h3>
* <h3>Value types</h3>
*
* <ul>
* <li>{@link Primitives}
* <li>{@link ImmutableDoubleArray}
* <li>{@link ImmutableIntArray}
* <li>{@link ImmutableLongrray}
* <li>{@link UnsignedInteger}
* <li>{@link UnsignedLong}
* </ul>
*
* <h3>Per-type static utilities</h3>
Expand All @@ -53,11 +57,10 @@
* <li>{@link Shorts}
* </ul>
*
* <h3>Value types</h3>
* <h3>General static utilities</h3>
*
* <ul>
* <li>{@link UnsignedInteger}
* <li>{@link UnsignedLong}
* <li>{@link Primitives}
* </ul>
*/
@ParametersAreNonnullByDefault
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@
*
* <p>The main purpose of {@code ListenableFuture} is to help you chain together a graph of
* asynchronous operations. You can chain them together manually with calls to methods like {@link
* Futures#transform(ListenableFuture, com.google.common.base.Function, Executor)
* Futures.transform}, but you will often find it easier to use a framework. Frameworks automate the
* process, often adding features like monitoring, debugging, and cancellation. Examples of
* frameworks include:
* Futures#transform(ListenableFuture, com.google.common.base.Function, Executor) Futures.transform}
* (or {@link FluentFuture#transform(com.google.common.base.Function, Executor)
* FluentFuture.transform}), but you will often find it easier to use a framework. Frameworks
* automate the process, often adding features like monitoring, debugging, and cancellation.
* Examples of frameworks include:
*
* <ul>
* <li><a href="https://dagger.dev/producers.html">Dagger Producers</a>
Expand Down
7 changes: 4 additions & 3 deletions guava/src/com/google/common/util/concurrent/package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
/**
* Concurrency utilities.
*
* <p>Commonly used types include {@link ListenableFuture} and {@link Service}.
* <p>Commonly used types include {@link ClosingFuture}, {@link ListenableFuture}, and {@link
* Service}.
*
* <p>Commonly used utilities include {@link Futures}, {@link MoreExecutors}, and {@link
* ThreadFactoryBuilder}.
* <p>Commonly used utilities include {@link Futures}, {@link MoreExecutors}, {@link
* ThreadFactoryBuilder}, and {@link Uninterruptibles}.
*
* <p>This package is a part of the open-source <a href="https://github.com/google/guava">Guava</a>
* library.
Expand Down

0 comments on commit 641d9e6

Please sign in to comment.