- Timestamp:
- 2020-02-23T00:29:49+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
r15275 r15907 182 182 @Override 183 183 public Object evaluate(Environment env) { 184 for (Expression arg : args) { 185 Boolean b = Cascade.convertTo(arg.evaluate(env), boolean.class); 186 if (b == null || !b) { 187 return Boolean.FALSE; 188 } 189 } 190 return Boolean.TRUE; 184 return args.stream() 185 .map(arg -> Cascade.convertTo(arg.evaluate(env), boolean.class)) 186 .allMatch(Boolean.TRUE::equals); 191 187 } 192 188 } … … 209 205 @Override 210 206 public Object evaluate(Environment env) { 211 for (Expression arg : args) { 212 Boolean b = Cascade.convertTo(arg.evaluate(env), boolean.class); 213 if (b != null && b) { 214 return Boolean.TRUE; 215 } 216 } 217 return Boolean.FALSE; 207 return args.stream() 208 .map(arg -> Cascade.convertTo(arg.evaluate(env), boolean.class)) 209 .anyMatch(Boolean.TRUE::equals); 218 210 } 219 211 }
Note:
See TracChangeset
for help on using the changeset viewer.