All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javax.tv.service.navigation.ServiceIterator Maven / Gradle / Ivy

/*
 * @(#)ServiceIterator.java	1.12 00/08/10
 *
 * Copyright 1998-2000 by Sun Microsystems, Inc.,
 * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
 * All rights reserved.
 * 
 * This software is the confidential and proprietary information
 * of Sun Microsystems, Inc. ("Confidential Information").  You
 * shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement
 * you entered into with Sun.
 */

package javax.tv.service.navigation;

import java.util.NoSuchElementException;
import javax.tv.service.Service;


/**
 * ServiceIterator permits iteration over an ordered
 * list of Service objects.  Applications may use the
 * ServiceIterator interface to browse a
 * ServiceList forward or backward.

* * Upon initial usage, hasPrevious() will return * false and nextService() will return the * first Service in the list, if present. * * @see ServiceList */ public interface ServiceIterator { /** * * Resets the iterator to the beginning of the list, such that * hasPrevious() returns false and * nextService() returns the first Service * in the list (if the list is not empty). * * */ public abstract void toBeginning(); /** * * Sets the iterator to the end of the list, such that * hasNext() returns false and * previousService() returns the last Service * in the list (if the list is not empty). */ public abstract void toEnd(); /** * * Reports the next Service object in the list. This * method may be called repeatedly to iterate through the list. * * @return The Service object at the next position in * the list. * * @throws NoSuchElementException If the iteration has no next * Service. */ public abstract Service nextService(); /** * * Reports the previous Service object in the list. * This method may be called repeatedly to iterate through the list * in reverse order. * * @return The Service object at the previous position * in the list. * * @throws NoSuchElementException If the iteration has no previous * Service. */ public abstract Service previousService(); /** * Tests if there is a Service in the next position in * the list. * * @return true if there is a Service in * the next position in the list; false otherwise. */ public abstract boolean hasNext(); /** * * Tests if there is a Service in the previous * position in the list. * * @return true if there is a Service in * the previous position in the list; false otherwise. */ public abstract boolean hasPrevious(); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy