Dodo
DOm DOcument implementation
Loading...
Searching...
No Matches
Wikimedia\Dodo\Internal\LinkedList Class Reference

Static Public Member Functions

static void ll_insert_before ( $a, $b)
 Insert $a before $b.
 
static void ll_remove ( $a)
 Remove a single node $a from its list.
 
static void ll_replace ( $a, $b)
 Replace a single node $a with a list $b (which could be null)
 

Member Function Documentation

◆ ll_insert_before()

static void Wikimedia\Dodo\Internal\LinkedList::ll_insert_before ( $a,
$b )
static

Insert $a before $b.

Parameters
Node$a"circular ll node" (THING TO BE INSERTED BEFORE $b)
Node$b"circular ll node" (THING BEFORE WHICH WE INSERT $a)
Returns
void

NOTE Given what this is actually doing (if you draw it out), this could probably be renamed to 'link', where we are linking $a to $b.

◆ ll_remove()

static void Wikimedia\Dodo\Internal\LinkedList::ll_remove ( $a)
static

Remove a single node $a from its list.

Parameters
Node$a"circular ll node" to be removed
Returns
void

NOTE Again, given what this is doing, could probably re-name to 'unlink'.

◆ ll_replace()

static void Wikimedia\Dodo\Internal\LinkedList::ll_replace ( $a,
$b )
static

Replace a single node $a with a list $b (which could be null)

Parameters
Node$a"circular ll node"
?Node$b"circular ll node" (or null)
Returns
void

NOTE I don't like this method. It's confusing.


The documentation for this class was generated from the following file: