lib/Iterator.js
function() {
         this._nextCalled = true;
         if(this._collection.size() > 0) {
             if(this._hasNextCalled) {
                 this._hasNextCalled = false;
                 this._pos --;
             }

             this._pos ++;
             this._nextElement = this._collection.getAll()[this._pos];

             if(this._nextElement !== undefined) {
                 return this._nextElement;
             } else {
                 throw new Error("No such element.");
             }
         }
     }
function() {
         this._nextCalled = true;
         if(this._collection.size() > 0) {
             if(this._hasNextCalled) {
                 this._hasNextCalled = false;
                 this._pos --;
             }

             this._pos ++;
             this._nextElement = this._collection.getAll()[this._pos];

             if(this._nextElement !== undefined) {
                 return this._nextElement;
             } else {
                 throw new Error("No such element.");
             }
         }
     }
function ( ) { this . _nextCalled = true ; if ( this . _collection . size ( ) > 0 ) { if ( this . _hasNextCalled ) { this . _hasNextCalled = false ; this . _pos -- ; } this . _pos ++ ; this . _nextElement = this . _collection . getAll ( ) [ this . _pos ] ; if ( this . _nextElement !== undefined ) { return this . _nextElement ; } else { throw new Error ( "No such element." ) ; } } }
Returns the next element in the iteration.
@throws Error
Returns the next element in the iteration .