org.openstreetmap.josm.plugins.streetside.history.commands

## Class CommandUnjoin

- java.lang.Object
- - org.openstreetmap.josm.plugins.streetside.history.commands.StreetsideCommand
  - - org.openstreetmap.josm.plugins.streetside.history.commands.StreetsideExecutableCommand
    - - org.openstreetmap.josm.plugins.streetside.history.commands.CommandUnjoin

-     public class CommandUnjoin
      extends StreetsideExecutableCommand

  Command joined when joining two images into the same sequence.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private StreetsideAbstractImage` | `a`
    `private StreetsideAbstractImage` | `b`

    - ### Fields inherited from class org.openstreetmap.josm.plugins.streetside.history.commands.StreetsideCommand

      `images`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CommandUnjoin(java.util.List<StreetsideAbstractImage> images)` Main constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `execute()` Executes the command.
    `void` | `redo()` Redoes the action.
    `void` | `sum(StreetsideCommand command)` If two equal commands are applied consecutively to the same set of images, they are summed in order to reduce them to just one command.
    `java.lang.String` | `toString()`
    `void` | `undo()` Undoes the action.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### a

          private final StreetsideAbstractImage a

    - #### b

          private final StreetsideAbstractImage b

  - ### Constructor Detail

    - #### CommandUnjoin

          public CommandUnjoin(java.util.List<StreetsideAbstractImage> images)

      Main constructor.
      Parameters:
        `images` - The two images that are going to be unjoined. Must be of exactly size 2.
      Throws:
        `java.lang.IllegalArgumentException` - if the List size is different from 2.

  - ### Method Detail

    - #### execute

          public void execute()

      Description copied from class: `StreetsideExecutableCommand`
      Executes the command. It is run when the command is added to the history record.
      Specified by:
        `execute` in class `StreetsideExecutableCommand`

    - #### undo

          public void undo()

      Description copied from class: `StreetsideCommand`
      Undoes the action.
      Specified by:
        `undo` in class `StreetsideCommand`

    - #### redo

          public void redo()

      Description copied from class: `StreetsideCommand`
      Redoes the action.
      Specified by:
        `redo` in class `StreetsideCommand`

    - #### sum

          public void sum(StreetsideCommand command)

      Description copied from class: `StreetsideCommand`
      If two equal commands are applied consecutively to the same set of images, they are summed in order to reduce them to just one command.
      Specified by:
        `sum` in class `StreetsideCommand`
      Parameters:
        `command` - The command to be summed to last command.

    - #### toString

          public java.lang.String toString()

      Specified by:
        `toString` in class `StreetsideCommand`

JOSM Plugins