All Packages Class Hierarchy This Package Previous Next Index
Class jdsl.simple.ref.NodeRankedSequence
java.lang.Object
|
+----jdsl.simple.ref.MyDeque
|
+----jdsl.simple.ref.NodeRankedSequence
- public class NodeRankedSequence
- extends MyDeque
- implements Deque, RankedSequence
This is the implementation of the RankedSequence interface by
means of a doubly-linked list. Note that this class extends class
Deque and uses class DLNode, which is the node that stores the
previos and next nodes in the list, and a reference to its
element.
-
NodeRankedSequence()
-
-
elemAtRank(int)
-
-
insertElemAtRank(int, Object)
-
-
removeElemAtRank(int)
-
-
replaceElemAtRank(int, Object)
-
NodeRankedSequence
public NodeRankedSequence()
elemAtRank
public Object elemAtRank(int rank)
replaceElemAtRank
public Object replaceElemAtRank(int rank,
Object newElement) throws BoundaryViolationException
insertElemAtRank
public void insertElemAtRank(int rank,
Object element) throws BoundaryViolationException
removeElemAtRank
public Object removeElemAtRank(int rank) throws BoundaryViolationException
All Packages Class Hierarchy This Package Previous Next Index