All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----jdsl.core.ref.VCSVectorCircularSequence
initialCapacity
.
initialCapacity
.
Position
after a given Position
in
this CircularSequence
.
Position
before a given Position
in
this CircularSequence
Enumeration
of all the elements stored in this
container.
CircularSequence
.
CircularNodeSequence
.
CircularNodeSequence
after a given
position.
CircularSequence,
repairs this CircularSequence,
and makes a new
CircularSequence
with the snipped-out nodes.
Position
in this
CircularSequence
.
public VCSVectorCircularSequence()
public VCSVectorCircularSequence(int initialCapacity)
initialCapacity
.
public VCSVectorCircularSequence(int initialCapacity, int capacityIncrement)
initialCapacity
. Every time the Vector resizes, it
increases by capicityIncrement
.
public Position before(Position successor) throws InvalidPositionException
Position
before a given Position
in
this CircularSequence
Position
in this
Sequence
.
Position
before successor
.
Position
is
invalid, from a different container, or null
.
public Position after(Position predecessor) throws InvalidPositionException
Position
after a given Position
in
this CircularSequence
.
Position
in this
Sequence
.
Position
before predecessor
.
Position
is
invalid, from a different container, or null
.
public Position startingPosition() throws EmptyContainerException
Position
in this
CircularSequence
. Note:There is no guarantee what
position this method returns, nor is there any guarantee that it remains
static.
Position
in this container.
public Position insertBefore(Position p, Object element) throws InvalidPositionException
Position
to insert before.
Position
holding the new element.
Position
is
invalid, from a different container, or null
.
public Position insertAfter(Position p, Object element) throws InvalidPositionException
Position
to insert after.
Position
holding the new element.
Position
is
invalid, from a different container, or null
.
public Position insertInitial(Object element)
CircularSequence
. The
counterpart to startingPosition: intended for use only in an empty
circular sequence, where there is no position before or after which you
can insert.
Object
Position
of the object inserted
public Object remove(Position p) throws EmptyContainerException, InvalidPositionException
Position
of the element after the element to
be removed.
p
is
null
or not in this CircularSequence
public CircularSequence split(Position inNewA, Position inNewB) throws EmptyContainerException, InvalidPositionException
CircularSequence,
repairs this CircularSequence,
and makes a new
CircularSequence
with the snipped-out nodes. If
inNewA==inNewB,
only that one Position is removed from this
CircularSequence.
@param inNewA Start of sequence of
Positions
to be removed from this
CircularSequence
. This method takes constant time.
Positions
to be
removed from.
Positions
to be removed from
this CircularSequence
.
CircularSequence
holding inNewA,
inNewB,
and all the Positions
between them
inNewA
or
inNewB
is null
, from a different container, or
of an incompatible type.
public void splice(Position afterWhich, CircularSequence toMerge, Position newSuccessor)
CircularNodeSequence
after a given
position. That is, this CircularNodeSequence
is snipped
after a given Position,
and the merged-in
CircularSequence
is snipped before a given Position.
toMerge
will be invalidated
after this method returns. This method takes constant time.
Position
after which to break this
CircularSequence
CircularSequence
to be spliced into this one
Position
from toMerge that will follow
Position
afterWhich from this CircularSequence
.
toMerge is invalid or of an incompatible type.
- Throws: InvalidArgumentException
- if
toMerge
is the same
container as splice
is called on.
- Throws: InvalidPositionException
- if
afterWhich
or
newSuccessor
is either null, or of the wrong type.
- See Also:
- size
public Enumeration positions()
Enumeration
of all positions in this container.
public Object replace(Position p, Object newElement) throws InvalidPositionException
null
.
public void swap(Position a, Position b) throws InvalidPositionException
Positions
does not belong to this implementation of
Container,
or if either Position
is
null.
public int size() throws InvalidContainerException
public boolean isEmpty()
true
if this container is empty, false
otherwise.
public Container newContainer()
CircularNodeSequence
.
public Enumeration elements()
Enumeration
of all the elements stored in this
container. Duplicated elements appear as many times as they are in the
container. Elements are returned in the order they are inserted.
Enumeration
of all elements in the container.
All Packages Class Hierarchy This Package Previous Next Index