Changeset 7704 in josm for trunk/src/org/openstreetmap/josm/data
- Timestamp:
- 2014-11-04T02:33:20+01:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/osm
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/Changeset.java
r7700 r7704 2 2 package org.openstreetmap.josm.data.osm; 3 3 4 import java.util.ArrayList; 4 5 import java.util.Collection; 6 import java.util.Collections; 5 7 import java.util.Date; 6 8 import java.util.HashMap; 9 import java.util.List; 7 10 import java.util.Map; 8 11 … … 39 42 /** the map of tags */ 40 43 private Map<String,String> tags; 41 /** indicates whether this changeset is incomplete. For an 42 * incomplete changeset we only know its id 43 */ 44 /** indicates whether this changeset is incomplete. For an incomplete changeset we only know its id */ 44 45 private boolean incomplete; 45 46 /** the changeset content */ 46 47 private ChangesetDataSet content = null; 48 /** the changeset discussion */ 49 private List<ChangesetDiscussionComment> discussion = null; 47 50 48 51 /** … … 328 331 this.content = content; 329 332 } 333 334 /** 335 * Replies the list of comments in the changeset discussion, if any. 336 * @return the list of comments in the changeset discussion. May be empty but never null 337 * @since 7704 338 */ 339 public synchronized final List<ChangesetDiscussionComment> getDiscussion() { 340 if (discussion == null) { 341 return Collections.emptyList(); 342 } 343 return new ArrayList<>(discussion); 344 } 345 346 /** 347 * Adds a comment to the changeset discussion. 348 * @param comment the comment to add. Ignored if null 349 * @since 7704 350 */ 351 public synchronized final void addDiscussionComment(ChangesetDiscussionComment comment) { 352 if (comment == null) { 353 return; 354 } 355 if (discussion == null) { 356 discussion = new ArrayList<>(); 357 } 358 discussion.add(comment); 359 } 330 360 }
Note:
See TracChangeset
for help on using the changeset viewer.