Loading Please wait...
|
Public Member Functions |
| | zVectIterator ($vector) |
| | toFront () |
| | Starts Iteration towards Front.
|
| | toBack () |
| | Starts Iteration towards Back.
|
| | hasNext () |
| | Checks wheather or not the current Node has a next element.
|
| | hasPrevious () |
| | Checks wheather or not the current Node has a Previous element.
|
| | next () |
| | Get the Next Item.
|
| | previous () |
| | Get the Previous Node.
|
| | value () |
| | Returns the data stored in the Current Node.
|
| | remove () |
| | Removes the Current Node and its Child nodes too.
|
| | setValue ($val) |
| | setvalue to the current Node
|
| | index () |
| | Returns the Current Index.
|
| | size () |
| | Returns the Size (Length) of the target Iterable Vector.
|
| | begin () |
| | Checks wheather or not the current node is the begening node.
|
| | end () |
| | Checks wheather or not the Current Node is the Ending Node.
|
Data Fields |
| | $vector |
| | $direction = true |
| | $iterationIndex = -1 |
Detailed Description
Definition at line 116 of file zvect.php.
Member Function Documentation
| zVectIterator::zVectIterator |
( |
$ |
vector |
) |
|
| zVectIterator::toFront |
( |
|
) |
|
Starts Iteration towards Front.
Definition at line 149 of file zvect.php.
00149 {
00150 $this->direction=true;
00151 $this->iterationIndex=0;
00152 }
| zVectIterator::toBack |
( |
|
) |
|
Starts Iteration towards Back.
Definition at line 157 of file zvect.php.
00157 {
00158 $this->direction=false;
00159 $this->iterationIndex=0;
00160 }
| zVectIterator::hasNext |
( |
|
) |
|
Checks wheather or not the current Node has a next element.
- Returns:
- boolean
Definition at line 166 of file zvect.php.
00166 {
00167 $currentNode = $this->vector->at($this->iterationIndex++);
00168 return $currentNode->hasNext();
00169 }
| zVectIterator::hasPrevious |
( |
|
) |
|
Checks wheather or not the current Node has a Previous element.
- Returns:
- boolean
Definition at line 175 of file zvect.php.
00175 {
00176 $currentNode = $this->vector->at($this->iterationIndex--);
00177 return $currentNode->hasParent();
00178 }
Get the Next Item.
- Returns:
- zItem
Definition at line 184 of file zvect.php.
00184 {
00185 $currentNode = $this->vector->at($this->iterationIndex);
00186 return $currentNode->getNext();
00187 }
| zVectIterator::previous |
( |
|
) |
|
Get the Previous Node.
- Returns:
- zItem
Definition at line 193 of file zvect.php.
00193 {
00194 $currentNode = $this->vector->at($this->iterationIndex);
00195 return $currentNode->getPrevious();
00196 }
Returns the data stored in the Current Node.
- Returns:
- mixed
Definition at line 202 of file zvect.php.
00202 {
00203 return $this->vector->dataAt($this->iterationIndex);
00204 }
| zVectIterator::remove |
( |
|
) |
|
Removes the Current Node and its Child nodes too.
Definition at line 209 of file zvect.php.
00209 {
00210 $this->vector->remove($this->iterationIndex);
00211 }
| zVectIterator::setValue |
( |
$ |
val |
) |
|
setvalue to the current Node
- Parameters:
-
Definition at line 217 of file zvect.php.
References $val.
00217 {
00218 $currentNode = $this->vector->at($this->iterationIndex);
00219 return $currentNode->setData($val);
00220 }
Returns the Current Index.
- Returns:
- Integer
Definition at line 226 of file zvect.php.
00226 {
00227 return $this->iterationIndex;
00228 }
Returns the Size (Length) of the target Iterable Vector.
- Returns:
- Integer
Definition at line 234 of file zvect.php.
00234 {
00235 return $this->vector->length();
00236 }
Checks wheather or not the current node is the begening node.
- Returns:
- boolean
Definition at line 242 of file zvect.php.
00242 {
00243 $currentNode = $this->vector->at($this->iterationIndex);
00244 return !$currentNode->hasParent();
00245 }
Checks wheather or not the Current Node is the Ending Node.
Definition at line 250 of file zvect.php.
00250 {
00251 $currentNode = $this->vector->at($this->iterationIndex);
00252 return !$currentNode->hasNext();
00253 }
Field Documentation
| zVectIterator::$direction = true |
| zVectIterator::$iterationIndex = -1 |
The documentation for this class was generated from the following file: