Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed1cfed8 authored by Kweku Adams's avatar Kweku Adams
Browse files

Address API feedback.

Add @param and @return to new SparseArray.contains() method.

Bug: N/A
Test: N/A
Change-Id: I81460524f29628a4ce1e47b1510c2887fa51717d
parent 0f2b7fd2
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;