diff options
Diffstat (limited to 'core/java/android/util/SparseArray.java')
| -rw-r--r-- | core/java/android/util/SparseArray.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/java/android/util/SparseArray.java b/core/java/android/util/SparseArray.java index dae760f989f6..86120d1e650c 100644 --- a/core/java/android/util/SparseArray.java +++ b/core/java/android/util/SparseArray.java @@ -241,6 +241,14 @@ public class SparseArray<E> implements Cloneable { } /** + * Alias for {@link #put(int, Object)} to support Kotlin [index]= operator. + * @see #put(int, Object) + */ + public void set(int key, E value) { + put(key, value); + } + + /** * Adds a mapping from the specified key to the specified value, * replacing the previous mapping from the specified key if there * was one. |
