classes.container
Class ShapeContainerContext
java.lang.Object
classes.container.ShapeContainerContext
public class ShapeContainerContext
- extends java.lang.Object
Performs the operations based on the state of the container
- Version:
- 1.0, 22-Mar-07
- Author:
- Prathab, Mukesh
Method Summary |
boolean |
addShape(IShape shape)
Adds the given shape to the container based on the state of the coantiner. |
boolean |
removeShape(IShape shape)
Removes the given shape from the container based on the state of the coantiner. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
shapeContainer
public ShapeContainer shapeContainer
shapeContainerState
public IShapeContainerState shapeContainerState
shapeObjectsCount
public int shapeObjectsCount
ShapeContainerContext
public ShapeContainerContext(ShapeContainer shapeContainer,
IShapeContainerState shapeContainerState)
- Initialize with the container and current state object
- Parameters:
shapeContainer
- shape container on which operations are performedshapeContainerState
- current state of the shape container
addShape
public boolean addShape(IShape shape)
- Adds the given shape to the container based on the state of the coantiner.
- Parameters:
shape
- the shape to be added
removeShape
public boolean removeShape(IShape shape)
- Removes the given shape from the container based on the state of the coantiner.
- Parameters:
shape
- the shape to be removed