Class SparseArray

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable, java.util.Collection, java.util.List

    public final class SparseArray
    extends java.util.AbstractList
    implements java.io.Serializable
    SparseArray
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      SparseArray()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(int index, java.lang.Object element)  
      boolean equals​(java.lang.Object obj)  
      java.lang.Object get​(int index)  
      int hashCode()  
      java.lang.Object remove​(int index)  
      java.lang.Object set​(int index, java.lang.Object element)  
      int size()  
      • Methods inherited from class java.util.AbstractList

        add, addAll, clear, indexOf, iterator, lastIndexOf, listIterator, listIterator, subList
      • Methods inherited from class java.util.AbstractCollection

        addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.List

        addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
    • Constructor Detail

      • SparseArray

        public SparseArray()
    • Method Detail

      • get

        public java.lang.Object get​(int index)
        Specified by:
        get in interface java.util.List
        Specified by:
        get in class java.util.AbstractList
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection
        Specified by:
        size in interface java.util.List
        Specified by:
        size in class java.util.AbstractCollection
      • add

        public void add​(int index,
                        java.lang.Object element)
        Specified by:
        add in interface java.util.List
        Overrides:
        add in class java.util.AbstractList
      • remove

        public java.lang.Object remove​(int index)
        Specified by:
        remove in interface java.util.List
        Overrides:
        remove in class java.util.AbstractList
      • set

        public java.lang.Object set​(int index,
                                    java.lang.Object element)
        Specified by:
        set in interface java.util.List
        Overrides:
        set in class java.util.AbstractList
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface java.util.Collection
        Specified by:
        equals in interface java.util.List
        Overrides:
        equals in class java.util.AbstractList
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Collection
        Specified by:
        hashCode in interface java.util.List
        Overrides:
        hashCode in class java.util.AbstractList