Go Down

Topic: [Published on GitHub] LinkedList Class (Fully implemented) (Read 779 times) previous topic - next topic


Hi folks,

I have published my LinkedList Class on GitHub. It's REALLY usefull for all kinds of libraries and projects.

Features that are implemented:

  • LinkedList<T>::LinkedList() - Constructor.

  • LinkedList<T>::~LinkedList() - Destructor. Clear Nodes to minimize memory.

  • int LinkedList<T>::size() - Returns the current size of the list.

  • bool LinkedList<T>::add(T) - Add element T at the END of the list.

  • bool LinkedList<T>::add(int index, T) - Add element T at index of the list.

  • bool LinkedList<T>::unshift(T) - Add element T at the BEGINNING of the list.

  • bool LinkedList<T>::set(int index, T) - Set the element at index to T.

  • T LinkedList<T>::remove(int index) - Remove element at index. Return the removed element.

  • T LinkedList<T>::pop() - Remove the LAST element. Return the removed element.

  • T LinkedList<T>::shift() - Remove the FIRST element. Return the removed element.

  • T LinkedList<T>::get(int index) - Return the element at index.

  • void LinkedList<T>::clear() - Removes all elements.

For more information, and Latest releases go to https://github.com/ivanseidel/LinkedList

Fell free to commit new changes and use it.

Arduino DueTimer | https://github.com/ivanseidel/DueTimer
Arduino Thread | https://github.com/ivanseidel/ArduinoThread

Go Up