decaf::util::concurrent::CopyOnWriteArrayList< E >::ArrayListIterator Class Reference

#include <src/main/decaf/util/concurrent/CopyOnWriteArrayList.h>

Inheritance diagram for decaf::util::concurrent::CopyOnWriteArrayList< E >::ArrayListIterator:
Inheritance graph
[legend]

Public Member Functions

 ArrayListIterator (decaf::lang::Pointer< Array > array, int index)
virtual ~ArrayListIterator ()
virtual E next ()
 Returns the next element in the iteration.
virtual bool hasNext () const
 Returns true if the iteration has more elements.
virtual void remove ()
 Removes from the underlying collection the last element returned by the iterator (optional operation).
virtual void add (const E &e DECAF_UNUSED)
virtual void set (const E &e DECAF_UNUSED)
virtual bool hasPrevious () const
 Returns true if this list iterator has more elements when traversing the list in the reverse direction.
virtual E previous ()
 Returns the previous element in the list.
virtual int nextIndex () const
 Returns the index of the element that would be returned by a subsequent call to next.
virtual int previousIndex () const
 Returns the index of the element that would be returned by a subsequent call to previous.

template<typename E>
class decaf::util::concurrent::CopyOnWriteArrayList< E >::ArrayListIterator


Constructor & Destructor Documentation

template<typename E>
decaf::util::concurrent::CopyOnWriteArrayList< E >::ArrayListIterator::ArrayListIterator ( decaf::lang::Pointer< Array >  array,
int  index 
) [inline]
template<typename E>
virtual decaf::util::concurrent::CopyOnWriteArrayList< E >::ArrayListIterator::~ArrayListIterator (  )  [inline, virtual]

Member Function Documentation

template<typename E>
virtual void decaf::util::concurrent::CopyOnWriteArrayList< E >::ArrayListIterator::add ( const E &e  DECAF_UNUSED  )  [inline, virtual]
template<typename E>
virtual bool decaf::util::concurrent::CopyOnWriteArrayList< E >::ArrayListIterator::hasNext (  )  const [inline, virtual]

Returns true if the iteration has more elements.

Returns false if the next call to next would result in an NoSuchElementException to be thrown.

Returns:
true if there are more elements available for iteration.

Implements decaf::util::Iterator< E >.

template<typename E>
virtual bool decaf::util::concurrent::CopyOnWriteArrayList< E >::ArrayListIterator::hasPrevious (  )  const [inline, virtual]

Returns true if this list iterator has more elements when traversing the list in the reverse direction.

(In other words, returns true if previous would return an element rather than throwing an exception.)

Returns:
true if the list iterator has more elements when traversing the list in the reverse direction.

Implements decaf::util::ListIterator< E >.

template<typename E>
virtual E decaf::util::concurrent::CopyOnWriteArrayList< E >::ArrayListIterator::next (  )  [inline, virtual]

Returns the next element 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 element in the iteration of elements.
Exceptions:
NoSuchElementException if the iteration has no more elements.

Implements decaf::util::Iterator< E >.

template<typename E>
virtual int decaf::util::concurrent::CopyOnWriteArrayList< E >::ArrayListIterator::nextIndex (  )  const [inline, virtual]

Returns the index of the element that would be returned by a subsequent call to next.

(Returns list size if the list iterator is at the end of the list.)

Returns:
the index of the element that would be returned by a subsequent call to next, or list size if list iterator is at end of list.

Implements decaf::util::ListIterator< E >.

template<typename E>
virtual E decaf::util::concurrent::CopyOnWriteArrayList< E >::ArrayListIterator::previous (  )  [inline, virtual]

Returns the previous element in the list.

This method may be called repeatedly to iterate through the list backwards, or intermixed with calls to next to go back and forth. (Note that alternating calls to next and previous will return the same element repeatedly.)

Returns:
the previous element in the list.
Exceptions:
NoSuchElementException if the iteration has no previous element.

Implements decaf::util::ListIterator< E >.

template<typename E>
virtual int decaf::util::concurrent::CopyOnWriteArrayList< E >::ArrayListIterator::previousIndex (  )  const [inline, virtual]

Returns the index of the element that would be returned by a subsequent call to previous.

(Returns -1 if the list iterator is at the beginning of the list.)

Returns:
the index of the element that would be returned by a subsequent call to previous, or -1 if list iterator is at beginning of list.

Implements decaf::util::ListIterator< E >.

template<typename E>
virtual void decaf::util::concurrent::CopyOnWriteArrayList< E >::ArrayListIterator::remove (  )  [inline, virtual]

Removes from the underlying collection the last element returned by the iterator (optional operation).

This method can be called only once per call to next. The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method.

Exceptions:
UnsupportedOperationException if the remove operation is not supported by this Iterator.
IllegalStateException if the next method has not yet been called, or the remove method has already been called after the last call to the next method.

Implements decaf::util::Iterator< E >.

template<typename E>
virtual void decaf::util::concurrent::CopyOnWriteArrayList< E >::ArrayListIterator::set ( const E &e  DECAF_UNUSED  )  [inline, virtual]

The documentation for this class was generated from the following file:

Generated on 1 Dec 2014 for activemq-cpp-3.8.2 by  doxygen 1.6.1