E
- the type of object this array holds.@Immutable public abstract class ParcelableArrayList<E extends Parcelable> extends ArrayList<E> implements Parcelable
Parcelable.Creator
.Modifier and Type | Class and Description |
---|---|
static class |
ParcelableArrayList.ImmutableClassException
This class is immutable.
|
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
modCount
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
ParcelableArrayList(Collection<E> source)
Creates a new ArrayList, copying from the source collection.
|
ParcelableArrayList(Parcel in) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E object) |
void |
add(int index,
E object) |
boolean |
addAll(Collection<? extends E> collection) |
boolean |
addAll(int index,
Collection<? extends E> collection) |
void |
clear() |
int |
describeContents() |
void |
ensureCapacity(int minimumCapacity) |
protected abstract Parcelable.Creator<E> |
getCreator()
Subclasses must implement this, returning the CREATOR of the array's Parcelable item.
|
E |
remove(int index) |
boolean |
remove(Object object) |
boolean |
removeAll(Collection<?> collection) |
protected void |
removeRange(int fromIndex,
int toIndex) |
boolean |
retainAll(Collection<?> collection) |
E |
set(int index,
E object) |
void |
trimToSize() |
void |
writeToParcel(Parcel dest,
int flags) |
clone, contains, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, removeIf, replaceAll, size, sort, spliterator, subList, toArray, toArray
equals, hashCode
containsAll, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
containsAll, equals, hashCode
parallelStream, stream
public ParcelableArrayList(Collection<E> source)
source
- the source collection to copy from.public ParcelableArrayList(Parcel in)
in
- the parcel to read from.public final boolean add(E object)
add
in interface Collection<E extends Parcelable>
add
in interface List<E extends Parcelable>
add
in class ArrayList<E extends Parcelable>
public final void add(int index, E object)
add
in interface List<E extends Parcelable>
add
in class ArrayList<E extends Parcelable>
public final boolean addAll(Collection<? extends E> collection)
addAll
in interface Collection<E extends Parcelable>
addAll
in interface List<E extends Parcelable>
addAll
in class ArrayList<E extends Parcelable>
public final boolean addAll(int index, Collection<? extends E> collection)
addAll
in interface List<E extends Parcelable>
addAll
in class ArrayList<E extends Parcelable>
public final void clear()
clear
in interface Collection<E extends Parcelable>
clear
in interface List<E extends Parcelable>
clear
in class ArrayList<E extends Parcelable>
public int describeContents()
describeContents
in interface Parcelable
public final void ensureCapacity(int minimumCapacity)
ensureCapacity
in class ArrayList<E extends Parcelable>
public final E remove(int index)
remove
in interface List<E extends Parcelable>
remove
in class ArrayList<E extends Parcelable>
public final boolean remove(Object object)
remove
in interface Collection<E extends Parcelable>
remove
in interface List<E extends Parcelable>
remove
in class ArrayList<E extends Parcelable>
public final boolean removeAll(Collection<?> collection)
removeAll
in interface Collection<E extends Parcelable>
removeAll
in interface List<E extends Parcelable>
removeAll
in class ArrayList<E extends Parcelable>
public final boolean retainAll(Collection<?> collection)
retainAll
in interface Collection<E extends Parcelable>
retainAll
in interface List<E extends Parcelable>
retainAll
in class ArrayList<E extends Parcelable>
public final E set(int index, E object)
set
in interface List<E extends Parcelable>
set
in class ArrayList<E extends Parcelable>
public final void trimToSize()
trimToSize
in class ArrayList<E extends Parcelable>
public void writeToParcel(Parcel dest, int flags)
writeToParcel
in interface Parcelable
protected abstract Parcelable.Creator<E> getCreator()
protected final void removeRange(int fromIndex, int toIndex)
removeRange
in class ArrayList<E extends Parcelable>