Skip to content

Commit 641d9e6

Browse files
cpovirkGoogle Java Core Libraries
authored andcommitted
Add some classes to package-info for primitives and util.concurrent.
(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
1 parent 1df87a8 commit 641d9e6

File tree

7 files changed

+41
-30
lines changed

7 files changed

+41
-30
lines changed

android/guava/src/com/google/common/primitives/package-info.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
/**
1616
* Static utilities for the eight primitive types and {@code void}, and value types for treating
17-
* them as unsigned.
17+
* them as unsigned or storing them in immutable arrays.
1818
*
1919
* <p>This package is a part of the open-source <a href="https://github.com/google/guava">Guava</a>
2020
* library.
@@ -24,10 +24,14 @@
2424
*
2525
* <h2>Contents</h2>
2626
*
27-
* <h3>General static utilities</h3>
27+
* <h3>Value types</h3>
2828
*
2929
* <ul>
30-
* <li>{@link Primitives}
30+
* <li>{@link ImmutableDoubleArray}
31+
* <li>{@link ImmutableIntArray}
32+
* <li>{@link ImmutableLongrray}
33+
* <li>{@link UnsignedInteger}
34+
* <li>{@link UnsignedLong}
3135
* </ul>
3236
*
3337
* <h3>Per-type static utilities</h3>
@@ -53,11 +57,10 @@
5357
* <li>{@link Shorts}
5458
* </ul>
5559
*
56-
* <h3>Value types</h3>
60+
* <h3>General static utilities</h3>
5761
*
5862
* <ul>
59-
* <li>{@link UnsignedInteger}
60-
* <li>{@link UnsignedLong}
63+
* <li>{@link Primitives}
6164
* </ul>
6265
*/
6366
@ParametersAreNonnullByDefault

android/guava/src/com/google/common/util/concurrent/ListenableFuture.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@
3636
*
3737
* <p>The main purpose of {@code ListenableFuture} is to help you chain together a graph of
3838
* asynchronous operations. You can chain them together manually with calls to methods like {@link
39-
* Futures#transform(ListenableFuture, com.google.common.base.Function, Executor)
40-
* Futures.transform}, but you will often find it easier to use a framework. Frameworks automate the
41-
* process, often adding features like monitoring, debugging, and cancellation. Examples of
42-
* frameworks include:
39+
* Futures#transform(ListenableFuture, com.google.common.base.Function, Executor) Futures.transform}
40+
* (or {@link FluentFuture#transform(com.google.common.base.Function, Executor)
41+
* FluentFuture.transform}), but you will often find it easier to use a framework. Frameworks
42+
* automate the process, often adding features like monitoring, debugging, and cancellation.
43+
* Examples of frameworks include:
4344
*
4445
* <ul>
4546
* <li><a href="https://dagger.dev/producers.html">Dagger Producers</a>

android/guava/src/com/google/common/util/concurrent/package-info.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@
1515
/**
1616
* Concurrency utilities.
1717
*
18-
* <p>Commonly used types include {@link ListenableFuture} and {@link Service}.
18+
* <p>Commonly used types include {@link ClosingFuture}, {@link ListenableFuture}, and {@link
19+
* Service}.
1920
*
20-
* <p>Commonly used utilities include {@link Futures}, {@link MoreExecutors}, and {@link
21-
* ThreadFactoryBuilder}.
21+
* <p>Commonly used utilities include {@link Futures}, {@link MoreExecutors}, {@link
22+
* ThreadFactoryBuilder}, and {@link Uninterruptibles}.
2223
*
2324
* <p>This package is a part of the open-source <a href="https://github.com/google/guava">Guava</a>
2425
* library.

futures/listenablefuture1/src/com/google/common/util/concurrent/ListenableFuture.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@
3636
*
3737
* <p>The main purpose of {@code ListenableFuture} is to help you chain together a graph of
3838
* asynchronous operations. You can chain them together manually with calls to methods like {@link
39-
* Futures#transform(ListenableFuture, com.google.common.base.Function, Executor)
40-
* Futures.transform}, but you will often find it easier to use a framework. Frameworks automate the
41-
* process, often adding features like monitoring, debugging, and cancellation. Examples of
42-
* frameworks include:
39+
* Futures#transform(ListenableFuture, com.google.common.base.Function, Executor) Futures.transform}
40+
* (or {@link FluentFuture#transform(com.google.common.base.Function, Executor)
41+
* FluentFuture.transform}), but you will often find it easier to use a framework. Frameworks
42+
* automate the process, often adding features like monitoring, debugging, and cancellation.
43+
* Examples of frameworks include:
4344
*
4445
* <ul>
4546
* <li><a href="https://dagger.dev/producers.html">Dagger Producers</a>

guava/src/com/google/common/primitives/package-info.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
/**
1616
* Static utilities for the eight primitive types and {@code void}, and value types for treating
17-
* them as unsigned.
17+
* them as unsigned or storing them in immutable arrays.
1818
*
1919
* <p>This package is a part of the open-source <a href="https://github.com/google/guava">Guava</a>
2020
* library.
@@ -24,10 +24,14 @@
2424
*
2525
* <h2>Contents</h2>
2626
*
27-
* <h3>General static utilities</h3>
27+
* <h3>Value types</h3>
2828
*
2929
* <ul>
30-
* <li>{@link Primitives}
30+
* <li>{@link ImmutableDoubleArray}
31+
* <li>{@link ImmutableIntArray}
32+
* <li>{@link ImmutableLongrray}
33+
* <li>{@link UnsignedInteger}
34+
* <li>{@link UnsignedLong}
3135
* </ul>
3236
*
3337
* <h3>Per-type static utilities</h3>
@@ -53,11 +57,10 @@
5357
* <li>{@link Shorts}
5458
* </ul>
5559
*
56-
* <h3>Value types</h3>
60+
* <h3>General static utilities</h3>
5761
*
5862
* <ul>
59-
* <li>{@link UnsignedInteger}
60-
* <li>{@link UnsignedLong}
63+
* <li>{@link Primitives}
6164
* </ul>
6265
*/
6366
@ParametersAreNonnullByDefault

guava/src/com/google/common/util/concurrent/ListenableFuture.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@
3636
*
3737
* <p>The main purpose of {@code ListenableFuture} is to help you chain together a graph of
3838
* asynchronous operations. You can chain them together manually with calls to methods like {@link
39-
* Futures#transform(ListenableFuture, com.google.common.base.Function, Executor)
40-
* Futures.transform}, but you will often find it easier to use a framework. Frameworks automate the
41-
* process, often adding features like monitoring, debugging, and cancellation. Examples of
42-
* frameworks include:
39+
* Futures#transform(ListenableFuture, com.google.common.base.Function, Executor) Futures.transform}
40+
* (or {@link FluentFuture#transform(com.google.common.base.Function, Executor)
41+
* FluentFuture.transform}), but you will often find it easier to use a framework. Frameworks
42+
* automate the process, often adding features like monitoring, debugging, and cancellation.
43+
* Examples of frameworks include:
4344
*
4445
* <ul>
4546
* <li><a href="https://dagger.dev/producers.html">Dagger Producers</a>

guava/src/com/google/common/util/concurrent/package-info.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@
1515
/**
1616
* Concurrency utilities.
1717
*
18-
* <p>Commonly used types include {@link ListenableFuture} and {@link Service}.
18+
* <p>Commonly used types include {@link ClosingFuture}, {@link ListenableFuture}, and {@link
19+
* Service}.
1920
*
20-
* <p>Commonly used utilities include {@link Futures}, {@link MoreExecutors}, and {@link
21-
* ThreadFactoryBuilder}.
21+
* <p>Commonly used utilities include {@link Futures}, {@link MoreExecutors}, {@link
22+
* ThreadFactoryBuilder}, and {@link Uninterruptibles}.
2223
*
2324
* <p>This package is a part of the open-source <a href="https://github.com/google/guava">Guava</a>
2425
* library.

0 commit comments

Comments
 (0)