Skip to content

Commit c799c38

Browse files
cpovirkGoogle Java Core Libraries
authored andcommitted
Fix some Javadoc warnings, mostly around the use of the default constructor.
RELNOTES=n/a PiperOrigin-RevId: 698442998
1 parent 3853b98 commit c799c38

36 files changed

+100
-2
lines changed

android/guava/src/com/google/common/cache/CacheBuilder.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,6 @@ Ticker getTicker(boolean recordsTime) {
984984
*
985985
* @return the cache builder reference that should be used instead of {@code this} for any
986986
* remaining configuration and cache building
987-
* @return this {@code CacheBuilder} instance (for chaining)
988987
* @throws IllegalStateException if a removal listener was already set
989988
*/
990989
public <K1 extends K, V1 extends V> CacheBuilder<K1, V1> removalListener(

android/guava/src/com/google/common/collect/ForwardingSetMultimap.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
@ElementTypesAreNonnullByDefault
4040
public abstract class ForwardingSetMultimap<K extends @Nullable Object, V extends @Nullable Object>
4141
extends ForwardingMultimap<K, V> implements SetMultimap<K, V> {
42+
/** Constructor for use by subclasses. */
43+
public ForwardingSetMultimap() {}
4244

4345
@Override
4446
protected abstract SetMultimap<K, V> delegate();

android/guava/src/com/google/common/collect/ImmutableClassToInstanceMap.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ public static <B> Builder<B> builder() {
9494
* @since 2.0
9595
*/
9696
public static final class Builder<B> {
97+
/** Creates a new builder. */
98+
public Builder() {}
99+
97100
private final ImmutableMap.Builder<Class<? extends B>, B> mapBuilder = ImmutableMap.builder();
98101

99102
/**

android/guava/src/com/google/common/collect/TreeTraverser.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@
7777
@GwtCompatible
7878
@ElementTypesAreNonnullByDefault
7979
public abstract class TreeTraverser<T> {
80+
/** Constructor for use by subclasses. */
81+
public TreeTraverser() {}
8082

8183
/**
8284
* Returns a tree traverser that uses the given function to navigate from a node to its children.

android/guava/src/com/google/common/graph/AbstractGraph.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
@Beta
3131
@ElementTypesAreNonnullByDefault
3232
public abstract class AbstractGraph<N> extends AbstractBaseGraph<N> implements Graph<N> {
33+
/** Constructor for use by subclasses. */
34+
public AbstractGraph() {}
3335

3436
@Override
3537
public final boolean equals(@CheckForNull Object obj) {

android/guava/src/com/google/common/graph/AbstractNetwork.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@
5353
@Beta
5454
@ElementTypesAreNonnullByDefault
5555
public abstract class AbstractNetwork<N, E> implements Network<N, E> {
56+
/** Constructor for use by subclasses. */
57+
public AbstractNetwork() {}
58+
5659
@Override
5760
public Graph<N> asGraph() {
5861
return new AbstractGraph<N>() {

android/guava/src/com/google/common/graph/AbstractValueGraph.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
@ElementTypesAreNonnullByDefault
4141
public abstract class AbstractValueGraph<N, V> extends AbstractBaseGraph<N>
4242
implements ValueGraph<N, V> {
43+
/** Constructor for use by subclasses. */
44+
public AbstractValueGraph() {}
4345

4446
@Override
4547
public Graph<N> asGraph() {

android/guava/src/com/google/common/math/LinearTransformation.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@
3838
@GwtIncompatible
3939
@ElementTypesAreNonnullByDefault
4040
public abstract class LinearTransformation {
41+
/**
42+
* Constructor for use by subclasses inside Guava.
43+
*
44+
* @deprecated Create instances by using the static factory methods of the class.
45+
*/
46+
@Deprecated
47+
public LinearTransformation() {}
4148

4249
/**
4350
* Start building an instance which maps {@code x = x1} to {@code y = y1}. Both arguments must be

android/guava/src/com/google/common/math/PairedStatsAccumulator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
@GwtIncompatible
3535
@ElementTypesAreNonnullByDefault
3636
public final class PairedStatsAccumulator {
37+
/** Creates a new accumulator. */
38+
public PairedStatsAccumulator() {}
3739

3840
// These fields must satisfy the requirements of PairedStats' constructor as well as those of the
3941
// stat methods of this class.

android/guava/src/com/google/common/math/Quantiles.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,14 @@
130130
@GwtIncompatible
131131
@ElementTypesAreNonnullByDefault
132132
public final class Quantiles {
133+
/**
134+
* Constructor for a type that is not meant to be instantiated.
135+
*
136+
* @deprecated Use the static factory methods of the class. There is no reason to create an
137+
* instance of {@link Quantiles}.
138+
*/
139+
@Deprecated
140+
public Quantiles() {}
133141

134142
/** Specifies the computation of a median (i.e. the 1st 2-quantile). */
135143
public static ScaleAndIndex median() {

0 commit comments

Comments
 (0)