summaryrefslogtreecommitdiff
path: root/core/java/android/util/SparseBooleanArray.java
diff options
context:
space:
mode:
authorJake Wharton <jakew@google.com>2017-12-21 16:59:54 -0500
committerJake Wharton <jakew@google.com>2017-12-21 18:25:25 -0500
commitd77bce88d4c525611dda73816378d39aa43bd563 (patch)
tree28ed0ffa1056d4941c758e73f5454b68e20bc0f1 /core/java/android/util/SparseBooleanArray.java
parent82b43303ee0a41b1e132e6077e630d0ffa3ca343 (diff)
Expose removeAt(int) for parity with other sparse collections.
Bug: 70934959 Test: none Change-Id: Ic26a9fba610d6361247e0485803b52569fbf4a38
Diffstat (limited to 'core/java/android/util/SparseBooleanArray.java')
-rw-r--r--core/java/android/util/SparseBooleanArray.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/java/android/util/SparseBooleanArray.java b/core/java/android/util/SparseBooleanArray.java
index 4f76463a653e..68d347c912bf 100644
--- a/core/java/android/util/SparseBooleanArray.java
+++ b/core/java/android/util/SparseBooleanArray.java
@@ -117,7 +117,11 @@ public class SparseBooleanArray implements Cloneable {
}
}
- /** @hide */
+ /**
+ * Removes the mapping at the specified index.
+ * <p>
+ * For indices outside of the range {@code 0...size()-1}, the behavior is undefined.
+ */
public void removeAt(int index) {
System.arraycopy(mKeys, index + 1, mKeys, index, mSize - (index + 1));
System.arraycopy(mValues, index + 1, mValues, index, mSize - (index + 1));