All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jdsl.core.ref.FastEnumerationNodeSequence

java.lang.Object
   |
   +----jdsl.core.ref.NodeSequence
           |
           +----jdsl.core.ref.FastEnumerationNodeSequence

public class FastEnumerationNodeSequence
extends NodeSequence
This class implements the sequence interface using a double-linked list of nodes. It also serves as a very fast, high quality Enumeration.

See Also:
NodeSequence

Constructor Index

 o FastEnumerationNodeSequence()

Method Index

 o checkPosition(Position)
 o checkRank(int)
 o elements()
Returns an enumeration of the elements in this sequence
 o insertAfter(Position, Object)
Create a new position with the given element and insert it after the given position, returning a reference the new position
 o insertAtRank(int, Object)
Create a new position with the given element and insert it at the given rank.
 o 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
 o insertFirst(Object)
Create a new position with the given element and insert it as the first position in the sequence.
 o insertLast(Object)
Create a new position with the given element and insert it as the last position in the sequence.
 o newContainer()
Make a new container of this type
 o positions()
Returns an enumeration of the positions in this sequence
 o remove(Position)
Remove this position from the sequence
 o removeAfter(Position)
Removes after p
 o removeAtRank(int)
Removes the position at rank i
 o removeBefore(Position)
Removes before p
 o removeFirst()
Removes the first position
 o removeLast()
Removes the last position
 o replace(Position, Object)
Replace the element of the given position with the new element and return the old value of element
 o swap(Position, Position)
Swap elements of two positions

Constructors

 o FastEnumerationNodeSequence
 public FastEnumerationNodeSequence()

Methods

 o 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
 o 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
 o 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
 o 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
 o 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
 o remove
 public Object remove(Position p)
Remove this position from the sequence

Overrides:
remove in class NodeSequence
 o 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
 o swap
 public void swap(Position a,
                  Position b)
Swap elements of two positions

Overrides:
swap in class NodeSequence
 o removeAtRank
 public Object removeAtRank(int i)
Removes the position at rank i

Overrides:
removeAtRank in class NodeSequence
 o removeBefore
 public Object removeBefore(Position p)
Removes before p

Overrides:
removeBefore in class NodeSequence
 o removeAfter
 public Object removeAfter(Position p)
Removes after p

Overrides:
removeAfter in class NodeSequence
 o removeFirst
 public Object removeFirst()
Removes the first position

Overrides:
removeFirst in class NodeSequence
 o removeLast
 public Object removeLast()
Removes the last position

Overrides:
removeLast in class NodeSequence
 o newContainer
 public Container newContainer()
Make a new container of this type

Overrides:
newContainer in class NodeSequence
 o elements
 public Enumeration elements()
Returns an enumeration of the elements in this sequence

Overrides:
elements in class NodeSequence
 o positions
 public Enumeration positions()
Returns an enumeration of the positions in this sequence

Overrides:
positions in class NodeSequence
 o checkPosition
 protected NSNode checkPosition(Position p) throws InvalidPositionException
Overrides:
checkPosition in class NodeSequence
 o checkRank
 protected void checkRank(int rank) throws BoundaryViolationException
Overrides:
checkRank in class NodeSequence

All Packages  Class Hierarchy  This Package  Previous  Next  Index