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

Last change on this file since 3083 was 3083, checked in by bastiK, 14 years ago

added svn:eol-style=native to source files

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