LinkedListModule

Data Structures View source
LinkedListModule
public module LinkedListModule

Turns a class into a linked list where each instance knows its previous and next member in the list

Constructors

construct()

Methods

static function getFirst() returns thistype
getNext() returns thistype

The next instance, wrapping around to the first one at the end of the list

getPrev() returns thistype

The previous instance, wrapping around to the last one at the start of the list

remove()

Unlinks this instance from the list. Removing an instance which is no longer linked does nothing, so remove() followed by destroy is safe.

static function iterator() returns Iterator

An iterator which iterates over all instances of this class

static function staticItr() returns Iterator

An iterator which iterates over all instances of this class

static function backIterator() returns BackIterator

An iterator which iterates over all instances of this class in reverse

static function staticBackItr() returns BackIterator

An iterator which iterates over all instances of this class in reverse