\Phabstractic\Data\TypesLinkedListElement

LinkedList Basic Concrete Class

Defines a basic linked list class, implements ListInterface

The idea behind this element is that it provides a reference to an element 'ahead' of itself, and a reference 'behind' itself. This gives us the ability to define a list where you can edit its contents through the nodes themselves as opposed to operations on an array.

CHANGELOG

1.0: Created LinkedListElement - July 25th, 2016

Summary

Methods
Properties
Constants
getNextElement()
setNextElement()
nullNextElement()
getPreviousElement()
setPreviousElement()
nullPreviousElement()
getData()
getDataReference()
setData()
setDataReference()
__construct()
buildElement()
__debugInfo()
No public properties found
No constants found
No protected methods found
$nextElement
$previousElement
N/A
No private methods found
$data
N/A

Properties

$nextElement

$nextElement : null|\Phabstractic\Data\Types\Resource\Phabstractic\Data\Types\Resource\LinkedListElementInterface

The next element in the series

Type

null|\Phabstractic\Data\Types\Resource\Phabstractic\Data\Types\Resource\LinkedListElementInterface

$previousElement

$previousElement : null|\Phabstractic\Data\Types\Resource\Phabstractic\Data\Types\Resource\LinkedListElementInterface

The previous element in the series

Type

null|\Phabstractic\Data\Types\Resource\Phabstractic\Data\Types\Resource\LinkedListElementInterface

$data

$data : mixed

The data associated with the linked list element

Type

mixed

Methods

getNextElement()

getNextElement() : \Phabstractic\Data\Types\Resource\Phabstractic\Data\Types\Resource\LinkedListElementInterface

Get the next element reference

If null, at end of list

Returns

\Phabstractic\Data\Types\Resource\Phabstractic\Data\Types\Resource\LinkedListElementInterface

nullNextElement()

nullNextElement() 

Set the next element pointer to null

This does not nullify the existing linked item

getPreviousElement()

getPreviousElement() : \Phabstractic\Data\Types\Resource\Phabstractic\Data\Types\Resource\LinkedListElementInterface

Get the previous element reference

If null, at beginning of list

Returns

\Phabstractic\Data\Types\Resource\Phabstractic\Data\Types\Resource\LinkedListElementInterface

nullPreviousElement()

nullPreviousElement() 

This nulls the previous pointer for this element

Doesn't actually nullify the referenced object

getData()

getData() : mixed

Get the data associated with this element

Returns

mixed

getDataReference()

getDataReference() : mixed

Get the data associated with this element as a reference

Returns

mixed

setData()

setData(mixed  $data) 

Set the data associated with this element

Parameters

mixed $data

setDataReference()

setDataReference(  $data) 

Set the data associated with this element as a reference

Parameters

$data

__construct()

__construct(mixed  $data, \Phabstractic\Data\Types\&Phabstractic\Data\Types\Resource\LinkedListElementInterface  $previous = null, \Phabstractic\Data\Types\&Phabstractic\Data\Types\Resource\LinkedListElementInterface  $next = null) 

Linked List Element Constructor

Sets the data associated with the linked list element as well as next and previous references if given

Parameters

mixed $data

The data to associate

\Phabstractic\Data\Types\&Phabstractic\Data\Types\Resource\LinkedListElementInterface $previous
\Phabstractic\Data\Types\&Phabstractic\Data\Types\Resource\LinkedListElementInterface $next

buildElement()

buildElement(mixed  $data, \Phabstractic\Data\Types\&Phabstractic\Data\Types\Resource\LinkedListElementInterface  $previous = null, \Phabstractic\Data\Types\&Phabstractic\Data\Types\Resource\LinkedListElementInterface  $next = null) 

Build a Linked List Element

Parameters

mixed $data

The data to associate

\Phabstractic\Data\Types\&Phabstractic\Data\Types\Resource\LinkedListElementInterface $previous
\Phabstractic\Data\Types\&Phabstractic\Data\Types\Resource\LinkedListElementInterface $next

__debugInfo()

__debugInfo() 

Debug Info (var_dump)

Display debug info

Requires PHP 5.6+