Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

Copyright © 2006 Sun Microsystems, Inc. All rights reserved.

JSR-927 (Maintenance Release)

javax.tv.service.navigation
Class LocatorFilter

java.lang.Object
  extended byjavax.tv.service.navigation.ServiceFilter
      extended byjavax.tv.service.navigation.LocatorFilter

public final class LocatorFilter
extends ServiceFilter

LocatorFilter represents a ServiceFilter based on a set of locators. A ServiceList resulting from this filter will include only services matching the specified locators.

See Also:
Locator, ServiceList

Constructor Summary
LocatorFilter(Locator[] locators)
          Constructs the filter based on a set of locators.
 
Method Summary
 boolean accept(Service service)
          Tests if the given service passes the filter.
 Locator[] getFilterValue()
          Reports the locators used to create this filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocatorFilter

public LocatorFilter(Locator[] locators)
              throws InvalidLocatorException
Constructs the filter based on a set of locators.

Parameters:
locators - An array of locators representing services to be included in a resulting ServiceList.
Throws:
InvalidLocatorException - If one of the given locators does not reference a valid Service.
Method Detail

getFilterValue

public Locator[] getFilterValue()
Reports the locators used to create this filter.

Returns:
The array of locators used to create this filter.

accept

public boolean accept(Service service)
Tests if the given service passes the filter.

Specified by:
accept in class ServiceFilter
Parameters:
service - An individual Service to be evaluated against the filtering algorithm.
Returns:
true if service belongs to the set of locators indicated by the filter value; false otherwise.

JSR-927 (Maintenance Release)

Copyright © 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

For more information, please consult the JSR 927 specification.