linkedlistnode< valuetype > Class Template Reference

## 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

## Detailed Description

### template<class valuetype>
class linkedlistnode< valuetype >

The linkedlistnode class stores the values that compose a linkedlist.

## Constructor & Destructor Documentation

## linkedlistnode()

template<class valuetype >

linkedlistnode< valuetype >::linkedlistnode | ( | valuetype | value | ) |

Creates an instance of the linkedlistnode class that stores value "value".

## ~linkedlistnode()

template<class valuetype >

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.

## Member Function Documentation

## compare() [1/2]

template<class valuetype >

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".

## compare() [2/2]

template<class valuetype >

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".

## getNext()

template<class valuetype >

linkedlistnode<valuetype>* linkedlistnode< valuetype >::getNext | ( |  | ) |

Returns the next node in the linkedlist or NULL if this node is the last node in the list.

## getPrevious()

template<class valuetype >

linkedlistnode<valuetype>* linkedlistnode< valuetype >::getPrevious | ( |  | ) |

Returns the previous node in the linkedlist or NULL if this node is the first node in the list.

## getValue()

template<class valuetype >

valuetype linkedlistnode< valuetype >::getValue | ( |  | ) | const

Return the value stored in the node.

## print()

template<class valuetype >

void linkedlistnode< valuetype >::print | ( |  | ) | const

Prints the value stored in the node.

## setValue()

template<class valuetype >

void linkedlistnode< valuetype >::setValue | ( | valuetype | value | ) |

Set the value stored in the node to "value".