source: josm/trunk/src/org/openstreetmap/josm/data/osm/history/RelationMember.java@ 2561

Last change on this file since 2561 was 2561, checked in by jttt, 14 years ago

Applied #4059 by mjulius - Relation history window does not show up

File size: 1.6 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.osm.history;
3
4import static org.openstreetmap.josm.tools.I18n.tr;
5
6import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
7
8/**
9 * Represents a relation member in the the context of a historical view on
10 * OSM data.
11 *
12 */
13public class RelationMember {
14
15 private String role;
16 private OsmPrimitiveType primitiveType;
17 private long primitiveId;
18
19 /**
20 *
21 * @param role the role
22 * @param primitiveType the type (must not be null)
23 * @param primitiveId the id
24 *
25 * @exception IllegalArgumentException thrown, if primitiveType is null
26 */
27 public RelationMember(String role, OsmPrimitiveType primitiveType, long primitiveId) {
28 this.role = (role == null ? "" : role);
29 if (primitiveType == null)
30 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "primitiveType"));
31 this.primitiveType = primitiveType;
32 this.primitiveId = primitiveId;
33 }
34
35 /**
36 * replies the member role
37 * @return the member role
38 */
39 public String getRole() {
40 return role;
41 }
42
43 /**
44 * replies the type of the referenced OSM primitive
45 *
46 * @return the type of the referenced OSM primitive
47 */
48 public OsmPrimitiveType getPrimitiveType() {
49 return primitiveType;
50 }
51
52 /**
53 * replies the id of the referenced OSM primitive
54 *
55 * @return the id of the referenced OSM primitive
56 */
57 public long getPrimitiveId() {
58 return primitiveId;
59 }
60}
Note: See TracBrowser for help on using the repository browser.