From d77bce88d4c525611dda73816378d39aa43bd563 Mon Sep 17 00:00:00 2001 From: Jake Wharton Date: Thu, 21 Dec 2017 16:59:54 -0500 Subject: Expose removeAt(int) for parity with other sparse collections. Bug: 70934959 Test: none Change-Id: Ic26a9fba610d6361247e0485803b52569fbf4a38 --- core/java/android/util/SparseBooleanArray.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'core/java/android/util/SparseBooleanArray.java') 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. + *

+ * 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)); -- cgit v1.2.3