Ignore:
Timestamp:
2016-11-23T23:39:40+01:00 (3 years ago)
Author:
simon04
Message:

Replace TestError#getSelectablePrimitives by Java 8 stream usage

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/TestError.java

    r11235 r11298  
    33
    44import java.text.MessageFormat;
    5 import java.util.ArrayList;
    65import java.util.Arrays;
    76import java.util.Collection;
     
    381380
    382381    /**
    383      * Gets the list of primitives affected by this error and are selectable
    384      * @return the list of selectable primitives affected by this error
    385      */
    386     public Collection<? extends OsmPrimitive> getSelectablePrimitives() {
    387         List<OsmPrimitive> selectablePrimitives = new ArrayList<>(primitives.size());
    388         for (OsmPrimitive o : primitives) {
    389             if (o.isSelectable()) {
    390                 selectablePrimitives.add(o);
    391             }
    392         }
    393         return selectablePrimitives;
    394     }
    395 
    396     /**
    397382     * Sets the list of primitives affected by this error
    398383     * @param primitives the list of primitives affected by this error*
Note: See TracChangeset for help on using the changeset viewer.