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
replaceElement
public Object replaceElement(Position v,
Object e)
- Replace the data at a specified position.
- Parameters:
v
- the position whose data should be replacede
- 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