org.rcfaces.core.component.iterator
Interface IComponentIterator

All Known Subinterfaces:
IAdditionalInformationIterator, ICardIterator, IColumnIterator, IComponentsColumnIterator, IDataColumnIterator, IImageRadioButtonIterator, IMenuItemIterator, IMenuIterator, IParameterIterator, IRadioButtonIterator, ISelectItemIterator, ITabIterator, IToolFolderIterator, IToolItemIterator

public interface IComponentIterator

An iterator over a collection of UIComponents.

Version:
$Revision: 1.18 $ $Date: 2011/06/16 09:29:40 $
Author:
Olivier Oeuillot (latest modification by $Author: jbmeslin $)

Method Summary
 int count()
          Returns the number of components in this list.
 boolean hasNext()
          Returns true if the iteration has more components.
 UIComponent nextComponent()
          Returns the next component in the iteration.
 UIComponent[] toArray(UIComponent[] array)
          Returns an array containing all of the components in this list in proper sequence; the runtime type of the returned array is that of the specified array.
 

Method Detail

count

int count()
Returns the number of components in this list.

Returns:
the number of components in this list.

hasNext

boolean hasNext()
Returns true if the iteration has more components. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:
true if the iterator has more components.

nextComponent

UIComponent nextComponent()
Returns the next component in the iteration. Calling this method repeatedly until the hasNext() method returns false will return each element in the underlying collection exactly once.

Returns:
the next component in the iteration.
Throws:
NoSuchElementException - iteration has no more component.

toArray

UIComponent[] toArray(UIComponent[] array)
Returns an array containing all of the components in this list in proper sequence; the runtime type of the returned array is that of the specified array.

Parameters:
array - the array into which the components of this list are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
Returns:
an array containing the components of this list.
Throws:
ArrayStoreException - if the runtime type of the specified array is not a supertype of the runtime type of every component in this list.
NullPointerException - if the specified array is null.


Copyright © 2006-2011 Vedana. All Rights Reserved.