Rudiments
|
Public Member Functions | |
linkedlistnode (valuetype value) | |
virtual | ~linkedlistnode () |
void | setValue (valuetype value) |
valuetype | getValue () const |
int32_t | compare (valuetype value) const |
void | setPrevious (linkedlistnode< valuetype > *previous) |
void | setNext (linkedlistnode< valuetype > *next) |
linkedlistnode< valuetype > * | getPrevious () |
linkedlistnode< valuetype > * | getNext () |
void | print () const |
The linkedlistnode class stores the values that compose a linkedlist.
linkedlistnode< valuetype >::linkedlistnode | ( | valuetype | value | ) |
Creates an instance of the linkedlistnode class that stores value "value".
|
virtual |
Deletes this instance of the linkedlistnode class. Note however, that the value stored in the linkedlistnode is not deleted by this call.
int32_t linkedlistnode< valuetype >::compare | ( | valuetype | value | ) | const |
Returns a negative number,0 or a positive number depending on whether the key stored in the node is respectively less than, equal to or greater than "testkey".
linkedlistnode<valuetype>* linkedlistnode< valuetype >::getNext | ( | ) |
Returns the next node in the linkedlist.
linkedlistnode<valuetype>* linkedlistnode< valuetype >::getPrevious | ( | ) |
Returns the previous node in the linkedlist.
valuetype linkedlistnode< valuetype >::getValue | ( | ) | const |
Return the value stored in the node.
void linkedlistnode< valuetype >::print | ( | ) | const |
Prints the value stored in the node.
void linkedlistnode< valuetype >::setNext | ( | linkedlistnode< valuetype > * | next | ) |
Sets the pointer to the next node to "next".
void linkedlistnode< valuetype >::setPrevious | ( | linkedlistnode< valuetype > * | previous | ) |
Sets the pointer to the previous node to "previous".
void linkedlistnode< valuetype >::setValue | ( | valuetype | value | ) |
Set the value stored in the node to "value".