Changeset 2396 in josm for trunk/src/org/openstreetmap/josm/data
- Timestamp:
- 2009-11-07T07:26:15+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/DataSet.java
r2388 r2396 52 52 * The API version that created this data set, if any. 53 53 */ 54 public String version; 54 private String version; 55 56 /** 57 * Replies the API version this dataset was created from. May be null. 58 * 59 * @return the API version this dataset was created from. May be null. 60 */ 61 public String getVersion() { 62 return version; 63 } 64 65 /** 66 * Sets the API version this dataset was created from. 67 * 68 * @param version the API version, i.e. "0.5" or "0.6" 69 */ 70 public void setVersion(String version) { 71 this.version = version; 72 } 55 73 56 74 /** 57 75 * All nodes goes here, even when included in other data (ways etc). This enables the instant 58 76 * conversion of the whole DataSet by iterating over this data structure. 59 * @deprecated Use getNodes() for read-only operations, addPrimitive() and removePrimitive() for modifications 60 */ 61 @Deprecated 62 public QuadBuckets<Node> nodes = new QuadBuckets<Node>(); 63 77 */ 78 private QuadBuckets<Node> nodes = new QuadBuckets<Node>(); 79 80 /** 81 * Replies an unmodifiable collection of nodes in this dataset 82 * 83 * @return an unmodifiable collection of nodes in this dataset 84 */ 64 85 public Collection<Node> getNodes() { 65 86 return Collections.unmodifiableCollection(nodes); … … 74 95 * 75 96 * The way nodes are stored only in the way list. 76 * @deprecated Use getWays() for read-only operations, addPrimitive() and removePrimitive() for modifications 77 */ 78 @Deprecated 79 public QuadBuckets<Way> ways = new QuadBuckets<Way>(); 80 97 */ 98 private QuadBuckets<Way> ways = new QuadBuckets<Way>(); 99 100 /** 101 * Replies an unmodifiable collection of ways in this dataset 102 * 103 * @return an unmodifiable collection of ways in this dataset 104 */ 81 105 public Collection<Way> getWays() { 82 106 return Collections.unmodifiableCollection(ways); … … 89 113 /** 90 114 * All relations/relationships 91 * @deprecated Use getRelations() for read-only operations, addPrimitive() and removePrimitive() for modifications 92 */ 93 @Deprecated 94 public Collection<Relation> relations = new LinkedList<Relation>(); 95 115 */ 116 private Collection<Relation> relations = new LinkedList<Relation>(); 117 118 /** 119 * Replies an unmodifiable collection of relations in this dataset 120 * 121 * @return an unmodifiable collection of relations in this dataset 122 */ 96 123 public Collection<Relation> getRelations() { 97 124 return Collections.unmodifiableCollection(relations); … … 703 730 } 704 731 } 732 733 /** 734 * Removes all primitives from the dataset and resets the currently selected primitives 735 * to the empty collection. Also notifies selection change listeners if necessary. 736 * 737 */ 738 public void clear() { 739 if (!selectedPrimitives.isEmpty()) { 740 selectedPrimitives.clear(); 741 fireSelectionChanged(); 742 } 743 nodes.clear(); 744 ways.clear(); 745 relations.clear(); 746 } 705 747 }
Note:
See TracChangeset
for help on using the changeset viewer.
