Class BundleableUtil
- java.lang.Object
-
- com.google.android.exoplayer2.util.BundleableUtil
-
public final class BundleableUtil extends Object
Utilities forBundleable
.
-
-
Method Summary
-
-
-
Method Detail
-
toBundleList
public static <T extends Bundleable> ImmutableList<Bundle> toBundleList(List<T> bundleableList)
Converts a list ofBundleable
to a listBundle
.
-
fromBundleList
public static <T extends Bundleable> ImmutableList<T> fromBundleList(Bundleable.Creator<T> creator, List<Bundle> bundleList)
Converts a list ofBundle
to a list ofBundleable
.
-
toBundleArrayList
public static <T extends Bundleable> ArrayList<Bundle> toBundleArrayList(Collection<T> bundleables)
Converts a collection ofBundleable
to anArrayList
ofBundle
so that the returned list can be put toBundle
usingBundle.putParcelableArrayList(java.lang.String, java.util.ArrayList<? extends android.os.Parcelable>)
conveniently.
-
fromBundleSparseArray
public static <T extends Bundleable> SparseArray<T> fromBundleSparseArray(Bundleable.Creator<T> creator, SparseArray<Bundle> bundleSparseArray)
-
toBundleSparseArray
public static <T extends Bundleable> SparseArray<Bundle> toBundleSparseArray(SparseArray<T> bundleableSparseArray)
Converts aSparseArray
ofBundleable
to anSparseArray
ofBundle
so that the returnedSparseArray
can be put toBundle
usingBundle.putSparseParcelableArray(java.lang.String, android.util.SparseArray<? extends android.os.Parcelable>)
conveniently.
-
-