Changeset 15717 in josm for trunk/src/org/openstreetmap/josm/gui/mappaint
- Timestamp:
- 2020-01-18T14:14:01+01:00 (4 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/mappaint
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
r14201 r15717 7 7 import java.util.Arrays; 8 8 import java.util.Collection; 9 import java.util.HashSet;10 9 import java.util.LinkedList; 11 10 import java.util.List; 12 import java.util.Set;13 11 14 12 import javax.swing.ImageIcon; … … 347 345 return (MapCSSStyleSource) entry; 348 346 } 349 Set<String> mimes = new HashSet<>(Arrays.asList(MapCSSStyleSource.MAPCSS_STYLE_MIME_TYPES.split(", "))); 350 try (CachedFile cf = new CachedFile(entry.url).setHttpAccept(Utils.join(", ", mimes))) { 347 try (CachedFile cf = new CachedFile(entry.url).setHttpAccept(MapCSSStyleSource.MAPCSS_STYLE_MIME_TYPES)) { 351 348 String zipEntryPath = cf.findZipEntryPath("mapcss", "style"); 352 349 if (zipEntryPath != null) { -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Functions.java
r15716 r15717 307 307 * @param args arguments 308 308 * @return assembled string 309 * @see Utils#join309 * @see Collectors#joining 310 310 */ 311 311 @NullableArguments 312 312 public static String concat(Object... args) { // NO_UCD (unused code) 313 return Utils.join("", Arrays.asList(args));313 return Arrays.stream(args).map(String::valueOf).collect(Collectors.joining()); 314 314 } 315 315 -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSRule.java
r12379 r15717 4 4 import java.util.List; 5 5 import java.util.Objects; 6 import java.util.stream.Collectors; 6 7 7 8 import org.openstreetmap.josm.gui.mappaint.Environment; 8 9 import org.openstreetmap.josm.gui.mappaint.StyleSource; 9 import org.openstreetmap.josm.tools.Utils;10 10 11 11 /** … … 109 109 @Override 110 110 public String toString() { 111 return selector + " {\n " + Utils.join("\n ", declaration.instructions) + "\n}"; 111 return selector + declaration.instructions.stream() 112 .map(String::valueOf) 113 .collect(Collectors.joining("\n ", " {\n ", "\n}")); 112 114 } 113 115 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java
r15588 r15717 29 29 import java.util.concurrent.locks.ReadWriteLock; 30 30 import java.util.concurrent.locks.ReentrantReadWriteLock; 31 import java.util.stream.Collectors; 31 32 import java.util.zip.ZipEntry; 32 33 import java.util.zip.ZipFile; … … 811 812 @Override 812 813 public String toString() { 813 return Utils.join("\n", rules);814 return rules.stream().map(MapCSSRule::toString).collect(Collectors.joining("\n")); 814 815 } 815 816 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
r15289 r15717 14 14 import java.util.function.IntSupplier; 15 15 import java.util.regex.PatternSyntaxException; 16 import java.util.stream.Collectors; 16 17 17 18 import org.openstreetmap.josm.data.osm.INode; … … 783 784 @Override 784 785 public String toString() { 785 return base + (Range.ZERO_TO_INFINITY.equals(range) ? "" : range) + (conds != null ? Utils.join("", conds) : "") 786 return base 787 + (Range.ZERO_TO_INFINITY.equals(range) ? "" : range) 788 + (conds != null ? conds.stream().map(String::valueOf).collect(Collectors.joining("")) : "") 786 789 + (subpart != null && subpart != Subpart.DEFAULT_SUBPART ? ("::" + subpart) : ""); 787 790 }
Note:
See TracChangeset
for help on using the changeset viewer.