public interface Shape
| Modifier and Type | Interface and Description |
|---|---|
static class |
Shape.Oval
An oval simply represents any oval shape.
|
static class |
Shape.Polygon |
static class |
Shape.Rectangle
A rectangle simply represents any rectangular shape.
|
static class |
Shape.RoundRectangle
A round rectangle simply represents any rectangular shape with rounded corners.
|
static interface |
Shape.ShapeVisitor<A,R> |
| Modifier and Type | Method and Description |
|---|---|
<A,R> R |
accept(Shape.ShapeVisitor<A,R> visitor,
A arg)
Accept the given shape visitor and invoke the visitor's visitX method corresponding to the dynamic type of the
Shape.
|
<A,R> R accept(Shape.ShapeVisitor<A,R> visitor, A arg)
A - The type of argument needed by the shape visitor.R - The return type given by the shape visitor.visitor - The shape visitor to accept.arg - The argument to be passed to the shape visitor.