summaryrefslogtreecommitdiff
path: root/core/java/android/util/SparseBooleanArray.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/util/SparseBooleanArray.java')
-rw-r--r--core/java/android/util/SparseBooleanArray.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/java/android/util/SparseBooleanArray.java b/core/java/android/util/SparseBooleanArray.java
index 905dcb018b96..f59ef0f6de07 100644
--- a/core/java/android/util/SparseBooleanArray.java
+++ b/core/java/android/util/SparseBooleanArray.java
@@ -115,6 +115,13 @@ public class SparseBooleanArray implements Cloneable {
}
}
+ /** @hide */
+ 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));
+ mSize--;
+ }
+
/**
* Adds a mapping from the specified key to the specified value,
* replacing the previous mapping from the specified key if there
@@ -191,6 +198,11 @@ public class SparseBooleanArray implements Cloneable {
return mValues[index];
}
+ /** @hide */
+ public void setValueAt(int index, boolean value) {
+ mValues[index] = value;
+ }
+
/**
* Returns the index for which {@link #keyAt} would return the
* specified key, or a negative number if the specified