com.sap.ip.me.api.services
Interface MeIterator


public interface MeIterator

An object that implements the MeIterator interface generates a series of elements, one at a time. Successive calls to the next method return successive elements of the series.

For example, to print all elements of a MeTreeSet t :

     for (MeIterator i = t.iterator() ; i.hasNext() ;) {
         System.out.println(i.next());
}

Version:
1.0
Author:

Method Summary
 int elementCount()
          Deprecated.  
 boolean hasNext()
          Tests if this iterator contains more elements.
 java.lang.Object next()
          Returns the next element of this iterator if this iterator object has at least one more element to provide.
 void reset()
          Resets the position of the iterator back to the first element.
 

Method Detail

hasNext

public boolean hasNext()
Tests if this iterator contains more elements.

Returns:
true if and only if this iterator object contains at least one more element to provide; false otherwise.

next

public java.lang.Object next()
Returns the next element of this iterator if this iterator object has at least one more element to provide.

Returns:
the next element of this iterator.

elementCount

public int elementCount()
Deprecated.  

Returns the total amount of elements that this iterator contains, regardless if they have already been iterated over or not.

Returns:
the total amount of elements that this iterator contains.

reset

public void reset()
Resets the position of the iterator back to the first element. The following next() call will return the first element.



Copyright © 2005 SAP AG. All Rights Reserved.