Changeset 12190 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2017-05-16T00:01:44+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/osm
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java
r11940 r12190 307 307 } 308 308 309 /** 310 * Gets the type this primitive is displayed at 311 * @return A {@link OsmPrimitiveType} 312 */ 309 313 public OsmPrimitiveType getDisplayType() { 310 314 return getType(); … … 669 673 } 670 674 675 /** 676 * Gets a key ignoring the case of the key 677 * @param key The key to get 678 * @return The value for a key that matches the given key ignoring case. 679 */ 671 680 public final String getIgnoreCase(String key) { 672 681 String[] keys = this.keys; … … 681 690 } 682 691 692 /** 693 * Gets the number of keys 694 * @return The number of keys set for this primitive. 695 */ 683 696 public final int getNumKeys() { 684 697 String[] keys = this.keys; -
trunk/src/org/openstreetmap/josm/data/osm/BBox.java
r12183 r12190 299 299 } 300 300 301 /** 302 * Converts the bounds to a rectangle 303 * @return The rectangle in east/north space. 304 */ 301 305 public Rectangle2D toRectangle() { 302 306 return new Rectangle2D.Double(xmin, ymin, xmax - xmin, ymax - ymin); … … 339 343 } 340 344 345 /** 346 * Creates a CSV string for this bbox 347 * @param separator The separator to use 348 * @return A string 349 */ 341 350 public String toStringCSV(String separator) { 342 351 return Utils.join(separator, Arrays.asList( -
trunk/src/org/openstreetmap/josm/data/osm/ChangesetCacheListener.java
r10600 r12190 2 2 package org.openstreetmap.josm.data.osm; 3 3 4 /** 5 * A listener that listens to changes on the {@link ChangesetCache} 6 * @see ChangesetCacheEvent 7 */ 4 8 @FunctionalInterface 5 9 public interface ChangesetCacheListener { 6 10 11 /** 12 * Gets notified on changeset cache updates 13 * @param event The event that happened 14 */ 7 15 void changesetCacheUpdated(ChangesetCacheEvent event); 8 16 } -
trunk/src/org/openstreetmap/josm/data/osm/NodeData.java
r12161 r12190 7 7 import org.openstreetmap.josm.data.projection.Projections; 8 8 9 /** 10 * The data on a single node (tags and position) that is stored in the database 11 */ 9 12 public class NodeData extends PrimitiveData implements INode { 10 13 -
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r12188 r12190 1014 1014 } 1015 1015 1016 /** 1017 * Gets a list of all primitives in the current dataset that reference this primitive. 1018 * @return The referrers 1019 */ 1016 1020 public final List<OsmPrimitive> getReferrers() { 1017 1021 return getReferrers(false); -
trunk/src/org/openstreetmap/josm/data/osm/RelationMemberData.java
r11452 r12190 7 7 import org.openstreetmap.josm.tools.CheckParameterUtil; 8 8 9 /** 10 * This is the data (role, type and id) that is stored in the database for a given relation member. 11 */ 9 12 public class RelationMemberData implements PrimitiveId, Serializable { 10 13 -
trunk/src/org/openstreetmap/josm/data/osm/RelationToChildReference.java
r9371 r12190 7 7 import java.util.Set; 8 8 9 /** 10 * This is an extension of {@link RelationMember} that stores the parent relation and the index in it in addition to the role/child. 11 */ 9 12 public class RelationToChildReference { 10 13 … … 48 51 private final OsmPrimitive child; 49 52 53 /** 54 * Create a new {@link RelationToChildReference} 55 * @param parent The parent relation 56 * @param position The position of the child in the parent 57 * @param role The role of the child 58 * @param child The actual child (member of parent) 59 */ 50 60 public RelationToChildReference(Relation parent, int position, String role, OsmPrimitive child) { 51 61 this.parent = parent; … … 55 65 } 56 66 67 /** 68 * Create a new {@link RelationToChildReference} 69 * @param parent The parent relation 70 * @param position The position of the child in the parent 71 * @param member The role and relation for the child 72 */ 57 73 public RelationToChildReference(Relation parent, int position, RelationMember member) { 58 this.parent = parent; 59 this.position = position; 60 this.role = member.getRole(); 61 this.child = member.getMember(); 74 this(parent, position, member.getRole(), member.getMember()); 62 75 } 63 76 77 /** 78 * Get the parent relation 79 * @return The parent 80 */ 64 81 public Relation getParent() { 65 82 return parent; 66 83 } 67 84 85 /** 86 * Get the position of the child in the parent 87 * @return The position of the child 88 */ 68 89 public int getPosition() { 69 90 return position; 70 91 } 71 92 93 /** 94 * Get the role of the child 95 * @return The role 96 */ 72 97 public String getRole() { 73 98 return role; 74 99 } 75 100 101 /** 102 * Get the actual child 103 * @return The child 104 */ 76 105 public OsmPrimitive getChild() { 77 106 return child; -
trunk/src/org/openstreetmap/josm/data/osm/SimplePrimitiveId.java
r10300 r12190 10 10 import java.util.regex.Pattern; 11 11 12 /** 13 * A primitive id and a primitive type 14 */ 12 15 public class SimplePrimitiveId implements PrimitiveId, Serializable { 13 16 … … 17 20 private final OsmPrimitiveType type; 18 21 22 /** 23 * A pattern that is used to parse a textual primitive id 24 */ 19 25 public static final Pattern ID_PATTERN = Pattern.compile("(n|node|w|way|r|rel|relation)[ /]?(\\d+)"); 20 26 27 /** 28 * A pattern that is used to parse an id range 29 */ 21 30 public static final Pattern MULTIPLE_IDS_PATTERN = Pattern.compile(ID_PATTERN.pattern() + "(-(\\d+))?"); 22 31 32 /** 33 * Create a new primtive id 34 * @param id The id 35 * @param type The type of the primitive 36 */ 23 37 public SimplePrimitiveId(long id, OsmPrimitiveType type) { 24 38 this.id = id; -
trunk/src/org/openstreetmap/josm/data/osm/WayData.java
r12017 r12190 3 3 4 4 import java.util.ArrayList; 5 import java.util.Collections; 5 6 import java.util.List; 6 7 7 8 import org.openstreetmap.josm.data.osm.visitor.PrimitiveVisitor; 8 9 10 /** 11 * The data (tags and node ids) that is stored for a way in the database 12 */ 9 13 public class WayData extends PrimitiveData implements IWay { 10 14 … … 37 41 } 38 42 43 /** 44 * Gets a list of nodes the way consists of 45 * @return The ids of the nodes 46 */ 39 47 public List<Long> getNodes() { 40 return nodes;48 return Collections.unmodifiableList(nodes); 41 49 } 42 50 … … 57 65 } 58 66 67 /** 68 * Sets the nodes array 69 * @param nodes The nodes this way consists of 70 */ 59 71 public void setNodes(List<Long> nodes) { 60 72 this.nodes = new ArrayList<>(nodes); -
trunk/src/org/openstreetmap/josm/data/osm/history/HistoryDataSet.java
r12189 r12190 197 197 } 198 198 199 /** 200 * Gets a unsorted set of all changeset ids that were used by the primitives in this data set 201 * @return The ids 202 */ 199 203 public Collection<Long> getChangesetIds() { 200 204 final Set<Long> ids = new HashSet<>();
Note:
See TracChangeset
for help on using the changeset viewer.