|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.josm.data.osm.ChangesetDataSet
public class ChangesetDataSet
A ChangesetDataSet holds the content of a changeset.
Nested Class Summary | |
---|---|
static interface |
ChangesetDataSet.ChangesetDataSetEntry
|
static class |
ChangesetDataSet.ChangesetModificationType
|
private static class |
ChangesetDataSet.DefaultChangesetDataSetEntry
|
private class |
ChangesetDataSet.DefaultIterator
|
Field Summary | |
---|---|
private java.util.Map<PrimitiveId,ChangesetDataSet.ChangesetModificationType> |
modificationTypes
|
private java.util.Map<PrimitiveId,HistoryOsmPrimitive> |
primitives
|
Constructor Summary | |
---|---|
ChangesetDataSet()
|
Method Summary | |
---|---|
boolean |
contains(PrimitiveId id)
Replies true if the changeset content contains the object with primitive id . |
ChangesetDataSet.ChangesetModificationType |
getModificationType(PrimitiveId id)
Replies the modification type for the object with id id . |
HistoryOsmPrimitive |
getPrimitive(PrimitiveId id)
Replies the HistoryOsmPrimitive with id id from this
dataset. |
java.util.Set<HistoryOsmPrimitive> |
getPrimitivesByModificationType(ChangesetDataSet.ChangesetModificationType cmt)
Replies the set of primitives with a specific modification type |
boolean |
isCreated(PrimitiveId id)
Replies true if the primitive with id id was created in this
changeset. |
boolean |
isDeleted(PrimitiveId id)
Replies true if the primitive with id id was deleted in this
changeset. |
boolean |
isUpdated(PrimitiveId id)
Replies true if the primitive with id id was updated in this
changeset. |
java.util.Iterator<ChangesetDataSet.ChangesetDataSetEntry> |
iterator()
|
void |
put(HistoryOsmPrimitive primitive,
ChangesetDataSet.ChangesetModificationType cmt)
Remembers a history primitive with the given modification type |
int |
size()
Replies the number of objects in the dataset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final java.util.Map<PrimitiveId,HistoryOsmPrimitive> primitives
private final java.util.Map<PrimitiveId,ChangesetDataSet.ChangesetModificationType> modificationTypes
Constructor Detail |
---|
public ChangesetDataSet()
Method Detail |
---|
public void put(HistoryOsmPrimitive primitive, ChangesetDataSet.ChangesetModificationType cmt) throws java.lang.IllegalArgumentException
primitive
- the primitive. Must not be null.cmt
- the modification type. Must not be null.
java.lang.IllegalArgumentException
- thrown if primitive is null
java.lang.IllegalArgumentException
- thrown if cmt is nullpublic boolean contains(PrimitiveId id)
id
.
id
- the id.
id
public ChangesetDataSet.ChangesetModificationType getModificationType(PrimitiveId id)
id
. Replies null, if id is null or
if the object with id id
isn't in the changeset content.
id
- the id
public boolean isCreated(PrimitiveId id)
id
was created in this
changeset. Replies false, if id is null.
id
- the id
id
was created in this
changeset.public boolean isUpdated(PrimitiveId id)
id
was updated in this
changeset. Replies false, if id is null.
id
- the id
id
was updated in this
changeset.public boolean isDeleted(PrimitiveId id)
id
was deleted in this
changeset. Replies false, if id is null.
id
- the id
id
was deleted in this
changeset.public java.util.Set<HistoryOsmPrimitive> getPrimitivesByModificationType(ChangesetDataSet.ChangesetModificationType cmt) throws java.lang.IllegalArgumentException
cmt
- the modification type. Must not be null.
java.lang.IllegalArgumentException
- thrown if cmt is nullpublic int size()
public HistoryOsmPrimitive getPrimitive(PrimitiveId id)
HistoryOsmPrimitive
with id id
from this
dataset. null, if there is no such primitive in the data set.
id
- the id
HistoryOsmPrimitive
with id id
from this
datasetpublic java.util.Iterator<ChangesetDataSet.ChangesetDataSetEntry> iterator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |