summaryrefslogtreecommitdiff
path: root/core/java/android/util/SparseArray.java
diff options
context:
space:
mode:
authorKweku Adams <kwekua@google.com>2019-11-25 09:53:51 -0800
committerKweku Adams <kwekua@google.com>2019-11-25 09:53:51 -0800
commited1cfed835b9e66e6c1268ac529be20ee6459def (patch)
treebad117ab631d045c3cab874a2c45fa22bc9cd3b5 /core/java/android/util/SparseArray.java
parent0f2b7fd29a37f35864e7bd3138d3d0b98704faec (diff)
Address API feedback.
Add @param and @return to new SparseArray.contains() method. Bug: N/A Test: N/A Change-Id: I81460524f29628a4ce1e47b1510c2887fa51717d
Diffstat (limited to 'core/java/android/util/SparseArray.java')
-rw-r--r--core/java/android/util/SparseArray.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/java/android/util/SparseArray.java b/core/java/android/util/SparseArray.java
index 484894f98023..d3367c10bff5 100644
--- a/core/java/android/util/SparseArray.java
+++ b/core/java/android/util/SparseArray.java
@@ -106,6 +106,9 @@ public class SparseArray<E> implements Cloneable {
/**
* Returns true if the key exists in the array. This is equivalent to
* {@link #indexOfKey(int)} >= 0.
+ *
+ * @param key Potential key in the mapping
+ * @return true if the key is defined in the mapping
*/
public boolean contains(int key) {
return indexOfKey(key) >= 0;