summaryrefslogtreecommitdiff
path: root/core/java/android/util/SparseSetArray.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/util/SparseSetArray.java')
-rw-r--r--core/java/android/util/SparseSetArray.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/java/android/util/SparseSetArray.java b/core/java/android/util/SparseSetArray.java
index d100f12ed026..c1873d76f46f 100644
--- a/core/java/android/util/SparseSetArray.java
+++ b/core/java/android/util/SparseSetArray.java
@@ -44,6 +44,13 @@ public class SparseSetArray<T> {
}
/**
+ * Removes all mappings from this SparseSetArray.
+ */
+ public void clear() {
+ mData.clear();
+ }
+
+ /**
* @return whether a value exists at index n.
*/
public boolean contains(int n, T value) {
@@ -55,6 +62,13 @@ public class SparseSetArray<T> {
}
/**
+ * @return the set of items at index n
+ */
+ public ArraySet<T> get(int n) {
+ return mData.get(n);
+ }
+
+ /**
* Remove a value from index n.
* @return TRUE when the value existed at the given index and removed, FALSE otherwise.
*/