public final class PreferenceFilter extends ServiceFilter
PreferenceFilter represents a
ServiceFilter based on a user preference for favorite
services. A ServiceList resulting from this filter
will include only user favorite services contained in the specified
preference.FavoriteServicesName,
ServiceList| Constructor and Description |
|---|
PreferenceFilter(FavoriteServicesName preference)
Constructs the filter based on a particular user preference
for favorite services.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(Service service)
Tests if the given service passes the filter.
|
FavoriteServicesName |
getFilterValue()
Reports the user preference used to create this filter.
|
static FavoriteServicesName[] |
listPreferences()
Reports the available favorite service preferences which
can be used to create this filter.
|
public PreferenceFilter(FavoriteServicesName preference)
preference - A named user preference, obtained from
the listPreferences() method, representing favorite
Services to be included in a resulting service list.IllegalArgumentException - If the specified preference is
not obtainable from the listPreferences() method.listPreferences()public static FavoriteServicesName[] listPreferences()
public FavoriteServicesName getFilterValue()
public boolean accept(Service service)
accept in class ServiceFilterservice - An individual Service to be evaluated
against the filtering algorithm.true if service is part of the
favorite services indicated by the filter value; false
otherwise.Copyright © 2012 code4tv.com. All Rights Reserved.