public class PointLeftOf extends PointMatcher
point
Constructor and Description |
---|
PointLeftOf(Point2D p)
Creates an object that matches all points that are strictly to the left of
p . |
Modifier and Type | Method and Description |
---|---|
boolean |
matches(Point2D other)
Checks whether or not the given point
other is strictly to the
left of the point held by this object. |
getPoint, setPoint
public PointLeftOf(Point2D p)
p
.p
- all points to the left of p
will be matched by this
matcherpublic boolean matches(Point2D other)
other
is strictly to the
left of the point held by this object. The result is true
if
the x
coordinate of other
is less than the
x
coordinate of the point held by this object, and
false
otherwise.matches
in class PointMatcher
PointMatcher.matches(cse1030.drawing.Point2D)
other
- the point to check for a matchtrue
if other
is strictly to the left of
the point held by this matcher