- java.lang.Object
-
- devplugin.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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accept(Program program)
static ChannelFilter
createChannelFilterForName(java.lang.String name)
Creates a channel filter with the name of the component to create the filter from.Channel[]
getChannels()
Gets all the channels of this channel filter.java.lang.String
getName()
java.lang.String
toString()
-
-
-
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 interfaceProgramFilter
- 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 interfaceProgramFilter
- Returns:
- the name of this filter
-
toString
public java.lang.String toString()
- Specified by:
toString
in interfaceProgramFilter
- Overrides:
toString
in classjava.lang.Object
-
getChannels
public Channel[] getChannels()
Gets all the channels of this channel filter.- Returns:
- All channels of this channel filter.
-
-