[ 
https://issues.apache.org/jira/browse/GEOMETRY-82?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17004775#comment-17004775
 ] 

Gilles Sadowski commented on GEOMETRY-82:
-----------------------------------------

Not convinced that it would be an improvement: the semantics of {{Region}} is 
not that of {{Predicate}}.  If a {{Predicate}} instance would be useful (for 
using the default methods in the {{Predicate}} interface (?)), {{Region}} could 
provide a  method (actual name TBD):
{code}
public Predicate<Point> pointContainer() {
    (p) -> contains(p);
}
{code}

WDYT?

> Make Region extend Predicate
> ----------------------------
>
>                 Key: GEOMETRY-82
>                 URL: https://issues.apache.org/jira/browse/GEOMETRY-82
>             Project: Apache Commons Geometry
>          Issue Type: Improvement
>            Reporter: Matt Juntunen
>            Priority: Major
>
> The {{Region}} interface has a {{contains(Point)}} method that returns a 
> boolean indicating whether or not a point lies inside or on the boundary of 
> the region. I think this makes it a good candidate for extending the 
> {{Predicate}} interface. There are two options:
> 1. Rename {{contains}} to {{test}}
> 2. Add {{test}} with a default implementation that simply calls {{contains}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to