Changeset 10680 in josm
- Timestamp:
- 2016-07-30T16:27:16+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 36 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/SequenceCommand.java
r10452 r10680 117 117 } 118 118 119 protected final void setSequence(Command []sequence) {119 protected final void setSequence(Command ... sequence) { 120 120 this.sequence = Utils.copyArray(sequence); 121 121 } -
trunk/src/org/openstreetmap/josm/data/Bounds.java
r9371 r10680 150 150 } 151 151 152 public Bounds(double []coords) {152 public Bounds(double ... coords) { 153 153 this(coords, true); 154 154 } -
trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java
r10634 r10680 361 361 * over all routes 362 362 */ 363 public Iterable<Collection<WayPoint>> getLinesIterable(final boolean []trackVisibility) {363 public Iterable<Collection<WayPoint>> getLinesIterable(final boolean ... trackVisibility) { 364 364 return () -> new LinesIterator(this, trackVisibility); 365 365 } … … 414 414 * included in the iteration. Can be null, then all tracks are included. 415 415 */ 416 public LinesIterator(GpxData data, boolean []trackVisibility) {416 public LinesIterator(GpxData data, boolean ... trackVisibility) { 417 417 itTracks = data.tracks.iterator(); 418 418 idxTracks = -1; -
trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java
r10608 r10680 601 601 * @throws XMLStreamException See {@link XMLStreamReader} 602 602 */ 603 private static boolean moveReaderToTag(XMLStreamReader reader, QName []tags) throws XMLStreamException {603 private static boolean moveReaderToTag(XMLStreamReader reader, QName ... tags) throws XMLStreamException { 604 604 QName stopTag = reader.getName(); 605 605 int currentLevel = 0; -
trunk/src/org/openstreetmap/josm/data/osm/TagMap.java
r10604 r10680 48 48 * @param tags The tags array. It is never changed but should also not be changed by you. 49 49 */ 50 TagEntryInterator(String []tags) {50 TagEntryInterator(String ... tags) { 51 51 super(); 52 52 this.tags = tags; … … 87 87 * @param tags The tags array. It is never changed but should also not be changed by you. 88 88 */ 89 TagEntrySet(String []tags) {89 TagEntrySet(String ... tags) { 90 90 super(); 91 91 this.tags = tags; … … 140 140 * @param tags The tags array. It is not modified by this map. 141 141 */ 142 public TagMap(String []tags) {142 public TagMap(String ... tags) { 143 143 if (tags == null || tags.length == 0) { 144 144 this.tags = EMPTY_TAGS; -
trunk/src/org/openstreetmap/josm/data/projection/Ellipsoid.java
r10033 r10680 322 322 * @return The corresponding latitude and longitude in degrees 323 323 */ 324 public LatLon cart2LatLon(double []xyz) {324 public LatLon cart2LatLon(double ... xyz) { 325 325 return cart2LatLon(xyz, 1e-11); 326 326 } -
trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFile.java
r10305 r10680 167 167 * @return an array of top level Sub Grids with lower level Sub Grids set. 168 168 */ 169 private static NTV2SubGrid[] createSubGridTree(NTV2SubGrid []subGrid) {169 private static NTV2SubGrid[] createSubGridTree(NTV2SubGrid ... subGrid) { 170 170 int topLevelCount = 0; 171 171 Map<String, List<NTV2SubGrid>> subGridMap = new HashMap<>(); -
trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2SubGrid.java
r10305 r10680 281 281 * @param subGrid subgrids 282 282 */ 283 public void setSubGridArray(NTV2SubGrid []subGrid) {283 public void setSubGridArray(NTV2SubGrid ... subGrid) { 284 284 this.subGrid = Utils.copyArray(subGrid); 285 285 } -
trunk/src/org/openstreetmap/josm/data/validation/routines/DomainValidator.java
r10679 r10680 1831 1831 * @since 1.5.0 1832 1832 */ 1833 public static synchronized void updateTLDOverride(ArrayType table, String []tlds) {1833 public static synchronized void updateTLDOverride(ArrayType table, String ... tlds) { 1834 1834 if (inUse) { 1835 1835 throw new IllegalStateException("Can only invoke this method before calling getInstance"); -
trunk/src/org/openstreetmap/josm/data/validation/routines/RegexValidator.java
r10378 r10680 102 102 * validate against 103 103 */ 104 public RegexValidator(String []regexs) {104 public RegexValidator(String ... regexs) { 105 105 this(regexs, true); 106 106 } -
trunk/src/org/openstreetmap/josm/data/validation/routines/UrlValidator.java
r10420 r10680 218 218 * ignore the contents of schemes. 219 219 */ 220 public UrlValidator(String []schemes) {220 public UrlValidator(String ... schemes) { 221 221 this(schemes, 0L); 222 222 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/ConditionalKeys.java
r10678 r10680 79 79 } 80 80 81 private static boolean isKeyValid3Parts(String []parts) {81 private static boolean isKeyValid3Parts(String ... parts) { 82 82 return parts.length == 3 && isRestrictionType(parts[0]) && isTransportationMode(parts[1]) && isDirection(parts[2]); 83 83 } 84 84 85 private static boolean isKeyValid2Parts(String []parts) {85 private static boolean isKeyValid2Parts(String ... parts) { 86 86 return parts.length == 2 && ((isRestrictionType(parts[0]) && (isTransportationMode(parts[1]) || isDirection(parts[1]))) 87 87 || (isTransportationMode(parts[0]) && isDirection(parts[1]))); 88 88 } 89 89 90 private static boolean isKeyValid1Part(String []parts) {90 private static boolean isKeyValid1Part(String ... parts) { 91 91 return parts.length == 1 && (isRestrictionType(parts[0]) || isTransportationMode(parts[0])); 92 92 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/SimilarNamedWays.java
r10600 r10680 251 251 private final String replacement; 252 252 253 public SynonymRule(String replacement, String []words) {253 public SynonymRule(String replacement, String ... words) { 254 254 this.replacement = replacement.toLowerCase(Locale.ENGLISH); 255 255 this.words = words; -
trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java
r10649 r10680 131 131 * @param buttonTexts String Array of the text that will appear on the buttons. The first button is the default one. 132 132 */ 133 public ExtendedDialog(Component parent, String title, String []buttonTexts) {133 public ExtendedDialog(Component parent, String title, String ... buttonTexts) { 134 134 this(parent, title, buttonTexts, true, true); 135 135 } … … 170 170 * @return {@code this} 171 171 */ 172 public ExtendedDialog setButtonIcons(Icon []buttonIcons) {172 public ExtendedDialog setButtonIcons(Icon ... buttonIcons) { 173 173 this.bIcons = Utils.copyArray(buttonIcons); 174 174 return this; … … 180 180 * @return {@code this} 181 181 */ 182 public ExtendedDialog setButtonIcons(String []buttonIcons) {182 public ExtendedDialog setButtonIcons(String ... buttonIcons) { 183 183 bIcons = new Icon[buttonIcons.length]; 184 184 for (int i = 0; i < buttonIcons.length; ++i) { … … 195 195 * @return {@code this} 196 196 */ 197 public ExtendedDialog setToolTipTexts(String []toolTipTexts) {197 public ExtendedDialog setToolTipTexts(String ... toolTipTexts) { 198 198 this.bToolTipTexts = Utils.copyArray(toolTipTexts); 199 199 return this; -
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r10645 r10680 242 242 * @return command-line argument map 243 243 */ 244 public static Map<Option, Collection<String>> buildCommandLineArgumentMap(String []args) {244 public static Map<Option, Collection<String>> buildCommandLineArgumentMap(String ... args) { 245 245 246 246 List<LongOpt> los = new ArrayList<>(); -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/ComparePairType.java
r10378 r10680 33 33 private ListRole[] participatingRoles; 34 34 35 ComparePairType(String displayName, ListRole []participatingRoles) {35 ComparePairType(String displayName, ListRole ... participatingRoles) { 36 36 this.displayName = displayName; 37 37 this.participatingRoles = Utils.copyArray(participatingRoles); -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java
r10378 r10680 273 273 } 274 274 275 protected void copyToTop(ListRole role, int []rows) {275 protected void copyToTop(ListRole role, int ... rows) { 276 276 copy(role, rows, 0); 277 277 mergedEntriesSelectionModel.setSelectionInterval(0, rows.length -1); … … 285 285 * @param rows the indices 286 286 */ 287 public void copyMyToTop(int []rows) {287 public void copyMyToTop(int ... rows) { 288 288 copyToTop(MY_ENTRIES, rows); 289 289 } … … 296 296 * @param rows the indices 297 297 */ 298 public void copyTheirToTop(int []rows) {298 public void copyTheirToTop(int ... rows) { 299 299 copyToTop(THEIR_ENTRIES, rows); 300 300 } … … 309 309 */ 310 310 311 public void copyToEnd(ListRole source, int []rows) {311 public void copyToEnd(ListRole source, int ... rows) { 312 312 copy(source, rows, getMergedEntriesSize()); 313 313 mergedEntriesSelectionModel.setSelectionInterval(getMergedEntriesSize()-rows.length, getMergedEntriesSize() -1); … … 322 322 * @param rows the indices 323 323 */ 324 public void copyMyToEnd(int []rows) {324 public void copyMyToEnd(int ... rows) { 325 325 copyToEnd(MY_ENTRIES, rows); 326 326 } … … 333 333 * @param rows the indices 334 334 */ 335 public void copyTheirToEnd(int []rows) {335 public void copyTheirToEnd(int ... rows) { 336 336 copyToEnd(THEIR_ENTRIES, rows); 337 337 } … … 491 491 * 492 492 */ 493 public void moveUpMerged(int []rows) {493 public void moveUpMerged(int ... rows) { 494 494 if (rows == null || rows.length == 0) 495 495 return; … … 516 516 * @param rows the indices 517 517 */ 518 public void moveDownMerged(int []rows) {518 public void moveDownMerged(int ... rows) { 519 519 if (rows == null || rows.length == 0) 520 520 return; … … 542 542 * @param rows the indices 543 543 */ 544 public void removeMerged(int []rows) {544 public void removeMerged(int ... rows) { 545 545 if (rows == null || rows.length == 0) 546 546 return; -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMerger.java
r10378 r10680 238 238 } 239 239 240 private void selectNextConflict(int []rows) {240 private void selectNextConflict(int ... rows) { 241 241 int max = rows[0]; 242 242 for (int row: rows) { -
trunk/src/org/openstreetmap/josm/gui/dialogs/OsmIdSelectionDialog.java
r10638 r10680 52 52 protected final transient GroupLayout layout = new GroupLayout(panel); 53 53 54 public OsmIdSelectionDialog(Component parent, String title, String []buttonTexts) {54 public OsmIdSelectionDialog(Component parent, String title, String ... buttonTexts) { 55 55 super(parent, title, buttonTexts); 56 56 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java
r10611 r10680 343 343 } 344 344 345 public void selectPrimitivesOwnedBy(int []rows) {345 public void selectPrimitivesOwnedBy(int ... rows) { 346 346 Set<User> users = new HashSet<>(); 347 347 for (int index: rows) { … … 358 358 } 359 359 360 public List<User> getSelectedUsers(int []rows) {360 public List<User> getSelectedUsers(int ... rows) { 361 361 List<User> ret = new LinkedList<>(); 362 362 if (rows == null || rows.length == 0) -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
r10662 r10680 958 958 } 959 959 960 protected void deleteTags(int []rows) {960 protected void deleteTags(int ... rows) { 961 961 // convert list of rows to HashMap (and find gap for nextKey) 962 962 Map<String, String> tags = new HashMap<>(rows.length); -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java
r10662 r10680 529 529 protected AutoCompletingComboBox values; 530 530 531 AbstractTagsDialog(Component parent, String title, String []buttonTexts) {531 AbstractTagsDialog(Component parent, String title, String ... buttonTexts) { 532 532 super(parent, title, buttonTexts); 533 533 addMouseListener(new PopupMenuLauncher(popupMenu)); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java
r10616 r10680 254 254 } 255 255 256 public void moveUp(int []selectedRows) {256 public void moveUp(int ... selectedRows) { 257 257 if (!canMoveUp(selectedRows)) 258 258 return; … … 275 275 } 276 276 277 public void moveDown(int []selectedRows) {277 public void moveDown(int ... selectedRows) { 278 278 if (!canMoveDown(selectedRows)) 279 279 return; … … 298 298 } 299 299 300 public void remove(int []selectedRows) {300 public void remove(int ... selectedRows) { 301 301 if (!canRemove(selectedRows)) 302 302 return; … … 312 312 } 313 313 314 public boolean canMoveUp(int []rows) {314 public boolean canMoveUp(int ... rows) { 315 315 if (rows == null || rows.length == 0) 316 316 return false; … … 319 319 } 320 320 321 public boolean canMoveDown(int []rows) {321 public boolean canMoveDown(int ... rows) { 322 322 if (rows == null || rows.length == 0) 323 323 return false; … … 326 326 } 327 327 328 public boolean canRemove(int []rows) {328 public boolean canRemove(int ... rows) { 329 329 if (rows == null || rows.length == 0) 330 330 return false; -
trunk/src/org/openstreetmap/josm/gui/history/TwoColumnDiff.java
r10670 r10680 64 64 boolean referenceReversed; 65 65 66 TwoColumnDiff(Object[] reference, Object []current) {66 TwoColumnDiff(Object[] reference, Object ... current) { 67 67 this.reference = Utils.copyArray(reference); 68 68 this.current = Utils.copyArray(current); -
trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java
r10619 r10680 239 239 } 240 240 241 public List<OsmPrimitive> getPrimitives(int []indices) {241 public List<OsmPrimitive> getPrimitives(int ... indices) { 242 242 if (indices == null || indices.length == 0) 243 243 return Collections.emptyList(); -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java
r10611 r10680 128 128 * @return non-editable table 129 129 */ 130 private JTable buildTable(Object[] []content) {130 private JTable buildTable(Object[]... content) { 131 131 final String[] headers = {tr("Name"), tr("Description"), tr("Timespan"), tr("Length"), tr("URL")}; 132 132 DefaultTableModel model = new DefaultTableModel(content, headers); -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportImagesAction.java
r9305 r10680 41 41 } 42 42 43 private static void addRecursiveFiles(List<File> files, File []sel) {43 private static void addRecursiveFiles(List<File> files, File ... sel) { 44 44 if (sel == null) { // listFiles might return null 45 45 return; -
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/NodeElement.java
r10420 r10680 142 142 } 143 143 144 public static MapImage createIcon(final Environment env, final String []keys) {144 public static MapImage createIcon(final Environment env, final String ... keys) { 145 145 CheckParameterUtil.ensureParameterNotNull(env, "env"); 146 146 CheckParameterUtil.ensureParameterNotNull(keys, "keys"); -
trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorModel.java
r10647 r10680 272 272 * @param tagIndices a list of tag indices 273 273 */ 274 public void deleteTagNames(int []tagIndices) {274 public void deleteTagNames(int ... tagIndices) { 275 275 if (tags == null) 276 276 return; … … 291 291 * @param tagIndices the lit of tag indices 292 292 */ 293 public void deleteTagValues(int []tagIndices) {293 public void deleteTagValues(int ... tagIndices) { 294 294 if (tags == null) 295 295 return; … … 334 334 * @param tagIndices the list of tag indices 335 335 */ 336 public void deleteTags(int []tagIndices) {336 public void deleteTags(int ... tagIndices) { 337 337 if (tags == null) 338 338 return; -
trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetSelector.java
r10657 r10680 118 118 } 119 119 120 private static int isMatching(Collection<String> values, String []searchString) {120 private static int isMatching(Collection<String> values, String ... searchString) { 121 121 int sum = 0; 122 122 for (String word: searchString) { … … 142 142 } 143 143 144 int isMatchingGroup(String []words) {144 int isMatchingGroup(String ... words) { 145 145 return isMatching(groups, words); 146 146 } 147 147 148 int isMatchingName(String []words) {148 int isMatchingName(String ... words) { 149 149 return isMatching(names, words); 150 150 } 151 151 152 int isMatchingTags(String []words) {152 int isMatchingTags(String ... words) { 153 153 return isMatching(tags, words); 154 154 } -
trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/ComboMultiSelect.java
r10590 r10680 158 158 private final String delimiter; 159 159 160 protected ConcatenatingJList(String del, PresetListEntry []o) {160 protected ConcatenatingJList(String del, PresetListEntry ... o) { 161 161 super(o); 162 162 delimiter = del; -
trunk/src/org/openstreetmap/josm/gui/widgets/QuadStateCheckBox.java
r10672 r10680 53 53 * @param allowed The allowed states 54 54 */ 55 public QuadStateCheckBox(String text, Icon icon, State initial, State []allowed) {55 public QuadStateCheckBox(String text, Icon icon, State initial, State ... allowed) { 56 56 super(text, icon); 57 57 this.allowed = Utils.copyArray(allowed); … … 86 86 * @param allowed The allowed states 87 87 */ 88 public QuadStateCheckBox(String text, State initial, State []allowed) {88 public QuadStateCheckBox(String text, State initial, State ... allowed) { 89 89 this(text, null, initial, allowed); 90 90 } -
trunk/src/org/openstreetmap/josm/tools/Diff.java
r10600 r10680 567 567 * @see #equivCount() 568 568 */ 569 private byte[] discardable(final int []counts) {569 private byte[] discardable(final int ... counts) { 570 570 final int end = bufferedLines; 571 571 final byte[] discards = new byte[end]; -
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r10627 r10680 1838 1838 } 1839 1839 1840 private static Color parseRGB(String []s) {1840 private static Color parseRGB(String ... s) { 1841 1841 int[] rgb = new int[3]; 1842 1842 try { -
trunk/src/org/openstreetmap/josm/tools/Utils.java
r10657 r10680 405 405 * @since 6222 406 406 */ 407 public static char[] copyArray(char []array) {407 public static char[] copyArray(char ... array) { 408 408 if (array != null) { 409 409 return Arrays.copyOf(array, array.length); … … 418 418 * @since 7436 419 419 */ 420 public static int[] copyArray(int []array) {420 public static int[] copyArray(int ... array) { 421 421 if (array != null) { 422 422 return Arrays.copyOf(array, array.length); … … 928 928 } 929 929 930 private static String strip(final String str, final char []skipChars) {930 private static String strip(final String str, final char ... skipChars) { 931 931 932 932 int start = 0; -
trunk/src/org/openstreetmap/josm/tools/template_engine/CompoundTemplateEntry.java
r9079 r10680 13 13 } 14 14 15 private CompoundTemplateEntry(TemplateEntry []entries) {15 private CompoundTemplateEntry(TemplateEntry ... entries) { 16 16 this.entries = entries; 17 17 }
Note:
See TracChangeset
for help on using the changeset viewer.