java.lang.Object
org.jgrapht.demo.KnightTour.DoublyLinkedList<E>
- Type Parameters:
E- type of a value storing in a node.
- Enclosing class:
KnightTour
Implementation of a doubly linked list data structure that is being used for storing a tour.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds element to the end of the list.voidclear()getHead()intgetSize()getTail()booleanisEmpty()voidremove()Removes tail element.voidsetSize(int i) voidsetStartNode(KnightTour.Node<E> startNode)
-
Constructor Details
-
DoublyLinkedList
public DoublyLinkedList()
-
-
Method Details
-
getSize
public int getSize() -
isEmpty
public boolean isEmpty() -
add
Adds element to the end of the list.- Parameters:
element- we want to add.
-
remove
public void remove()Removes tail element. -
getHead
-
getTail
-
clear
public void clear() -
setStartNode
-
getStartNode
-
setSize
public void setSize(int i)
-