Structures_LinkedList_Single
[ class tree: Structures_LinkedList_Single ] [ index: Structures_LinkedList_Single ] [ all elements ]

Class: Structures_LinkedList_SingleNode

Source Location: /Structures_LinkedList-0.2.2/Structures/LinkedList/Single.php

Class Overview


The Structures_LinkedList_SingleNode class represents a node in a Structures_LinkedList_Single linked list structure.


Author(s):

Variables

Methods


Child classes:

Structures_LinkedList_DoubleNode
The Structures_LinkedList_DoubleNode class represents a node in a Structures_LinkedList_Double linked list structure.
LinkNodeTester
The Structures_LinkedList_SingleNode class represents a node in a Structures_LinkedList_Single linked list structure.

Inherited Variables

Inherited Methods


Class Details

[line 435]
The Structures_LinkedList_SingleNode class represents a node in a Structures_LinkedList_Single linked list structure.


[ Top ]


Class Variables

$next =

[line 442]

Next node in the linked list
  • Access: protected



[ Top ]



Method Detail

__construct (Constructor)   [line 449]

Structures_LinkedList_SingleNode __construct( )

Structures_LinkedList_SingleNode constructor
  • Access: public

Overridden in child classes as:

Structures_LinkedList_DoubleNode::__construct()
Structures_LinkedList_DoubleNode constructor
LinkNodeTester::__construct()
LinkNodeTester::__construct()

[ Top ]

__destruct (Destructor)   [line 462]

void __destruct( )

Removes node from the list, adjusting the related nodes accordingly.

This is a problem if the node is the root node for the list. At this point, however, we do not have access to the list itself. Hmm.

  • Access: public

Overridden in child classes as:

Structures_LinkedList_DoubleNode::__destruct()
Removes node from the list, adjusting the related nodes accordingly.

[ Top ]

next   [line 473]

Structures_LinkedList_SingleNode next( )

Return the next node in the linked list
  • Return: next node in the linked list
  • Access: public

[ Top ]

previous   [line 491]

Structures_LinkedList_SingleNode previous( )

Return the previous node in the linked list

Stub method for Structures_LinkedList_DoubleNode to override.

  • Return: previous node in the linked list
  • Access: public

Overridden in child classes as:

Structures_LinkedList_DoubleNode::previous()
Return the previous node in the linked list

[ Top ]

setNext   [line 507]

Structures_LinkedList_SingleNode setNext( [Structures_LinkedList_SingleNode $node = null])

Sets the pointer for the next node in the linked list to the specified node
  • Return: new next node in the linked list
  • Access: public

Parameters:

Structures_LinkedList_SingleNode   $node   —  new next node in the linked list

[ Top ]

setPrevious   [line 526]

Structures_LinkedList_SingleNode setPrevious( [Structures_LinkedList_SingleNode $node = null])

Sets the pointer for the next node in the linked list to the specified node

Stub method for Structures_LinkedList_DoubleNode to override.

  • Return: new next node in the linked list
  • Access: public

Overridden in child classes as:

Structures_LinkedList_DoubleNode::setPrevious()
Sets the pointer for the previous node in the linked list to the specified node

Parameters:

Structures_LinkedList_SingleNode   $node   —  new next node in the linked list

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:38:21 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.