public abstract class ArrayAdapter<T,VH extends RecyclerView.ViewHolder>
extends <any>
| Constructor and Description |
|---|
ArrayAdapter(java.util.List<T> objects) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(T object)
Adds the specified object at the end of the array.
|
void |
clear()
Remove all elements from the list.
|
T |
getItem(int position) |
int |
getItemCount() |
long |
getItemId(int position) |
int |
getPosition(T item)
Returns the position of the specified item in the array.
|
void |
insert(T object,
int index)
Inserts the specified object at the specified index in the array.
|
void |
remove(T object)
Removes the specified object from the array.
|
void |
replaceAll(java.util.List<T> objects)
Replace all elements with a new list.
|
void |
sort(java.util.Comparator<? super T> comparator)
Sorts the content of this adapter using the specified comparator.
|
public ArrayAdapter(java.util.List<T> objects)
public void add(T object)
object - The object to add at the end of the array.public void clear()
public void replaceAll(java.util.List<T> objects)
public int getItemCount()
public T getItem(int position)
public long getItemId(int position)
public int getPosition(T item)
item - The item to retrieve the position of.public void insert(T object, int index)
object - The object to insert into the array.index - The index at which the object must be inserted.public void remove(T object)
object - The object to remove.public void sort(java.util.Comparator<? super T> comparator)
comparator - The comparator used to sort the objects contained in this adapter.