Linked list structure
This package implements a doubly linked list structure. Each node (Structure_Linked_List_Node object) in the list (Structure_Linked_List) knows the previous node and the next node in the list. Unlike an array, you can insert or delete nodes at arbitrary points in the list.
Structure_Linked_List implements the Iterator interface so control structures like foreach($list as $node) and while($list->next()) work as expected.
To use this package, derive a child class from Structure_Linked_List_Node and add data to the object. Then use the Structure_Linked_List class to access the nodes.
PHP version 5
LICENSE: This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class | Description |
---|---|
Structure_Linked_List | The Structure_Linked_List class represents a linked list structure composed of Structure_Linked_List_Node objects. |
Structure_Linked_List_Node | The Structure_Linked_List_Node class represents a node in a Structure_Linked_List linked list structure. |
Documentation generated on Thu, 24 Aug 2006 10:43:31 -0400 by phpDocumentor 1.3.0