All Packages Class Hierarchy This Package Previous Next Index
Class jdsl.core.ref.DumbEnumerationNodeSequence
java.lang.Object
|
+----jdsl.core.ref.NodeSequence
|
+----jdsl.core.ref.DumbEnumerationNodeSequence
- public class DumbEnumerationNodeSequence
- extends NodeSequence
This class implements the sequence interface using a double-linked list
of nodes.
- Version:
- Fri Aug 22 17:24:57 1997
- Author:
- Mike Boilen (mgb)
-
DumbEnumerationNodeSequence()
-
-
checkPosition(Position)
-
-
checkRank(int)
-
-
elements()
- Returns an enumeration of the elements in this sequence
-
insertAfter(Position, Object)
- Create a new position with the given element and insert it after the
given position, returning a reference the new position
-
insertAtRank(int, Object)
- Create a new position with the given element and insert it
at the given rank.
-
insertBefore(Position, Object)
- Create a new position with the given element and insert it before the
given position, returning a reference to the new node
-
insertFirst(Object)
- Create a new position with the given element and insert it as the
first position in the sequence.
-
insertLast(Object)
- Create a new position with the given element and insert it as the
last position in the sequence.
-
newContainer()
- Make a new container of this type
-
positions()
- Returns an enumeration of the positions in this sequence
-
remove(Position)
- Remove this position from the sequence
-
removeAfter(Position)
- Removes after p
-
removeAtRank(int)
- Removes the position at rank i
-
removeBefore(Position)
- Removes before p
-
removeFirst()
- Removes the first position
-
removeLast()
- Removes the last position
-
replace(Position, Object)
- Replace the element of the given position with the new element and
return the old value of element
-
swap(Position, Position)
- Swap elements of two positions
DumbEnumerationNodeSequence
public DumbEnumerationNodeSequence()
insertBefore
public Position insertBefore(Position p,
Object element)
- Create a new position with the given element and insert it before the
given position, returning a reference to the new node
- Overrides:
- insertBefore in class NodeSequence
insertAfter
public Position insertAfter(Position p,
Object element)
- Create a new position with the given element and insert it after the
given position, returning a reference the new position
- Overrides:
- insertAfter in class NodeSequence
insertFirst
public Position insertFirst(Object element)
- Create a new position with the given element and insert it as the
first position in the sequence.
- Overrides:
- insertFirst in class NodeSequence
insertLast
public Position insertLast(Object element)
- Create a new position with the given element and insert it as the
last position in the sequence.
- Overrides:
- insertLast in class NodeSequence
insertAtRank
public Position insertAtRank(int rank,
Object element)
- Create a new position with the given element and insert it
at the given rank.
- Overrides:
- insertAtRank in class NodeSequence
remove
public Object remove(Position p)
- Remove this position from the sequence
- Overrides:
- remove in class NodeSequence
replace
public Object replace(Position p,
Object element)
- Replace the element of the given position with the new element and
return the old value of element
- Overrides:
- replace in class NodeSequence
swap
public void swap(Position a,
Position b)
- Swap elements of two positions
- Overrides:
- swap in class NodeSequence
removeAtRank
public Object removeAtRank(int i)
- Removes the position at rank i
- Overrides:
- removeAtRank in class NodeSequence
removeBefore
public Object removeBefore(Position p)
- Removes before p
- Overrides:
- removeBefore in class NodeSequence
removeAfter
public Object removeAfter(Position p)
- Removes after p
- Overrides:
- removeAfter in class NodeSequence
removeFirst
public Object removeFirst()
- Removes the first position
- Overrides:
- removeFirst in class NodeSequence
removeLast
public Object removeLast()
- Removes the last position
- Overrides:
- removeLast in class NodeSequence
newContainer
public Container newContainer()
- Make a new container of this type
- Overrides:
- newContainer in class NodeSequence
elements
public Enumeration elements()
- Returns an enumeration of the elements in this sequence
- Overrides:
- elements in class NodeSequence
positions
public Enumeration positions()
- Returns an enumeration of the positions in this sequence
- Overrides:
- positions in class NodeSequence
checkPosition
protected NSNode checkPosition(Position p) throws InvalidPositionException
- Overrides:
- checkPosition in class NodeSequence
checkRank
protected void checkRank(int rank) throws BoundaryViolationException
- Overrides:
- checkRank in class NodeSequence
All Packages Class Hierarchy This Package Previous Next Index