- Timestamp:
- 2020-01-18T14:13:56+01:00 (5 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java
r15424 r15716 395 395 } 396 396 return new ExtensionFileFilter( 397 Utils.join(",", extensionsPlusArchive),397 String.join(",", extensionsPlusArchive), 398 398 defaultExtension, 399 399 description + (!extensionsForDescription.isEmpty() 400 ? (" (" + Utils.join(", ", extensionsForDescription) + ')')400 ? (" (" + String.join(", ", extensionsForDescription) + ')') 401 401 : "") 402 402 ); -
trunk/src/org/openstreetmap/josm/data/osm/BBox.java
r15486 r15716 3 3 4 4 import java.awt.geom.Rectangle2D; 5 import java.util.Arrays;6 5 import java.util.Objects; 7 6 … … 10 9 import org.openstreetmap.josm.data.coor.LatLon; 11 10 import org.openstreetmap.josm.data.coor.QuadTiling; 12 import org.openstreetmap.josm.tools.Utils;13 11 14 12 /** … … 394 392 */ 395 393 public String toStringCSV(String separator) { 396 return Utils.join(separator, Arrays.asList(394 return String.join(separator, 397 395 LatLon.cDdFormatter.format(xmin), 398 396 LatLon.cDdFormatter.format(ymin), 399 397 LatLon.cDdFormatter.format(xmax), 400 LatLon.cDdFormatter.format(ymax)) );398 LatLon.cDdFormatter.format(ymax)); 401 399 } 402 400 } -
trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java
r15007 r15716 23 23 24 24 import org.openstreetmap.josm.tools.Logging; 25 import org.openstreetmap.josm.tools.Utils;26 25 27 26 /** … … 710 709 } 711 710 } 712 return Utils.join(";", values);711 return String.join(";", values); 713 712 } 714 713 -
trunk/src/org/openstreetmap/josm/data/projection/ProjectionCLI.java
r14436 r15716 21 21 import org.openstreetmap.josm.data.coor.conversion.LatLonParser; 22 22 import org.openstreetmap.josm.tools.OptionParser; 23 import org.openstreetmap.josm.tools.Utils;24 23 25 24 /** … … 71 70 } 72 71 } 73 String fromStr = Utils.join(" ", projParamFrom);74 String toStr = Utils.join(" ", projParamTo);72 String fromStr = String.join(" ", projParamFrom); 73 String toStr = String.join(" ", projParamTo); 75 74 try { 76 75 run(fromStr, toStr, otherPositional); -
trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
r15682 r15716 559 559 } else { 560 560 /* I18N: {0} is the test error message and {1} is an alternative */ 561 return tr("{0}, use {1} instead", getMessage(p), Utils.join(tr(" or "), alternatives));561 return tr("{0}, use {1} instead", getMessage(p), String.join(tr(" or "), alternatives)); 562 562 } 563 563 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDataText.java
r14302 r15716 5 5 import static org.openstreetmap.josm.tools.I18n.trn; 6 6 7 import java.util.Arrays;8 7 import java.util.List; 9 8 … … 26 25 import org.openstreetmap.josm.tools.Geometry; 27 26 import org.openstreetmap.josm.tools.Pair; 28 import org.openstreetmap.josm.tools.Utils;29 27 import org.openstreetmap.josm.tools.date.DateUtils; 30 28 … … 256 254 */ 257 255 private static String toStringCSV(String separator, ILatLon ll) { 258 return Utils.join(separator, Arrays.asList(256 return String.join(separator, 259 257 DecimalDegreesCoordinateFormat.INSTANCE.latToString(ll), 260 258 DecimalDegreesCoordinateFormat.INSTANCE.lonToString(ll) 261 ) );259 ); 262 260 } 263 261 -
trunk/src/org/openstreetmap/josm/gui/dialogs/LatLonDialog.java
r14120 r15716 61 61 62 62 pnl.add(new HtmlPanel( 63 Utils.join("<br/>", Arrays.asList(63 String.join("<br/>", 64 64 tr("Enter the coordinates for the new node."), 65 65 tr("You can separate longitude and latitude with space, comma or semicolon."), … … 67 67 tr("For South and West cardinal directions you can use either negative numbers or S, W characters."), 68 68 tr("Coordinate value can be in one of three formats:") 69 ) )+69 ) + 70 70 Utils.joinAsHtmlUnorderedList(Arrays.asList( 71 71 tr("<i>degrees</i><tt>°</tt>"), … … 73 73 tr("<i>degrees</i><tt>°</tt> <i>minutes</i><tt>'</tt> <i>seconds</i><tt>"</tt>") 74 74 )) + 75 Utils.join("<br/><br/>", Arrays.asList(75 String.join("<br/><br/>", 76 76 tr("Symbols <tt>°</tt>, <tt>'</tt>, <tt>′</tt>, <tt>"</tt>, <tt>″</tt> are optional."), 77 77 tr("You can also use the syntax <tt>lat=\"...\" lon=\"...\"</tt> or <tt>lat=''...'' lon=''...''</tt>."), 78 78 tr("Some examples:") 79 ) )+79 ) + 80 80 "<table><tr><td>" + 81 81 Utils.joinAsHtmlUnorderedList(Arrays.asList( -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java
r15567 r15716 854 854 lines.add(sc.getKeyText() + ' ' + tr("to add first suggestion without closing the dialog")) 855 855 ); 856 final JLabel helpLabel = new JLabel("<html>" + Utils.join("<br>", lines) + "</html>");856 final JLabel helpLabel = new JLabel("<html>" + String.join("<br>", lines) + "</html>"); 857 857 helpLabel.setFont(helpLabel.getFont().deriveFont(Font.PLAIN)); 858 858 contentPane.add(helpLabel, GBC.eol().fill(GridBagConstraints.HORIZONTAL).insets(5, 5, 5, 5)); -
trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
r15456 r15716 324 324 Collection<String> nativeProjections = getNativeProjections(); 325 325 if (nativeProjections != null) { 326 content.add(Arrays.asList(tr("Native projections"), Utils.join(", ", getNativeProjections())));326 content.add(Arrays.asList(tr("Native projections"), String.join(", ", getNativeProjections()))); 327 327 } 328 328 EastNorth offset = getDisplaySettings().getDisplacement(); -
trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java
r14155 r15716 34 34 import org.openstreetmap.josm.tools.CheckParameterUtil; 35 35 import org.openstreetmap.josm.tools.Logging; 36 import org.openstreetmap.josm.tools.Utils;37 36 38 37 /** … … 182 181 Logging.info(tr("Reprojecting layer {0} from {1} to {2}. For best image quality and performance," 183 182 + " switch to one of the supported projections: {3}", 184 getName(), proj.toCode(), ProjectionRegistry.getProjection().toCode(), Utils.join(", ", getNativeProjections())));183 getName(), proj.toCode(), ProjectionRegistry.getProjection().toCode(), String.join(", ", getNativeProjections()))); 185 184 return proj; 186 185 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Functions.java
r15591 r15716 318 318 * @param args arguments. First one is used as separator 319 319 * @return assembled string 320 * @see Utils#join320 * @see String#join 321 321 */ 322 322 @NullableArguments 323 323 public static String join(String... args) { // NO_UCD (unused code) 324 return Utils.join(args[0], Arrays.asList(args).subList(1, args.length));324 return String.join(args[0], Arrays.asList(args).subList(1, args.length)); 325 325 } 326 326 … … 330 330 * @param values collection of objects 331 331 * @return assembled string 332 * @see Utils#join332 * @see String#join 333 333 */ 334 334 public static String join_list(final String separator, final List<String> values) { // NO_UCD (unused code) 335 return Utils.join(separator, values);335 return String.join(separator, values); 336 336 } 337 337 -
trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
r15259 r15716 1111 1111 tr("Ignore warning and install style anyway")); 1112 1112 dlg.setContent("<html>" + tr("Some entries have unmet dependencies:") + 1113 "<br>" + Utils.join("<br>", messages) + "</html>");1113 "<br>" + String.join("<br>", messages) + "</html>"); 1114 1114 dlg.setIcon(JOptionPane.WARNING_MESSAGE); 1115 1115 if (dlg.showDialog().getValue() != 2) -
trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java
r15587 r15716 17 17 import java.lang.reflect.InvocationTargetException; 18 18 import java.util.ArrayList; 19 import java.util.Arrays;20 19 import java.util.Collection; 21 20 import java.util.Collections; … … 65 64 import org.openstreetmap.josm.tools.ImageProvider; 66 65 import org.openstreetmap.josm.tools.Logging; 67 import org.openstreetmap.josm.tools.Utils;68 66 69 67 /** … … 506 504 JCheckBox deleteNotInList = new JCheckBox(tr("Disable all other plugins")); 507 505 508 JLabel helpLabel = new JLabel("<html>" + Utils.join("<br/>", Arrays.asList(506 JLabel helpLabel = new JLabel("<html>" + String.join("<br/>", 509 507 tr("Enter a list of plugins you want to download."), 510 508 tr("You should add one plugin id per line, version information is ignored."), 511 tr("You can copy+paste the list of a status report here.")) )+ "</html>");509 tr("You can copy+paste the list of a status report here.")) + "</html>"); 512 510 513 511 if (JOptionPane.OK_OPTION == JOptionPane.showConfirmDialog(GuiHelper.getFrameForComponent(getTabPane()), … … 559 557 560 558 private boolean confirmIgnoreNotFound(List<String> notFound) { 561 String list = "<ul><li>" + Utils.join("</li><li>", notFound) + "</li></ul>";559 String list = "<ul><li>" + String.join("</li><li>", notFound) + "</li></ul>"; 562 560 String message = "<html>" + tr("The following plugins were not found. Continue anyway?") + list + "</html>"; 563 561 return JOptionPane.showConfirmDialog(GuiHelper.getFrameForComponent(getTabPane()), -
trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java
r14095 r15716 383 383 sb.append('&'); 384 384 } 385 sb.append("changesets=").append( Utils.join(",", changesetIds));385 sb.append("changesets=").append(changesetIds.stream().map(String::valueOf).collect(Collectors.joining(","))); 386 386 } 387 387 return sb.toString(); -
trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java
r13901 r15716 91 91 try { 92 92 cachedFile = new CachedFile(source); 93 cachedFile.setParam( Utils.join(",", ImageryInfo.getActiveIds()));93 cachedFile.setParam(String.join(",", ImageryInfo.getActiveIds())); 94 94 cachedFile.setFastFail(fastFail); 95 95 try (BufferedReader in = cachedFile -
trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java
r15228 r15716 352 352 + "FORMAT=" + format + ((imageFormatHasTransparency(format) && transparent) ? "&TRANSPARENT=TRUE" : "") 353 353 + "&VERSION=" + this.version + "&" + SERVICE_WMS + "&REQUEST=GetMap&LAYERS=" 354 + selectedLayers.stream().collect(Collectors.joining(","))354 + String.join(",", selectedLayers) 355 355 + "&STYLES=" 356 + (selectedStyles != null ? Utils.join(",", selectedStyles) : "")356 + (selectedStyles != null ? String.join(",", selectedStyles) : "") 357 357 + "&" 358 358 + (belowWMS130() ? "SRS" : "CRS") -
trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java
r14384 r15716 145 145 protected String downloadPluginList(String site, final ProgressMonitor monitor) { 146 146 /* replace %<x> with empty string or x=plugins (separated with comma) */ 147 String pl = Utils.join(",", Config.getPref().getList("plugins"));147 String pl = String.join(",", Config.getPref().getList("plugins")); 148 148 String printsite = site.replaceAll("%<(.*)>", ""); 149 if ( pl != null &&!pl.isEmpty()) {149 if (!pl.isEmpty()) { 150 150 site = site.replaceAll("%<(.*)>", "$1"+pl); 151 151 } else { -
trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java
r15590 r15716 489 489 } 490 490 w.append('\n'); 491 w.append("sequence.fallback="); 491 492 String fallback = props.getProperty("sequence.fallback"); 492 493 if (fallback != null) { 493 w.append("sequence.fallback=" + fallback + ',' + Utils.join(",", allCharSubsets) + '\n'); 494 } else { 495 w.append("sequence.fallback=" + Utils.join(",", allCharSubsets) + '\n'); 494 w.append(fallback).append(","); 496 495 } 496 w.append(String.join(",", allCharSubsets)).append("\n"); 497 497 } 498 498 Utils.updateSystemProperty("sun.awt.fontconfig", fontconfigFile.toString()); -
trunk/src/org/openstreetmap/josm/tools/Utils.java
r15646 r15716 904 904 throws IOException, ExecutionException, InterruptedException { 905 905 if (Logging.isDebugEnabled()) { 906 Logging.debug( join(" ", command));906 Logging.debug(String.join(" ", command)); 907 907 } 908 908 Path out = Files.createTempFile("josm_exec_", ".txt"); … … 1119 1119 return null; 1120 1120 } else { 1121 return join("\n", limit(Arrays.asList(s.split("\\n")), maxLines, "..."));1121 return String.join("\n", limit(Arrays.asList(s.split("\\n")), maxLines, "...")); 1122 1122 } 1123 1123 }
Note:
See TracChangeset
for help on using the changeset viewer.