Changeset 10715 in josm for trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss
- Timestamp:
- 2016-08-03T15:01:43+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java
r10674 r10715 28 28 import org.openstreetmap.josm.gui.mappaint.Environment; 29 29 import org.openstreetmap.josm.tools.CheckParameterUtil; 30 import org.openstreetmap.josm.tools.Predicates;31 30 import org.openstreetmap.josm.tools.Utils; 32 31 … … 513 512 this.matchType = matchType == null ? KeyMatchType.EQ : matchType; 514 513 this.containsPattern = KeyMatchType.REGEX.equals(matchType) 515 ? P redicates.stringContainsPattern(Pattern.compile(label))514 ? Pattern.compile(label).asPredicate() 516 515 : null; 517 516 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
r10691 r10715 16 16 import java.util.Collections; 17 17 import java.util.List; 18 import java.util.Objects; 18 19 import java.util.TreeSet; 19 20 import java.util.function.Function; … … 37 38 import org.openstreetmap.josm.tools.ColorHelper; 38 39 import org.openstreetmap.josm.tools.Geometry; 39 import org.openstreetmap.josm.tools.Predicates;40 40 import org.openstreetmap.josm.tools.RightAndLefthandTraffic; 41 41 import org.openstreetmap.josm.tools.SubclassFilteredCollection; … … 1135 1135 public Float aggregateList(List<?> lst) { 1136 1136 final List<Float> floats = Utils.transform(lst, (Function<Object, Float>) x -> Cascade.convertTo(x, float.class)); 1137 final Collection<Float> nonNullList = SubclassFilteredCollection.filter(floats, Predicates.<Float>isNull().negate());1137 final Collection<Float> nonNullList = SubclassFilteredCollection.filter(floats, Objects::nonNull); 1138 1138 return nonNullList.isEmpty() ? (Float) Float.NaN : computeMax ? Collections.max(nonNullList) : Collections.min(nonNullList); 1139 1139 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
r10674 r10715 24 24 import org.openstreetmap.josm.tools.Geometry; 25 25 import org.openstreetmap.josm.tools.Pair; 26 import org.openstreetmap.josm.tools.Predicates;27 26 import org.openstreetmap.josm.tools.SubclassFilteredCollection; 28 27 import org.openstreetmap.josm.tools.Utils; … … 322 321 } 323 322 final Collection<Relation> multipolygons = Utils.filteredCollection(SubclassFilteredCollection.filter( 324 e.osm.getReferrers(), Predicates.hasTag("type", "multipolygon")), Relation.class);323 e.osm.getReferrers(), p -> p.hasTag("type", "multipolygon")), Relation.class); 325 324 final Relation multipolygon = multipolygons.iterator().next(); 326 325 if (multipolygon == null) throw new NoSuchElementException();
Note:
See TracChangeset
for help on using the changeset viewer.