Join us on the livestream at Android Dev Summit on 7-8 November 2018, starting at 10AM PDT!

ObservableArrayList

public class ObservableArrayList
extends ArrayList<T> implements ObservableList<T>

java.lang.Object
   ↳ java.util.AbstractCollection<T>
     ↳ java.util.AbstractList<T>
       ↳ java.util.ArrayList<T>
         ↳ android.databinding.ObservableArrayList<T>


An ObservableList implementation using ArrayList as an implementation.

Summary

Inherited fields

From class java.util.AbstractList

Public constructors

ObservableArrayList()

Public methods

boolean add(T object)
void add(int index, T object)
boolean addAll(Collection<? extends T> collection)
boolean addAll(int index, Collection<? extends T> collection)
void addOnListChangedCallback(OnListChangedCallback listener)
void clear()
T remove(int index)
boolean remove(Object object)
void removeOnListChangedCallback(OnListChangedCallback listener)
T set(int index, T object)

Protected methods

void removeRange(int fromIndex, int toIndex)

Inherited methods

From class java.util.ArrayList
From class java.util.AbstractList
From class java.util.AbstractCollection
From class java.lang.Object
From interface java.util.List
From interface java.util.Collection
From interface android.databinding.ObservableList
From interface java.lang.Iterable
From interface java.util.List

Public constructors

ObservableArrayList

ObservableArrayList ()

Public methods

add

boolean add (T object)

Parameters
object T

Returns
boolean

add

void add (int index, 
                T object)

Parameters
index int

object T

addAll

boolean addAll (Collection<? extends T> collection)

Parameters
collection Collection

Returns
boolean

addAll

boolean addAll (int index, 
                Collection<? extends T> collection)

Parameters
index int

collection Collection

Returns
boolean

addOnListChangedCallback

void addOnListChangedCallback (OnListChangedCallback listener)

Parameters
listener OnListChangedCallback

clear

void clear ()

remove

T remove (int index)

Parameters
index int

Returns
T

remove

boolean remove (Object object)

Parameters
object Object

Returns
boolean

removeOnListChangedCallback

void removeOnListChangedCallback (OnListChangedCallback listener)

Parameters
listener OnListChangedCallback

set

T set (int index, 
                T object)

Parameters
index int

object T

Returns
T

Protected methods

removeRange

void removeRange (int fromIndex, 
                int toIndex)

Parameters
fromIndex int

toIndex int