Rudiments
|
Public Member Functions | |
linkedlistnode (valuetype value) | |
~linkedlistnode () | |
void | setValue (valuetype value) |
valuetype | getValue () const |
int32_t | compare (valuetype value) const |
int32_t | compare (linkedlistnode< valuetype > *peer) const |
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".
linkedlistnode< valuetype >::~linkedlistnode | ( | ) |
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 value stored in the node is respectively less than, equal to or greater than "value".
int32_t linkedlistnode< valuetype >::compare | ( | linkedlistnode< valuetype > * | peer | ) | const |
Returns a negative number, 0, or a positive number depending on whether the value stored in the node is respectively less than, equal to or greater than the value stored in "peer".
linkedlistnode<valuetype>* linkedlistnode< valuetype >::getNext | ( | ) |
Returns the next node in the linkedlist or NULL if this node is the last node in the list.
linkedlistnode<valuetype>* linkedlistnode< valuetype >::getPrevious | ( | ) |
Returns the previous node in the linkedlist or NULL if this node is the first node in the list.
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 >::setValue | ( | valuetype | value | ) |
Set the value stored in the node to "value".