Class TransferArrayItem<T>

An undoable command that transfers an element from one array to another.

Type Parameters

  • T

Hierarchy

Constructors

  • Creates the command.

    Type Parameters

    • T

    Parameters

    • srcArray: T[]

      The array to take the transferred element from.

    • tgtArray: T[]

      The array to put the transferred element in.

    • srcIndex: number

      The index at which the element is located in the source array.

    • tgtIndex: number

      The index at which the element must be put in the destination array.

    • cmdName: string

      The name of the command.

    Returns TransferArrayItem<T>

Properties

_srcArray: T[]

The array to take the transferred element from.

_srcIndex: number

The index at which the element is located in the source array.

_tgtArray: T[]

The array to put the transferred element in.

_tgtIndex: number

The index at which the element must be put in the target array.

cmdName: string

The name of the command.

status: CmdStatus

The state of the command.

Accessors

Methods

  • Actions may need to create a memento before their first execution. This is the goal of the operation that should be overridden. This operator is called a single time before the first execution of the command.

    Returns void

Generated using TypeDoc