Package com.brightcove.player.model
Class Playlist
- java.lang.Object
-
- com.brightcove.player.model.MetadataObject
-
- com.brightcove.player.model.Playlist
-
- All Implemented Interfaces:
android.os.Parcelable,java.io.Serializable
public class Playlist extends MetadataObject implements android.os.Parcelable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPlaylist.FieldsProvides the list of known field names that can appear in the properties Map.
-
Field Summary
Fields Modifier and Type Field Description static android.os.Parcelable.Creator<Playlist>CREATORCreator for de-serializing playlist from the givenParcel.static PlaylistEMPTY_PLAYLISTAn empty playlist.static intPARCEL_OBJECT_TYPEThe type of the parcelable object.-
Fields inherited from class com.brightcove.player.model.MetadataObject
properties, TAG
-
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intdescribeContents()java.util.List<Video>getAllVideosAndErrors()Retrieves the ordered List of all valid Videos and error Videos.java.lang.IntegergetCount()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.StringtoString()voidwriteToParcel(android.os.Parcel parcel, int i)-
Methods inherited from class com.brightcove.player.model.MetadataObject
getIntegerProperty, getIntegerProperty, getLongProperty, getProperties, getStringProperty, getStringProperty
-
-
-
-
Field Detail
-
EMPTY_PLAYLIST
public static final Playlist EMPTY_PLAYLIST
An empty playlist.
-
PARCEL_OBJECT_TYPE
public static final int PARCEL_OBJECT_TYPE
The type of the parcelable object.- See Also:
- Constant Field Values
-
CREATOR
public static android.os.Parcelable.Creator<Playlist> CREATOR
Creator for de-serializing playlist from the givenParcel.
-
-
Constructor Detail
-
Playlist
public Playlist(java.util.Map<java.lang.String,java.lang.Object> properties)
- See Also:
MetadataObject(java.util.Map)
-
Playlist
public 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.- Parameters:
properties- the metadata assigned to this instancevideos- a List of videos to associate with this Playlist- Throws:
java.lang.IllegalArgumentException- if either or both arguments are null
-
-
Method Detail
-
getVideos
public java.util.List<Video> getVideos()
Retrieves the ordered List of valid Videos contained in this Playlist. Only videos withVideo.Status.OKwill be returned.- Returns:
- ordered List of valid videos
-
getErrorVideos
public java.util.List<Video> getErrorVideos()
Retrieves the ordered List of error Videos contained in this Playlist. Only videos withVideo.Status.ERRORwill be returned.- Returns:
- ordered List of error Videos
-
getAllVideosAndErrors
public java.util.List<Video> getAllVideosAndErrors()
Retrieves the ordered List of all valid Videos and error Videos. All videos with bothVideo.Status.OKandVideo.Status.ERRORwill be returned.- Returns:
- ordered List of valid videos and error Videos.
-
getCount
public java.lang.Integer getCount()
Retrieves the number of valid videos in this Playlist.- Returns:
- the number of valid videos in this playlist
-
toString
@NonNull public java.lang.String toString()
- Overrides:
toStringin classMetadataObject
-
describeContents
public int describeContents()
- Specified by:
describeContentsin interfaceandroid.os.Parcelable
-
writeToParcel
public void writeToParcel(android.os.Parcel parcel, int i)- Specified by:
writeToParcelin interfaceandroid.os.Parcelable
-
-