#include <coherence/util/AbstractStableIterator.hpp>
Inherits Object, and Muterator.
Inherited by SafeHashMap::EntrySetIterator.
Public Types | ||||
typedef spec::Handle | Handle | |||
AbstractStableIterator Handle definition. | ||||
typedef spec::View | View | |||
AbstractStableIterator View definition. | ||||
typedef spec::Holder | Holder | |||
AbstractStableIterator Holder definition. | ||||
Public Member Functions | ||||
virtual void | remove () | |||
Remove from the collection associated with this iterator, the last element returned from the iterator.
| ||||
virtual bool | hasNext () const | |||
Determine if the iteration has another element.
| ||||
virtual Object::Holder | next () | |||
Return the next element in the iterated series.
| ||||
Protected Member Functions | ||||
virtual Object::Holder | getPrevious () const | |||
Obtain the previous object provided by the Iterator. | ||||
virtual void | setNext (Object::Holder ohNext) | |||
Specify the next object to provide from the Iterator. | ||||
virtual void | advance ()=0 | |||
Advance to the next object. | ||||
virtual void | remove (Object::Holder ohPrev) | |||
Remove the specified item. | ||||
virtual void | onInit () | |||
Event called once the Object has finished being constructed. Specifically when the first attachment is made. This provides a safe point at which Handles/Views to "this" can be created. It is not safe to create Handles/Views to an Object from within its constructor, thus any operations which rely upon this should be deferred until the onInit event is triggered. As with all event methods any derived implementation should include a call to the super class's implementation. Specifically delegation to Object::onInit() must eventually occur or an IllegalStateException will result.
The default implementation calls the onInit() method of each of the Object's SmartMembers. |
virtual Object::Holder getPrevious | ( | ) | const [protected, virtual] |
virtual void setNext | ( | Object::Holder | ohNext | ) | [protected, virtual] |
virtual void advance | ( | ) | [protected, pure virtual] |
Advance to the next object.
This method must be implemented by the concrete sub-class by calling setNext() if there is a next object.
Implemented in SafeHashMap::EntrySetIterator.
virtual void remove | ( | Object::Holder | ohPrev | ) | [protected, virtual] |
Remove the specified item.
This is an optional operation. If the Iterator supports element removal, then it should implement this method, which is delegated to by the remove() method.
ohPrev | the previously iterated object that should be removed |
coherence::lang::UnsupportedOperationException | if removal is not supported |
Reimplemented in SafeHashMap::EntrySetIterator.