public static class Shape.Rectangle extends java.lang.Object implements Shape
Shape.Oval, Shape.Polygon, Shape.Rectangle, Shape.RoundRectangle, Shape.ShapeVisitor<A,R>
Constructor and Description |
---|
Rectangle() |
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.
|
public <A,R> R accept(Shape.ShapeVisitor<A,R> visitor, A arg)
Shape
accept
in interface Shape
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.