Class Player.Events

  • Enclosing interface:
    Player

    public static final class Player.Events
    extends Object
    A set of events.
    • Constructor Detail

      • Events

        public Events​(FlagSet flags)
        Creates an instance.
        Parameters:
        flags - The FlagSet containing the events.
    • Method Detail

      • contains

        public boolean contains​(@Event
                                @com.google.android.exoplayer2.Player.Event int event)
        Returns whether the given Player.Event occurred.
        Parameters:
        event - The Player.Event.
        Returns:
        Whether the Player.Event occurred.
      • containsAny

        public boolean containsAny​(@Event
                                   @com.google.android.exoplayer2.Player.Event int... events)
        Returns whether any of the given events occurred.
        Parameters:
        events - The events.
        Returns:
        Whether any of the events occurred.
      • size

        public int size()
        Returns the number of events in the set.
      • get

        @Event
        public @com.google.android.exoplayer2.Player.Event int get​(int index)
        Returns the Player.Event at 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) and size() (exclusive).
        Returns:
        The Player.Event at the given index.
        Throws:
        IndexOutOfBoundsException - If index is outside the allowed range.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public boolean equals​(@Nullable
                              Object obj)
        Overrides:
        equals in class Object