- All Known Implementing Classes:
Circle2D,Line2D,Polygon2D,Rectangle2D
public interface Shape2D
Simple 2D shape interface.
- Author:
- Ronald Brill
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleConstant used for comparing doubles. -
Method Summary
-
Field Details
-
EPSILON
static final double EPSILONConstant used for comparing doubles.- See Also:
-
-
Method Details
-
contains
boolean contains(double x, double y) Returns whether the specified point lies inside this shape.- Parameters:
x- the x coordinate of the point to testy- the y coordinate of the point to test- Returns:
trueif the point is inside this shape;falseotherwise
-
isEmpty
boolean isEmpty()Returns whether this shape is empty.- Returns:
trueif this shape is empty;falseotherwise
-