-
public class AdPod
A representation of an Ad pod. An Ad pod is a sequenced group of Ads.
-
-
Method Summary
Modifier and Type Method Description static AdPod
empty()
Creates an Ad pod with a empty list of AdBreaks. boolean
isEmpty()
Returns true if this AdPod contains no AdBreaks. static AdPod
create(long relativeStartPosition)
Creates an Ad pod with a empty list of AdBreaks. static AdPod
create(long relativeStartPosition, @NonNull() Deque<AdBreak> adBreaks)
Creates an Ad pod with a given list of AdBreaks. Collection<AdBreak>
getAdBreakList()
Gets the Ad break list. void
addAdBreak(AdBreak adBreak)
Adds an Ad break. long
getRelativeStartPosition()
Gets the relative start position. long
getAbsoluteStartPosition()
Gets the absolute start position. long
getAbsoluteEndPosition()
Gets the absolute end position. long
getDuration()
Gets the total Ad pod duration. AdBreak
getAdBreakAt(long absolutePosition)
Gets ad break at a given absolute position. Ad<out Object>
getAdAt(long absolutePosition)
Gets ad at a given absolute position. -
-
Method Detail
-
isEmpty
boolean isEmpty()
-
create
static AdPod create(long relativeStartPosition)
Creates an Ad pod with a empty list of AdBreaks.
- Parameters:
relativeStartPosition
- the relative start position
-
create
static AdPod create(long relativeStartPosition, @NonNull() Deque<AdBreak> adBreaks)
Creates an Ad pod with a given list of AdBreaks.
- Parameters:
relativeStartPosition
- the relative start positionadBreaks
- the ad breaks
-
getAdBreakList
Collection<AdBreak> getAdBreakList()
Gets the Ad break list.
-
addAdBreak
void addAdBreak(AdBreak adBreak)
Adds an Ad break.
- Parameters:
adBreak
- the ad break
-
getRelativeStartPosition
long getRelativeStartPosition()
Gets the relative start position.
-
getAbsoluteStartPosition
long getAbsoluteStartPosition()
Gets the absolute start position.
-
getAbsoluteEndPosition
long getAbsoluteEndPosition()
Gets the absolute end position.
-
getDuration
long getDuration()
Gets the total Ad pod duration.
-
getAdBreakAt
@Nullable() AdBreak getAdBreakAt(long absolutePosition)
Gets ad break at a given absolute position.
- Parameters:
absolutePosition
- the absolute position
-
-
-
-