org.openorb.pss.connector
Interface Iterator

All Known Implementing Classes:
DatabaseIterator, FileIterator, MemoryIterator

public interface Iterator

This interface provides a way to iterate through a home with an unique storage type instance.

Author:
Jerome Daniel

Method Summary
 StorageObject detach()
          Returns the current element and detached it from the iterator.
 StorageObject element()
          Returns the current element.
 void fetch(byte[] pid)
          Set the current element of the iterator by providing a PID
 boolean hasMoreElements()
          Returns true if there are some other elements
 void next()
          Shifts to the next element
 void reset()
          Resets the iterator to the first element
 void set(int position)
          Set the current position for the iterator
 

Method Detail

hasMoreElements

boolean hasMoreElements()
Returns true if there are some other elements


next

void next()
Shifts to the next element


element

StorageObject element()
Returns the current element. CAUTION : the element returned is always the same with a new identity ( the current storage type in the home ).


detach

StorageObject detach()
Returns the current element and detached it from the iterator.


reset

void reset()
Resets the iterator to the first element


fetch

void fetch(byte[] pid)
Set the current element of the iterator by providing a PID


set

void set(int position)
Set the current position for the iterator