fm.liveswitch.LinkedList< T > Class Template Reference

A linked list. More...

Public Member Functions

fm.liveswitch.LinkedListNode< T > addAfterNode (fm.liveswitch.LinkedListNode< T > node, T value)
 Adds an item after a node. More...
 
fm.liveswitch.LinkedListNode< T > addBeforeNode (fm.liveswitch.LinkedListNode< T > node, T value)
 Adds an item before a node. More...
 
fm.liveswitch.LinkedListNode< T > addFirst (T value)
 Adds an item to the beginning of the linked list. More...
 
fm.liveswitch.LinkedListNode< T > addLast (T value)
 Adds an item to the end of the linked list. More...
 
void clear ()
 Clears all nodes from the linked list. More...
 
int getCount ()
 Gets the number of items in this linked list. More...
 
fm.liveswitch.LinkedListEnumerator< T > getEnumerator ()
 Gets the enumerator for this linked list. More...
 
fm.liveswitch.LinkedListNode< T > getFirst ()
 Gets the first node in the linked list. More...
 
fm.liveswitch.LinkedListNode< T > getLast ()
 Gets the last node in the linked list. More...
 
 LinkedList ()
 
boolean remove (T value)
 Removes an item from the linked list. More...
 
boolean removeFirst ()
 Removes the first item in the linked list. More...
 
boolean removeLast ()
 Removes the last item in the linked list. More...
 
boolean removeNode (fm.liveswitch.LinkedListNode< T > node)
 Removes a specific node from the linked list. More...
 
java.util.ArrayList< T > toList ()
 Returns the linked list as a regular list. More...
 

Detailed Description

A linked list.

Constructor & Destructor Documentation

◆ LinkedList()

Member Function Documentation

◆ addAfterNode()

fm.liveswitch.LinkedListNode<T> fm.liveswitch.LinkedList< T >.addAfterNode ( fm.liveswitch.LinkedListNode< T >  node,
value 
)

Adds an item after a node.

Parameters
nodeThe node after which to add the value.
valueThe value.

◆ addBeforeNode()

fm.liveswitch.LinkedListNode<T> fm.liveswitch.LinkedList< T >.addBeforeNode ( fm.liveswitch.LinkedListNode< T >  node,
value 
)

Adds an item before a node.

Parameters
nodeThe node before which to add the value.
valueThe value.

◆ addFirst()

Adds an item to the beginning of the linked list.

Parameters
valueThe value.

◆ addLast()

Adds an item to the end of the linked list.

Parameters
valueThe value.

◆ clear()

void fm.liveswitch.LinkedList< T >.clear ( )

Clears all nodes from the linked list.

◆ getCount()

int fm.liveswitch.LinkedList< T >.getCount ( )

Gets the number of items in this linked list.

◆ getEnumerator()

Gets the enumerator for this linked list.

◆ getFirst()

Gets the first node in the linked list.

◆ getLast()

Gets the last node in the linked list.

◆ remove()

boolean fm.liveswitch.LinkedList< T >.remove ( value)

Removes an item from the linked list.

Parameters
valueThe value.

◆ removeFirst()

boolean fm.liveswitch.LinkedList< T >.removeFirst ( )

Removes the first item in the linked list.

◆ removeLast()

boolean fm.liveswitch.LinkedList< T >.removeLast ( )

Removes the last item in the linked list.

◆ removeNode()

boolean fm.liveswitch.LinkedList< T >.removeNode ( fm.liveswitch.LinkedListNode< T >  node)

Removes a specific node from the linked list.

Parameters
nodeThe node.

◆ toList()

java.util.ArrayList<T> fm.liveswitch.LinkedList< T >.toList ( )

Returns the linked list as a regular list.