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

## Class CommandJoin

- 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.CommandJoin

-     public class CommandJoin
      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
    `CommandJoin(StreetsideAbstractImage a, StreetsideAbstractImage b)` 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.
    `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

    - #### CommandJoin

          public CommandJoin(StreetsideAbstractImage a,
                             StreetsideAbstractImage b)

      Main constructor.
      Parameters:
        `a` - the first image, that is joined with the second one
        `b` - the second image, that is joined with the first one
      Throws:
        `IllegalArgumentException` - if the images are already in the same sequence
        `NullPointerException` - if `a` or `b` is null

  - ### 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 String toString()

      Specified by:
        `toString` in class `StreetsideCommand`

JOSM Plugins