Package com.google.android.exoplayer2
Class Player.Events
- java.lang.Object
-
- com.google.android.exoplayer2.Player.Events
-
- Enclosing interface:
- Player
public static final class Player.Events extends Object
A set ofPlayer.EventFlags.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(int event)Returns whether the given event occurred.booleancontainsAny(int... events)Returns whether any of the given events occurred.intget(int index)Returns theeventat the given index.intsize()Returns the number of events in the set.
-
-
-
Constructor Detail
-
Events
public Events(ExoFlags flags)
Creates an instance.- Parameters:
flags- TheExoFlagscontaining thePlayer.EventFlagsin the set.
-
-
Method Detail
-
contains
public boolean contains(@EventFlags int event)
Returns whether the given event occurred.- Parameters:
event- Theevent.- Returns:
- Whether the event occurred.
-
containsAny
public boolean containsAny(@EventFlags int... events)
Returns whether any of the given events occurred.- Parameters:
events- Theevents.- Returns:
- Whether any of the events occurred.
-
size
public int size()
Returns the number of events in the set.
-
get
@EventFlags public int get(int index)
Returns theeventat the given index.Although index-based access is possible, it doesn't imply a particular order of these events.
- Parameters:
index- The index. Must be between 0 (inclusive) andsize()(exclusive).- Returns:
- The
eventat the given index. - Throws:
IndexOutOfBoundsException- If index is outside the allowed range.
-
-