|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openstreetmap.josm.data.osm.history.HistoryOsmPrimitive
org.openstreetmap.josm.data.osm.history.HistoryRelation
public class HistoryRelation
Represents an immutable OSM relation in the context of a historical view on OSM data.
| Field Summary | |
|---|---|
private java.util.ArrayList<RelationMemberData> |
members
|
| Constructor Summary | |
|---|---|
HistoryRelation(long id,
long version,
boolean visible,
User user,
long changesetId,
java.util.Date timestamp)
constructor |
|
HistoryRelation(long id,
long version,
boolean visible,
User user,
long changesetId,
java.util.Date timestamp,
java.util.ArrayList<RelationMemberData> members)
constructor |
|
HistoryRelation(long id,
long version,
boolean visible,
User user,
long changesetId,
java.util.Date timestamp,
boolean checkHistoricParams)
constructor |
|
HistoryRelation(Relation r)
Constructs a new HistoryRelation from an existing Relation. |
|
| Method Summary | |
|---|---|
void |
addMember(RelationMemberData member)
adds a member to the list of members |
java.lang.String |
getDisplayName(HistoryNameFormatter formatter)
Replies the display name of a primitive formatted by formatter |
java.util.List<RelationMemberData> |
getMembers()
replies an immutable list of members of this relation |
int |
getNumMembers()
replies the number of members |
RelationMemberData |
getRelationMember(int idx)
replies the idx-th member |
OsmPrimitiveType |
getType()
replies the type, i.e. |
| Methods inherited from class org.openstreetmap.josm.data.osm.history.HistoryOsmPrimitive |
|---|
compareTo, ensurePositiveLong, equals, forOsmPrimitive, get, getChangesetId, getId, getLocalName, getName, getPrimitiveId, getTags, getTimestamp, getUser, getVersion, hashCode, hasTag, isVisible, matches, matches, put, setTags, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private java.util.ArrayList<RelationMemberData> members
| Constructor Detail |
|---|
public HistoryRelation(long id,
long version,
boolean visible,
User user,
long changesetId,
java.util.Date timestamp)
throws java.lang.IllegalArgumentException
id - the id (>0 required)version - the version (> 0 required)visible - whether the primitive is still visibleuser - the user (! null required)changesetId - the changeset id (> 0 required)timestamp - the timestamp (! null required)
java.lang.IllegalArgumentException - if preconditions are violated
public HistoryRelation(long id,
long version,
boolean visible,
User user,
long changesetId,
java.util.Date timestamp,
boolean checkHistoricParams)
throws java.lang.IllegalArgumentException
id - the id (>0 required)version - the version (> 0 required)visible - whether the primitive is still visibleuser - the user (! null required)changesetId - the changeset id (> 0 required if checkHistoricParams is true)timestamp - the timestamp (! null required if checkHistoricParams is true)checkHistoricParams - If true, checks values of changesetId and timestamp
java.lang.IllegalArgumentException - if preconditions are violated
public HistoryRelation(long id,
long version,
boolean visible,
User user,
long changesetId,
java.util.Date timestamp,
java.util.ArrayList<RelationMemberData> members)
id - the id (>0 required)version - the version (> 0 required)visible - whether the primitive is still visibleuser - the user (! null required)changesetId - the changeset id (> 0 required)timestamp - the timestamp (! null required)members - list of members for this relation
java.lang.IllegalArgumentException - thrown if preconditions are violatedpublic HistoryRelation(Relation r)
HistoryRelation from an existing Relation.
r - the relation| Method Detail |
|---|
public java.util.List<RelationMemberData> getMembers()
public int getNumMembers()
public RelationMemberData getRelationMember(int idx)
throws java.lang.IndexOutOfBoundsException
idx - the index
java.lang.IndexOutOfBoundsException - thrown, if idx is out of boundspublic OsmPrimitiveType getType()
OsmPrimitiveType.RELATION
getType in class HistoryOsmPrimitive
public void addMember(RelationMemberData member)
throws java.lang.IllegalArgumentException
member - the member (must not be null)
java.lang.IllegalArgumentException - thrown, if member is nullpublic java.lang.String getDisplayName(HistoryNameFormatter formatter)
HistoryOsmPrimitiveformatter
getDisplayName in class HistoryOsmPrimitiveformatter - The formatter used to generate a display name
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||