Shape.Oval, Shape.Polygon, Shape.Rectangle, Shape.RoundRectangle, Shape.ShapeVisitor<A,R>
Constructor and Description |
---|
Polygon(Position[] positions) |
Polygon(Position[] positions,
Position[] attachmentPoints) |
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.
|
Position |
getAttachmentPoint(int i) |
Position[] |
getAttachmentPoints() |
Position |
getPoint(int i) |
Position[] |
getPoints() |
int |
numAttachmentPoints() |
int |
numPoints() |
public Polygon(Position[] positions)
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.public int numPoints()
public Position getPoint(int i)
public Position[] getPoints()
public int numAttachmentPoints()
public Position getAttachmentPoint(int i)
public Position[] getAttachmentPoints()