class documentation

class _DoubleLinkedListElement(object):

Constructor: _DoubleLinkedListElement(parent, value)

View In Hierarchy

An element in a double linked list used by the LRU cache.

Method __init__ The default constructor.
Method __repr__ Return a string representing this object
Method swap_forward Swap this element once forward towards the head.
Instance Variable next next element in this double linked list
Instance Variable parent DoubleLinkedList this element is a part of
Instance Variable prev previous element in this double linked list
Instance Variable value value of this element
def __init__(self, parent, value):

The default constructor.

Parameters
parent:_DoubleLinkedListDoubleLinkedList this element is a part of
value:anyvalue of this double linked list element
def __repr__(self):

Return a string representing this object

Returns
stra string representing this object
def swap_forward(self):

Swap this element once forward towards the head.

If this is already the head, nothing happens.

next element in this double linked list

DoubleLinkedList this element is a part of

previous element in this double linked list

value: any =

value of this element