public class PrimitivesAddedEvent extends AbstractDatasetChangedEvent
AbstractDatasetChangedEvent.DatasetEventType
Modifier and Type | Field and Description |
---|---|
private java.util.List<? extends OsmPrimitive> |
primitives |
private boolean |
wasIncomplete |
dataSet
Constructor and Description |
---|
PrimitivesAddedEvent(DataSet dataSet,
java.util.Collection<? extends OsmPrimitive> primitives,
boolean wasIncomplete)
Constructs a new
PrimitivesAddedEvent . |
Modifier and Type | Method and Description |
---|---|
void |
fire(DataSetListener listener)
Calls the appropriate method of the listener for this event.
|
java.util.List<? extends OsmPrimitive> |
getPrimitives()
Returns list of primitives modified by this event.
|
AbstractDatasetChangedEvent.DatasetEventType |
getType()
Returns the type of dataset changed event.
|
boolean |
wasIncomplete()
Determines if primitive was in dataset before (so it's not really added), but it was incomplete
|
getDataset, toString
private final java.util.List<? extends OsmPrimitive> primitives
private final boolean wasIncomplete
public PrimitivesAddedEvent(DataSet dataSet, java.util.Collection<? extends OsmPrimitive> primitives, boolean wasIncomplete)
PrimitivesAddedEvent
.dataSet
- the dataset from which the event comes fromprimitives
- the list of primitives affected by the changewasIncomplete
- true
if primitive was in dataset before (so it's not really added), but it was incompletepublic void fire(DataSetListener listener)
AbstractDatasetChangedEvent
fire
in class AbstractDatasetChangedEvent
listener
- dataset listener to notify about this eventpublic java.util.List<? extends OsmPrimitive> getPrimitives()
AbstractDatasetChangedEvent
DataChangedEvent
. It returns all primitives in the dataset
when this method is called (live list), not list of primitives when
the event was createdgetPrimitives
in class AbstractDatasetChangedEvent
public boolean wasIncomplete()
true
if primitive was in dataset before (so it's not really added), but it was incompletepublic AbstractDatasetChangedEvent.DatasetEventType getType()
AbstractDatasetChangedEvent
getType
in class AbstractDatasetChangedEvent