public DoubleArraySeq(int initial capacity)
{
//implementation
}
This constructor initializes an empty sequence with a specified initial capacity.
public void addBefore(int element)
{
//implementation
}
This method adds a new element to the sequence, before the current element. If the capacity of the sequence exceeds the current capacity, then the capacity is increased before adding the element.
public void advance()
{
//implementation
}
This method moves the current element to the next element in the sequence. If the end of the sequence is reached, then there is no longer any current element.
public void ensureCapacity(int minimumCapacity)
{
//implementation
}
If the capacity of the sequence is less than initialCapacity, then the capacity is increased to initialCapacity.
public int getCapacity()
{
//implementation
}
This is an accessor method that returns the current capacity of the sequence.
public double getCurrent()
{
//implementation
}
This accessor method returns the current element in the sequence.
public boolean isCurrent()
{
//implementation
}
This method returns true if the sequence has a current element that can be determined with the getCurrent() method.
public int size()
{
//implementation
}
This method determines the number of elements in the sequence.
public void start()
{
//implementation
}
This method sets the current element to the first element in the sequence.
public void display()
{
//implementation
}
This method displays all the elements in the sequence.