Class ConflictResolveCommand
java.lang.Object
org.openstreetmap.josm.command.Command
org.openstreetmap.josm.command.conflict.ConflictResolveCommand
- All Implemented Interfaces:
PseudoCommand
- Direct Known Subclasses:
CoordinateConflictResolveCommand,DeletedStateConflictResolveCommand,ModifiedConflictResolveCommand,RelationMemberConflictResolverCommand,TagConflictResolveCommand,VersionConflictResolveCommand,WayNodesConflictResolverCommand
This is the common base class for
Commands which manipulate Conflicts in
addition to OsmPrimitives.
A ConflictResolverCommand can remember a collection of conflicts it resolves. Upon undoing
it reconstitutes them.-
Nested Class Summary
Nested classes/interfaces inherited from class org.openstreetmap.josm.command.Command
Command.OldNodeState -
Field Summary
FieldsFields inherited from class org.openstreetmap.josm.command.Command
IS_INCOMPLETE, IS_OK, IS_OUTSIDE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs a newConflictResolveCommandin the context of a given data set. -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()protected voidreconstitutes all remembered conflicts.protected voidrememberConflict(Conflict<?> c) remembers a conflict in the internal list of remembered conflictsvoidUndoes the command.Methods inherited from class org.openstreetmap.josm.command.Command
checkOutlyingOrIncompleteOperation, ensurePrimitivesAreInDataset, executeCommand, fillModifiedData, getAffectedDataSet, getOrig, getParticipatingPrimitivesMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openstreetmap.josm.command.PseudoCommand
getChildren, getDescriptionIcon, getDescriptionText
-
Field Details
-
resolvedConflicts
the list of resolved conflicts
-
-
Constructor Details
-
ConflictResolveCommand
Constructs a newConflictResolveCommandin the context of a given data set.- Parameters:
ds- the data set. Must not be null.
-
-
Method Details
-
rememberConflict
remembers a conflict in the internal list of remembered conflicts- Parameters:
c- the remembered conflict
-
reconstituteConflicts
reconstitutes all remembered conflicts. Add the remembered conflicts to the set of conflicts of theDataSetthis command was applied to. -
undoCommand
Description copied from class:CommandUndoes the command. It can be assumed that all objects are in the same state they were before. It can also be assumed that executeCommand was called exactly once before. This implementation undoes all objects stored by a former call to executeCommand.- Overrides:
undoCommandin classCommand
-
hashCode
-
equals
-