Class RelationMemberConflictResolverCommand
- java.lang.Object
-
- org.openstreetmap.josm.command.Command
-
- org.openstreetmap.josm.command.conflict.ConflictResolveCommand
-
- org.openstreetmap.josm.command.conflict.RelationMemberConflictResolverCommand
-
- All Implemented Interfaces:
PseudoCommand
public class RelationMemberConflictResolverCommand extends ConflictResolveCommand
Represents the resolution of conflicts in the member list of twoRelation
s.- Since:
- 1631
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openstreetmap.josm.command.Command
Command.OldNodeState
-
-
Field Summary
Fields Modifier and Type Field Description private Conflict<Relation>
conflict
the conflict to resolveprivate java.util.List<RelationMember>
mergedMembers
the list of merged nodes.-
Fields inherited from class org.openstreetmap.josm.command.Command
IS_INCOMPLETE, IS_OK, IS_OUTSIDE
-
-
Constructor Summary
Constructors Constructor Description RelationMemberConflictResolverCommand(Conflict<? extends OsmPrimitive> conflict, java.util.List<RelationMember> mergedMembers)
Constructs a newRelationMemberConflictResolverCommand
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
boolean
executeCommand()
Executes the command on the dataset.void
fillModifiedData(java.util.Collection<OsmPrimitive> modified, java.util.Collection<OsmPrimitive> deleted, java.util.Collection<OsmPrimitive> added)
Fill in the changed data this command operates on.javax.swing.Icon
getDescriptionIcon()
Provides a descriptive icon of this command.java.lang.String
getDescriptionText()
Provides a description text representing this command.int
hashCode()
void
undoCommand()
Undoes the command.-
Methods inherited from class org.openstreetmap.josm.command.conflict.ConflictResolveCommand
reconstituteConflicts, rememberConflict
-
Methods inherited from class org.openstreetmap.josm.command.Command
checkOutlyingOrIncompleteOperation, ensurePrimitivesAreInDataset, getAffectedDataSet, getOrig, getParticipatingPrimitives
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openstreetmap.josm.command.PseudoCommand
getChildren
-
-
-
-
Field Detail
-
mergedMembers
private final java.util.List<RelationMember> mergedMembers
the list of merged nodes. This becomes the list of news of my way after the command is executed
-
-
Constructor Detail
-
RelationMemberConflictResolverCommand
public RelationMemberConflictResolverCommand(Conflict<? extends OsmPrimitive> conflict, java.util.List<RelationMember> mergedMembers)
Constructs a newRelationMemberConflictResolverCommand
.- Parameters:
conflict
- the conflict to resolvemergedMembers
- the list of merged relation members
-
-
Method Detail
-
getDescriptionText
public java.lang.String getDescriptionText()
Description copied from interface:PseudoCommand
Provides a description text representing this command.- Returns:
- description text representing this command
-
getDescriptionIcon
public javax.swing.Icon getDescriptionIcon()
Description copied from interface:PseudoCommand
Provides a descriptive icon of this command.- Returns:
- descriptive icon of this command
-
executeCommand
public boolean executeCommand()
Description copied from class:Command
Executes the command on the dataset. This implementation will remember all primitives returned by fillModifiedData for restoring them on undo.The layer should be invalidated after execution so that it can be re-painted.
- Overrides:
executeCommand
in classCommand
- Returns:
- true
-
fillModifiedData
public void fillModifiedData(java.util.Collection<OsmPrimitive> modified, java.util.Collection<OsmPrimitive> deleted, java.util.Collection<OsmPrimitive> added)
Description copied from class:Command
Fill in the changed data this command operates on. Add to the lists, don't clear them.- Specified by:
fillModifiedData
in classCommand
- Parameters:
modified
- The modified primitivesdeleted
- The deleted primitivesadded
- The added primitives
-
undoCommand
public void undoCommand()
Description copied from class:Command
Undoes 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:
undoCommand
in classConflictResolveCommand
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classConflictResolveCommand
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classConflictResolveCommand
-
-