Module tvbrowser
Package devplugin

Class ChannelFilter

  • All Implemented Interfaces:
    ProgramFilter

    public final class ChannelFilter
    extends java.lang.Object
    implements ProgramFilter
    A filter that channels for filters using a ChannelFilterComponent. NOTE: The ChannelFilterComponent cannot be added itself, only the name of the of the ChannelFilterComponent can be provided to load it internal.

    Since:
    3.2.1
    Author:
    René Mach
    • Method Detail

      • createChannelFilterForName

        public static ChannelFilter createChannelFilterForName​(java.lang.String name)
                                                        throws java.lang.ClassCastException,
                                                               TvBrowserException
        Creates a channel filter with the name of the component to create the filter from.

        Parameters:
        name - The name of the filter component to create the channel filter from.
        Returns:
        The created channel filter.
        Throws:
        java.lang.ClassCastException - Thrown if the found component is not a ChannelFilterComponent.
        TvBrowserException - Thrown if the ChannelFilterComponent with the given name was not found.
      • accept

        public boolean accept​(Program program)
        Specified by:
        accept in interface ProgramFilter
        Parameters:
        program - the program to be checked
        Returns:
        true, if the filter accepts the specified program
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface ProgramFilter
        Returns:
        the name of this filter
      • toString

        public java.lang.String toString()
        Specified by:
        toString in interface ProgramFilter
        Overrides:
        toString in class java.lang.Object
      • getChannels

        public Channel[] getChannels()
        Gets all the channels of this channel filter.

        Returns:
        All channels of this channel filter.