Ignore:
Timestamp:
2016-07-27T02:16:37+02:00 (3 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/actions/search/SearchAction.java

    r10601 r10658  
    2626import java.util.Objects;
    2727import java.util.Set;
     28import java.util.function.Predicate;
    2829
    2930import javax.swing.ButtonGroup;
     
    5455import org.openstreetmap.josm.gui.widgets.HistoryComboBox;
    5556import org.openstreetmap.josm.tools.GBC;
    56 import org.openstreetmap.josm.tools.Predicate;
    5757import org.openstreetmap.josm.tools.Shortcut;
    5858import org.openstreetmap.josm.tools.Utils;
     
    689689                            ++foundMatches;
    690690                        }
    691                     } else if (setting.mode == SearchMode.add && !predicate.evaluate(osm) && matcher.match(osm)) {
     691                    } else if (setting.mode == SearchMode.add && !predicate.test(osm) && matcher.match(osm)) {
    692692                        selection.add(osm);
    693693                        ++foundMatches;
    694                     } else if (setting.mode == SearchMode.remove && predicate.evaluate(osm) && matcher.match(osm)) {
     694                    } else if (setting.mode == SearchMode.remove && predicate.test(osm) && matcher.match(osm)) {
    695695                        selection.remove(osm);
    696696                        ++foundMatches;
    697                     } else if (setting.mode == SearchMode.in_selection && predicate.evaluate(osm) && !matcher.match(osm)) {
     697                    } else if (setting.mode == SearchMode.in_selection && predicate.test(osm) && !matcher.match(osm)) {
    698698                        selection.remove(osm);
    699699                        --foundMatches;
Note: See TracChangeset for help on using the changeset viewer.