public class Playlist extends MetadataObject implements android.os.Parcelable
Modifier and Type | Class and Description |
---|---|
static class |
Playlist.Fields
Provides the list of known field names that can appear in the properties Map.
|
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<Playlist> |
CREATOR
Creator for de-serializing playlist from the given
Parcel . |
static Playlist |
EMPTY_PLAYLIST
An empty playlist.
|
static int |
PARCEL_OBJECT_TYPE
The type of the parcelable object.
|
properties, TAG
Constructor and Description |
---|
Playlist(java.util.Map<java.lang.String,java.lang.Object> properties) |
Playlist(java.util.Map<java.lang.String,java.lang.Object> properties,
java.util.List<Video> videos)
Initializes a new Playlist with a predefined metadata properties collection and a
predefined List of Video objects.
|
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
java.util.List<Video> |
getAllVideosAndErrors()
Retrieves the ordered List of all valid Videos and error Videos.
|
java.lang.Integer |
getCount()
Retrieves the number of valid videos in this Playlist.
|
java.util.List<Video> |
getErrorVideos()
Retrieves the ordered List of error Videos contained in this Playlist.
|
java.util.List<Video> |
getVideos()
Retrieves the ordered List of valid Videos contained in this Playlist.
|
java.lang.String |
toString() |
void |
writeToParcel(android.os.Parcel parcel,
int i) |
getIntegerProperty, getIntegerProperty, getProperties, getStringProperty, getStringProperty
public static final Playlist EMPTY_PLAYLIST
public static final int PARCEL_OBJECT_TYPE
public static android.os.Parcelable.Creator<Playlist> CREATOR
Parcel
.public Playlist(java.util.Map<java.lang.String,java.lang.Object> properties)
public Playlist(java.util.Map<java.lang.String,java.lang.Object> properties, java.util.List<Video> videos)
properties
- the metadata assigned to this instancevideos
- a List of videos to associate with this Playlistjava.lang.IllegalArgumentException
- if either or both arguments are nullpublic java.util.List<Video> getVideos()
Video.Status.OK
will be returned.public java.util.List<Video> getErrorVideos()
Video.Status.ERROR
will be returned.public java.util.List<Video> getAllVideosAndErrors()
Video.Status.OK
and
Video.Status.ERROR
will be returned.public java.lang.Integer getCount()
@NonNull public java.lang.String toString()
toString
in class MetadataObject
public int describeContents()
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel parcel, int i)
writeToParcel
in interface android.os.Parcelable