Ignore:
Timestamp:
2016-07-27T02:08:34+02:00 (4 years ago)
Author:
Don-vip
Message:

see #11390, see #12890 - use Java 8 Predicates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java

    r10378 r10657  
    1212import java.util.Set;
    1313import java.util.concurrent.CopyOnWriteArrayList;
     14import java.util.function.Predicate;
    1415
    1516import org.openstreetmap.josm.data.osm.Node;
     
    1819import org.openstreetmap.josm.data.osm.Way;
    1920import org.openstreetmap.josm.tools.CheckParameterUtil;
    20 import org.openstreetmap.josm.tools.Predicate;
    21 import org.openstreetmap.josm.tools.Utils;
     21import org.openstreetmap.josm.tools.SubclassFilteredCollection;
    2222
    2323/**
     
    5252
    5353        @Override
    54         public boolean evaluate(Conflict<? extends OsmPrimitive> conflict) {
     54        public boolean test(Conflict<? extends OsmPrimitive> conflict) {
    5555            return conflict != null && c.isInstance(conflict.getMy());
    5656        }
     
    364364     */
    365365    public final Collection<Conflict<? extends OsmPrimitive>> getNodeConflicts() {
    366         return Utils.filter(conflicts, NODE_FILTER_PREDICATE);
     366        return SubclassFilteredCollection.filter(conflicts, NODE_FILTER_PREDICATE);
    367367    }
    368368
     
    373373     */
    374374    public final Collection<Conflict<? extends OsmPrimitive>> getWayConflicts() {
    375         return Utils.filter(conflicts, WAY_FILTER_PREDICATE);
     375        return SubclassFilteredCollection.filter(conflicts, WAY_FILTER_PREDICATE);
    376376    }
    377377
     
    382382     */
    383383    public final Collection<Conflict<? extends OsmPrimitive>> getRelationConflicts() {
    384         return Utils.filter(conflicts, RELATION_FILTER_PREDICATE);
     384        return SubclassFilteredCollection.filter(conflicts, RELATION_FILTER_PREDICATE);
    385385    }
    386386
     
    396396        ConflictCollection conflicts1 = (ConflictCollection) obj;
    397397        return Objects.equals(conflicts, conflicts1.conflicts) &&
    398                 Objects.equals(listeners, conflicts1.listeners);
     398               Objects.equals(listeners, conflicts1.listeners);
    399399    }
    400400}
Note: See TracChangeset for help on using the changeset viewer.