Packagesystem.data.iterators
Classpublic class ProtectedIterator
InheritanceProtectedIterator Inheritance Object
Implements Iterator

Protect an iterator. This class protect the remove, reset and seek method.

Example :

     import system.data.iterators.StringIterator ;
     import system.data.iterators.ProtectedIterator ;
     
     var it:ProtectedIterator = new ProtectedIterator( new StringIterator( "hello world" ) ) ;
     while ( it.hasNext() )
     {
         trace( it.next() ) ;
     }
     



Public Methods
 MethodDefined By
  
Creates a new ProtectedIterator instance.
ProtectedIterator
  
hasNext():Boolean
Returns true if the iteration has more elements.
ProtectedIterator
  
key():*
Returns the current key of the internal pointer of the iterator (optional operation).
ProtectedIterator
  
next():*
Returns the next element in the iteration.
ProtectedIterator
  
remove():*
Unsupported method in all ProtectedIterator objects.
ProtectedIterator
  
reset():void
Unsupported method in all ProtectedIterator.
ProtectedIterator
  
seek(position:*):void
Unsupported method in all ProtectedIterator.
ProtectedIterator
Constructor Detail
ProtectedIterator()Constructor
public function ProtectedIterator(i:Iterator)

Creates a new ProtectedIterator instance.

Parameters
i:Iterator — the iterator to protected.

Throws
ArgumentError — If the iterator the passed-in parameter is null or undefined.
Method Detail
hasNext()method
public function hasNext():Boolean

Returns true if the iteration has more elements.

Returns
Booleantrue if the iteration has more elements.
key()method 
public function key():*

Returns the current key of the internal pointer of the iterator (optional operation).

Returns
* — the current key of the internal pointer of the iterator (optional operation).
next()method 
public function next():*

Returns the next element in the iteration.

Returns
* — the next element in the iteration.
remove()method 
public function remove():*

Unsupported method in all ProtectedIterator objects.

Returns
*

Throws
IllegalOperationError — the remove() method is unsupported in a ProtectedIterator instance.
reset()method 
public function reset():void

Unsupported method in all ProtectedIterator.


Throws
IllegalOperationError — the reset() method is unsupported in a ProtectedIterator instance.
seek()method 
public function seek(position:*):void

Unsupported method in all ProtectedIterator.

Parameters

position:*


Throws
IllegalOperationError — the seek() method is unsupported in a ProtectedIterator instance.