Class ListIterator

Description

Iterator implementation

The ListIterator class expects an instance of the AbstractList in the constructor. Based on it, the object can iterate through the list members forward and backwards, and jump to a specific list index.

Located in /core/util/ListIterator.class.php (line 43)

PHP2Go
   |
   --ListIterator
Variable Summary
Method Summary
mixed current ()
bool hasNext ()
bool hasPrevious ()
bool moveToIndex (int $index)
mixed next ()
int nextIndex ()
unknown previous ()
int previousIndex ()
Variables
int $current (line 51)

Current cursor position

  • access: private
AbstractList $_List (line 59)

List instance

  • access: private
Methods
Constructor ListIterator (line 67)

Class constructor

ListIterator ListIterator (AbstractList $List)
current (line 105)

Gets current list element

mixed current ()
getCurrentIndex (line 82)

Gets current cursor position

int getCurrentIndex ()
hasNext (line 114)

Check if there's a next item to be read

bool hasNext ()
hasPrevious (line 147)

Checks if there's a previous item before the current one

bool hasPrevious ()
moveToIndex (line 92)

Moves to a given list index

bool moveToIndex (int $index)
  • int $index: Target index
next (line 125)

Moves cursor to the next position and returns the fetched element.

Returns FALSE when the cursor is already at the last position.

mixed next ()
nextIndex (line 138)

Gets next list index

int nextIndex ()
previous (line 158)

Moves the cursor to the previous index and return the fetched element

Returns FALSE when the cursor is already at the first position.

unknown previous ()
previousIndex (line 171)

Gets the previous list index

int previousIndex ()

Inherited Methods

Inherited From PHP2Go

PHP2Go::PHP2Go()
PHP2Go::equals()
PHP2Go::generateUniqueId()
PHP2Go::getClassName()
PHP2Go::getConfigVal()
PHP2Go::getLangVal()
PHP2Go::getObjectName()
PHP2Go::getParentName()
PHP2Go::hasDestructor()
PHP2Go::hashCode()
PHP2Go::isA()
PHP2Go::isSubclassOf()
PHP2Go::logError()
PHP2Go::raiseError()
PHP2Go::registerDestructor()
PHP2Go::registerShutdownFunc()
PHP2Go::retrieve()
PHP2Go::store()
PHP2Go::__toString()

Documentation generated on Sun, 07 Oct 2007 19:27:17 -0300 by phpDocumentor 1.3.2