Protected _firstProtected _lastProtected _sizeReturns the node at the specified index of the linked list. If index = 0; first element in the list is returned. If index = 3; fourth element in the list is returned.
Index of the node to be retrieved
Returns the node at the specified index of the linked list. If index = 0; first element in the list is returned. If index = 3; fourth element in the list is returned.
Index of the node to be retrieved
Return value type
Returns the node at the specified index of the linked list. If index = 0; first element in the list is returned. If index = 3; fourth element in the list is returned.
Index of the node to be retrieved
Return value type
Starting from TypeScript version 5.0 and onwards, the use of distinct access modifiers for Getters and Setters is not permitted. As an alternative, to ensure compatibility, it is necessary to adopt a Java-style approach for Setters (using the same name as the property) while utilizing separate method names for Getters.
Starting from TypeScript version 5.0 and onwards, the use of distinct access modifiers for Getters and Setters is not permitted. As an alternative, to ensure compatibility, it is necessary to adopt a Java-style approach for Setters (using the same name as the property) while utilizing separate method names for Getters.
Starting from TypeScript version 5.0 and onwards, the use of distinct access modifiers for Getters and Setters is not permitted. As an alternative, to ensure compatibility, it is necessary to adopt a Java-style approach for Setters (using the same name as the property) while utilizing separate method names for Getters.
The peekFirst function returns the first node or value in a doubly linked list, depending on the specified
parameter.
The method peekFirst returns either the first node of the doubly linked list (DoublyLinkedListNode<T>),
the value of the first node (T), or null depending on the value of the by parameter.
The peekFirst function returns the first node or value in a doubly linked list, depending on the specified
parameter.
The "by" parameter is an optional parameter of type DoublyLinkedListGetBy. It is used to specify whether to return the first node, the value of the first node, or the first node itself.
The method peekFirst returns either the first node of the doubly linked list (DoublyLinkedListNode<T>),
the value of the first node (T), or null depending on the value of the by parameter.
The peekFirst function returns the first node or value in a doubly linked list, depending on the specified
parameter.
The "by" parameter is an optional parameter of type DoublyLinkedListGetBy. It is used to specify whether to return the first node, the value of the first node, or the first node itself.
The method peekFirst returns either the first node of the doubly linked list (DoublyLinkedListNode<T>),
the value of the first node (T), or null depending on the value of the by parameter.
The peekLast function returns the last node or value in a doubly linked list.
The method peekLast returns the last node, value, or null based on the specified by parameter.
The peekLast function returns the last node or value in a doubly linked list.
The "by" parameter is an optional parameter of type DoublyLinkedListGetBy. It specifies whether to return the last node, the value of the last node, or both. The default value is 'val', which means that if no value is provided for the "by" parameter, the method
The method peekLast returns the last node, value, or null based on the specified by parameter.
The peekLast function returns the last node or value in a doubly linked list.
The "by" parameter is an optional parameter of type DoublyLinkedListGetBy. It specifies whether to return the last node, the value of the last node, or both. The default value is 'val', which means that if no value is provided for the "by" parameter, the method
The method peekLast returns the last node, value, or null based on the specified by parameter.
The function pollFirst removes and returns the first element of a doubly linked list, either as a node or its
value, depending on the specified parameter.
The method pollFirst returns either the value of the first node in the doubly linked list, the first node
itself, or null if the list is empty. The specific return type depends on the value of the by parameter. If by
is set to 'node', the method returns the first node. If by is set to 'val', the method returns the value
The function pollFirst removes and returns the first element of a doubly linked list, either as a node or its
value, depending on the specified parameter.
The "by" parameter is an optional parameter of type DoublyLinkedListGetBy. It specifies the criteria by which the first element should be retrieved from the doubly linked list. The default value is 'val', which means the first element will be retrieved by its value. Other possible values for "by
The method pollFirst returns either the value of the first node in the doubly linked list, the first node
itself, or null if the list is empty. The specific return type depends on the value of the by parameter. If by
is set to 'node', the method returns the first node. If by is set to 'val', the method returns the value
The function pollFirst removes and returns the first element of a doubly linked list, either as a node or its
value, depending on the specified parameter.
The "by" parameter is an optional parameter of type DoublyLinkedListGetBy. It specifies the criteria by which the first element should be retrieved from the doubly linked list. The default value is 'val', which means the first element will be retrieved by its value. Other possible values for "by
The method pollFirst returns either the value of the first node in the doubly linked list, the first node
itself, or null if the list is empty. The specific return type depends on the value of the by parameter. If by
is set to 'node', the method returns the first node. If by is set to 'val', the method returns the value
The function pollLast removes and returns the last element in a doubly linked list, either as a node or its value,
depending on the specified parameter.
The method pollLast returns either a DoublyLinkedListNode<T>, the value of the node (T), or null.
The specific type that is returned depends on the value of the by parameter. If by is set to 'node', then a
DoublyLinkedListNode<T> is returned. If by is set to `'
The function pollLast removes and returns the last element in a doubly linked list, either as a node or its value,
depending on the specified parameter.
The parameter "by" is of type DoublyLinkedListGetBy, which is an enum that can have two possible values: 'node' or 'val'. It determines the type of value that will be returned by the pollLast method. If 'node' is specified, the method will return the
The method pollLast returns either a DoublyLinkedListNode<T>, the value of the node (T), or null.
The specific type that is returned depends on the value of the by parameter. If by is set to 'node', then a
DoublyLinkedListNode<T> is returned. If by is set to `'
The function pollLast removes and returns the last element in a doubly linked list, either as a node or its value,
depending on the specified parameter.
The parameter "by" is of type DoublyLinkedListGetBy, which is an enum that can have two possible values: 'node' or 'val'. It determines the type of value that will be returned by the pollLast method. If 'node' is specified, the method will return the
The method pollLast returns either a DoublyLinkedListNode<T>, the value of the node (T), or null.
The specific type that is returned depends on the value of the by parameter. If by is set to 'node', then a
DoublyLinkedListNode<T> is returned. If by is set to `'
The remove function removes an element at a specified index from a data structure, updating the links between
nodes accordingly.
The index parameter represents the position of the element to be removed in the data structure. It is of type number.
The remove method returns the value of the removed element (T) if the removal is successful, or null
if the index is out of bounds.
Updates the value of the node at the specified index. If index = 0; Value of the first element in the list is updated. If index = 3; Value of the fourth element in the list is updated.
Index of the node to be updated
New value of the node
Generated using TypeDoc
The function adds a new node with a given value to the beginning of a doubly linked list.