Naanou.Common
Class LinkedList

LinkedList implementation

Field Summary
Naanou.Common.LinkedList.LinkedListNode root
int size
Naanou.Common.LinkedList.LinkedListNode tail

Constructor Summary
LinkedList()
         Constructor

Method Summary
void AddEnd(object data)
void AddFront(object data)
         Adds an item
void Remove(object data)
         Removes an item
void RemoveAtNode(Naanou.Common.LinkedList.LinkedListNode node, object data)
         Removes a item from a certain node
object[] ToArray()
         Converts list to an array

Methods inherited from class System.Object
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString


Field Detail

root

protected Naanou.Common.LinkedList.LinkedListNode root


size

protected int size


tail

protected Naanou.Common.LinkedList.LinkedListNode tail

Constructor Detail

LinkedList

public LinkedList()

Constructor

Method Detail

AddEnd

public void AddEnd(object data)


AddFront

public void AddFront(object data)

Adds an item

Parameters:
data - Item to add

Remove

public void Remove(object data)

Removes an item

Parameters:
data - Item to remove

RemoveAtNode

private void RemoveAtNode(Naanou.Common.LinkedList.LinkedListNode node,
                          object data)

Removes a item from a certain node

Parameters:
node - Node
data - Item

ToArray

public object[] ToArray()

Converts list to an array

Returns:
Returns array representation