Convenience constructor
Convenience constructor
Defaults the _name
parameter to null
.
the lambda the command is based off. may not be null
.
NullPointerException
if λ
is null
.
creates a new command instance
creates a new command instance
the lambda the command is based off. may not be null
.
the name of the command. may be null
.
NullPointerException
if λ
is null
.
Chains this command with second one.
Chains this command with second one.
the output type of the second command
the command to chain with this one. May not be null
.
a MutationCommand with the functionality of this one
chained with g
.
NullPointerException
if g
is null
The transformation function for this command.
The transformation function for this command.
Any value returned by this function must be assumed to be valid
at the command execution site. This must also include null
.
Any exceptional case must be indicated by throwing a Throwable.
the input
a new transformed data structure. May be null
.
Throwable
if any exceptional case occurs
Immutability of the data structure cannot be enforced. Therefore ensuring immutability (or at least apparent immutability) lies in the responsibility of the user.
The name of this command.
The name of this command.
This is targeted at UI applications where multi-path redo is possible. In such a situation the names of the commands can be useful to distinguish different redo paths.
the name of this command.
(lambdaMutationCommand: (T) ⇒ U).andThen(g)
(lambdaMutationCommand: (T) ⇒ U).apply(v1)
(lambdaMutationCommand: (T) ⇒ U).toString()
A MutationCommand backed by a java lambda
the input type
the output type
1.1 (0.2.0), 2016-03-02
MCDDPUI 0.2.0
NullPointerException
ifλ
isnull
.