Changeset 16436 in josm for trunk/src/org/openstreetmap/josm/tools/template_engine/CompoundTemplateEntry.java
- Timestamp:
- 2020-05-17T12:08:17+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/template_engine/CompoundTemplateEntry.java
r14098 r16436 3 3 4 4 import java.util.Arrays; 5 import java.util.stream.Collectors; 5 6 6 7 /** … … 41 42 @Override 42 43 public boolean isValid(TemplateEngineDataProvider dataProvider) { 43 for (TemplateEntry te: entries) { 44 if (!te.isValid(dataProvider)) 45 return false; 46 } 47 return true; 44 return Arrays.stream(entries).allMatch(te -> te.isValid(dataProvider)); 48 45 } 49 46 50 47 @Override 51 48 public String toString() { 52 StringBuilder result = new StringBuilder(); 53 for (TemplateEntry te: entries) { 54 result.append(te); 55 } 56 return result.toString(); 49 return Arrays.stream(entries).map(String::valueOf).collect(Collectors.joining()); 57 50 } 58 51
Note:
See TracChangeset
for help on using the changeset viewer.