Interface PositionalContainer

All Superinterfaces:
InspectableContainer, InspectablePositionalContainer
All Known Subinterfaces:
Tree

public interface PositionalContainer
extends InspectablePositionalContainer

A PositionalContainer that allows elements to be swapped and replaced.

Author:
Goodrich & Tamassia

Method Summary
 Object replaceElement(Position v, Object e)
          Replace the data at a specified position.
 void swapElements(Position v, Position w)
          Swap the data at two positions.
 
Methods inherited from interface InspectablePositionalContainer
positions
 
Methods inherited from interface InspectableContainer
elements, isEmpty, size
 

Method Detail

replaceElement

public Object replaceElement(Position v,
                             Object e)
Replace the data at a specified position.
Parameters:
v - the position whose data should be replaced
e - the new contents of that position.
Returns:
the old contents of that position

swapElements

public void swapElements(Position v,
                         Position w)
Swap the data at two positions.
Parameters:
v,w - the two positions in the container whose data should be swapped.


Generated by BlueJ