Arduino List Library
3.0.1
The Ultimate Collection of Lists
|
A list with the most basic implementation as a single-linked list. More...
#include <List.hpp>
Public Member Functions | |
List (bool mutableList=false) | |
Constructor of a List Object. More... | |
Public Member Functions inherited from SingleLinkedList< T > | |
SingleLinkedList (bool mutableList=false) | |
Constructor of a SingleLinkedList Object. More... | |
~SingleLinkedList () | |
Destructor of a SingleLinkedList Object. | |
void | addAtIndex (int index, T &value) override |
Add the value to the list at the given index. The original entry at this index, and followings, will be placed directly after the new entry. More... | |
void | clear () override |
Remove all elements from the List. More... | |
void | remove (int index) override |
Remove the entry at the given index. More... | |
Public Member Functions inherited from AbstractList< T > | |
void | add (T &value) |
Add a new entry at the end of the list. More... | |
void | addAll (int index, AbstractList< T > &list) |
Add all entries from the given list to this list at a specified index. The original entry at this index, and followings, will be placed directly after the entries of the given list. More... | |
void | addAll (AbstractList< T > &list) |
Add all entries from the given list at the end of the list. More... | |
void | addAll (int index, T *arr, const size_t arrSize) |
Add all entries from an array to this list at a specified index. The original entry at this index, and followings, will be placed directly after the entries of the given list. More... | |
void | addAll (T *arr, const size_t arrSize) |
Add all entries from an array. More... | |
void | addFirst (T &value) |
Add a new entry at the beginning of the list. More... | |
void | addLast (T &value) |
Add a new entry at the end of the list. More... | |
T | get (const int index) |
Get the raw value at a specified index. More... | |
T * | getMutableValue (const int index) |
Get the pointer to the mutable object at a specified index. More... | |
virtual void | removeFirst () |
Remove the first entry from the list. | |
virtual void | removeLast () |
Remove the las entry from the list. | |
void | removeAll () |
Remove all elements from the List. More... | |
int | getSize () const |
Get the number how many elements are saved in the list. More... | |
bool | isMutable () const |
Check if the list is mutable. More... | |
bool | isEmpty () const |
Check if the list is empty. More... | |
bool | equals (AbstractList< T > &other) |
Compare two lists whether their attributes and entries are equal. More... | |
T | operator[] (const int index) |
Get the raw value at a specified index. More... | |
bool | operator== (AbstractList< T > &other) |
Compare two lists whether their attributes and entries are equal. More... | |
bool | operator!= (AbstractList< T > &other) |
Opposite of '=='. More... | |
void | operator+ (T &value) |
Add a new entry at the end of the list. More... | |
void | operator+ (AbstractList< T > &list) |
Add all entries from the given list at the end of the list. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from SingleLinkedList< T > | |
T * | getPointer (int index) override |
The last entry of the list. More... | |
Protected Member Functions inherited from AbstractList< T > | |
AbstractList (const bool mutableList) | |
Constructor of an AbstractList Object. More... | |
void | increaseSize () |
Increase the size of the list by one. Should only be called after an insertion! | |
void | decreaseSize () |
Decrease the size of the list by one. Should only be called after an deletion! | |
void | resetSize () |
Reset the size to zero. | |
bool | isIndexOutOfBounds (const int index) const |
Method to verify if the given index is out of the range of the list size. More... | |
A list with the most basic implementation as a single-linked list.
T | Data Type of entries, that should be stored in the list. |
Constructor of a List Object.
mutableList | true if the list should be mutable; false otherwise (default). |