Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

util::Iterator< T > Class Template Reference

#include <Iterator.h>

Inheritance diagram for util::Iterator< T >:

util::Object util::List< T > util::Fifo< T > util::Heap< T, comparator > util::SortedList< T, comparator > util::Stack< T > List of all members.

Detailed Description

template<class T>
class util::Iterator< T >

Iterator is an interface for all iterable object collections.

An iterable collection may be represented as a list, hash table or whatever. The methods in this interface provide sequential acces to the data a collection contains.


Public Methods

virtual void reset (void)=0
 Reset the iterator.

virtual T * next (void)=0
 Get the next object in a collection.

virtual bool hasNext (void) const=0
 Check whether the collection has more data to fetch.


Member Function Documentation

template<class T>
virtual bool util::Iterator< T >::hasNext void    const [pure virtual]
 

Check whether the collection has more data to fetch.

A call to next() should return new data until this method returns false.

Implemented in util::Hashtable< key, value >, util::List< T >, util::Hashtable< int, SignalHandler * >, util::Hashtable< std::string, Serializer * >, util::Hashtable< std::string, std::string >, util::List< Sensor * >, util::List< EventListener< ClassificationEvent< T, I, C > > * >, util::List< EventListener< OptimizationEvent > * >, util::List< Node * >, util::List< Tree * >, util::List< EventListener< ClassificationEvent< T, I, int > > * >, util::List< int >, util::List< EventListener< T > * >, util::List< ThreadListener * >, util::List< Section * >, util::List< ConfusionMatrix >, util::List< EventListener< EvolutionEvent< T > > * >, and util::List< EventListener< ClassificationEvent< double, I, C > > * >.

template<class T>
virtual T* util::Iterator< T >::next void    [pure virtual]
 

Get the next object in a collection.

The collection should maintain an internal counter for sequential access.

Returns:
the next item in a collection or NULL if there is no more data

Implemented in util::Hashtable< key, value >, util::List< T >, util::Hashtable< int, SignalHandler * >, util::Hashtable< std::string, Serializer * >, util::Hashtable< std::string, std::string >, util::List< Sensor * >, util::List< EventListener< ClassificationEvent< T, I, C > > * >, util::List< EventListener< OptimizationEvent > * >, util::List< Node * >, util::List< Tree * >, util::List< EventListener< ClassificationEvent< T, I, int > > * >, util::List< int >, util::List< EventListener< T > * >, util::List< ThreadListener * >, util::List< Section * >, util::List< ConfusionMatrix >, util::List< EventListener< EvolutionEvent< T > > * >, and util::List< EventListener< ClassificationEvent< double, I, C > > * >.

template<class T>
virtual void util::Iterator< T >::reset void    [pure virtual]
 

Reset the iterator.

Next call to next() returns the first object in a collection.

Implemented in util::Hashtable< key, value >, util::List< T >, util::Hashtable< int, SignalHandler * >, util::Hashtable< std::string, Serializer * >, util::Hashtable< std::string, std::string >, util::List< Sensor * >, util::List< EventListener< ClassificationEvent< T, I, C > > * >, util::List< EventListener< OptimizationEvent > * >, util::List< Node * >, util::List< Tree * >, util::List< EventListener< ClassificationEvent< T, I, int > > * >, util::List< int >, util::List< EventListener< T > * >, util::List< ThreadListener * >, util::List< Section * >, util::List< ConfusionMatrix >, util::List< EventListener< EvolutionEvent< T > > * >, and util::List< EventListener< ClassificationEvent< double, I, C > > * >.


The documentation for this class was generated from the following file:
Documentation generated on 11.09.2003 with Doxygen.
The documentation is copyrighted material.
Copyright © Topi Mäenpää 2003. All rights reserved.