1 /*
2 * $Id: IFacesListenerIterator.java,v 1.18 2011/06/16 09:29:40 jbmeslin Exp $
3 *
4 */
5 package org.rcfaces.core.component.iterator;
6
7 import java.util.NoSuchElementException;
8
9 import javax.faces.event.FacesListener;
10
11 /**
12 * An iterator over a collection of FacesListeners.
13 *
14 * @author Olivier Oeuillot (latest modification by $Author: jbmeslin $)
15 * @version $Revision: 1.18 $ $Date: 2011/06/16 09:29:40 $
16 */
17 public interface IFacesListenerIterator {
18 /**
19 * Returns the number of facesListeners in this list.
20 *
21 * @return the number of facesListeners in this list.
22 */
23 int count();
24
25 /**
26 * Returns <tt>true</tt> if the iteration has more facesListeners. (In
27 * other words, returns <tt>true</tt> if <tt>next</tt> would return an
28 * element rather than throwing an exception.)
29 *
30 * @return <tt>true</tt> if the iterator has more facesListeners.
31 */
32 boolean hasNext();
33
34 /**
35 * Returns the next FacesListener in the iteration. Calling this method
36 * repeatedly until the {@link #hasNext()} method returns false will return
37 * each FacesListener in the underlying collection exactly once.
38 *
39 * @return the next FacesListener in the iteration.
40 * @exception NoSuchElementException
41 * iteration has no more FacesListeners.
42 */
43 FacesListener next();
44
45 /**
46 * Returns an array containing all of the FacesListeners in this list in
47 * proper sequence.
48 *
49 * @return an array containing all of the FacesListeners in this list in
50 * proper sequence.
51 */
52 FacesListener[] toArray();
53 }