Merge "Address API feedback."

This commit is contained in:
TreeHugger Robot
2019-11-25 19:46:04 +00:00
committed by Android (Google) Code Review

View File

@@ -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;