Ignore:
Timestamp:
2016-07-27T02:16:37+02:00 (5 years ago)
Author:
Don-vip
Message:

see #11390, see #12890 - use Java 8 Predicates (forgot some)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/Geometry.java

    r10656 r10658  
    888888     * @return {@code true} if the node is inside the multipolygon
    889889     */
    890     public static boolean isNodeInsideMultiPolygon(Node node, Relation multiPolygon, Predicate<Way> isOuterWayAMatch) {
     890    public static boolean isNodeInsideMultiPolygon(Node node, Relation multiPolygon, java.util.function.Predicate<Way> isOuterWayAMatch) {
    891891        return isPolygonInsideMultiPolygon(Collections.singletonList(node), multiPolygon, isOuterWayAMatch);
    892892    }
     
    902902     * @return {@code true} if the polygon formed by nodes is inside the multipolygon
    903903     */
    904     public static boolean isPolygonInsideMultiPolygon(List<Node> nodes, Relation multiPolygon, Predicate<Way> isOuterWayAMatch) {
     904    public static boolean isPolygonInsideMultiPolygon(List<Node> nodes, Relation multiPolygon,
     905            java.util.function.Predicate<Way> isOuterWayAMatch) {
    905906        // Extract outer/inner members from multipolygon
    906907        final MultiPolygonMembers mpm = new MultiPolygonMembers(multiPolygon);
     
    936937                if (!insideInner) {
    937938                    // Final check using predicate
    938                     if (isOuterWayAMatch == null || isOuterWayAMatch.evaluate(out.ways.get(0)
     939                    if (isOuterWayAMatch == null || isOuterWayAMatch.test(out.ways.get(0)
    939940                            /* TODO give a better representation of the outer ring to the predicate */)) {
    940941                        return true;
Note: See TracChangeset for help on using the changeset viewer.