Trait

ch.waan.mcddpui.api

MutationCommand

Related Doc: package api

Permalink

trait MutationCommand[T, U] extends CommandLike

A mutation command represents a function transforming a given (immutable) data structure into another (immutable) data structure. Any mutation may result in any arbitrary exception or error. Therefore error handling is necessary at the command execution site.

T

the input type

U

the output type

Version

1.4 (0.3.1), 2016-04-06

Since

MCDDPUI 0.1.0

Note

The implicit conversion methods function2mutationCommand and mutationCommand2function can be used to convert freely between types T => Unit and ReadCommand[T].

,

Immutability of the data structure cannot be enforced. Therefore ensuring immutability (or at least apparent immutability) lies in the responsibility of the user.

Linear Supertypes
CommandLike, AnyRef, Any
Known Subclasses
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MutationCommand
  2. CommandLike
  3. AnyRef
  4. Any
Implicitly
  1. by mutationCommand2function
  2. by any2stringadd
  3. by StringFormat
  4. by Ensuring
  5. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def apply(t: T): U

    Permalink

    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.

    t

    the input

    returns

    a new transformed data structure. May be null.

    Annotations
    @throws( classOf[Throwable] )
    Exceptions thrown

    Throwable if any exceptional case occurs

    Note

    Immutability of the data structure cannot be enforced. Therefore ensuring immutability (or at least apparent immutability) lies in the responsibility of the user.

  2. abstract def name: String

    Permalink

    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.

    returns

    the name of this command.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from MutationCommand[T, U] to any2stringadd[MutationCommand[T, U]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (MutationCommand[T, U], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from MutationCommand[T, U] to ArrowAssoc[MutationCommand[T, U]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. def andThen[V](g: MutationCommand[_ >: U, V]): MutationCommand[T, V]

    Permalink

    Chains this command with second one.

    Chains this command with second one.

    V

    the output type of the second command

    g

    the command to chain with this one. May not be null.

    returns

    a MutationCommand with the functionality of this one chained with g.

    Exceptions thrown

    NullPointerException if g is null

  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def compose[A](g: (A) ⇒ T): (A) ⇒ U

    Permalink
    Implicit information
    This member is added by an implicit conversion from MutationCommand[T, U] to (T) ⇒ U performed by method mutationCommand2function in ch.waan.mcddpui.api.
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  10. def ensuring(cond: (MutationCommand[T, U]) ⇒ Boolean, msg: ⇒ Any): MutationCommand[T, U]

    Permalink
    Implicit information
    This member is added by an implicit conversion from MutationCommand[T, U] to Ensuring[MutationCommand[T, U]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: (MutationCommand[T, U]) ⇒ Boolean): MutationCommand[T, U]

    Permalink
    Implicit information
    This member is added by an implicit conversion from MutationCommand[T, U] to Ensuring[MutationCommand[T, U]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean, msg: ⇒ Any): MutationCommand[T, U]

    Permalink
    Implicit information
    This member is added by an implicit conversion from MutationCommand[T, U] to Ensuring[MutationCommand[T, U]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean): MutationCommand[T, U]

    Permalink
    Implicit information
    This member is added by an implicit conversion from MutationCommand[T, U] to Ensuring[MutationCommand[T, U]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  16. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from MutationCommand[T, U] to StringFormat[MutationCommand[T, U]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  18. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  19. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  20. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  21. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. def [B](y: B): (MutationCommand[T, U], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from MutationCommand[T, U] to ArrowAssoc[MutationCommand[T, U]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implicit Value Members

  1. def andThen[A](g: (U) ⇒ A): (T) ⇒ A

    Permalink
    Implicit information
    This member is added by an implicit conversion from MutationCommand[T, U] to (T) ⇒ U performed by method mutationCommand2function in ch.waan.mcddpui.api.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (mutationCommand: (T) ⇒ U).andThen(g)
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  2. def apply(v1: T): U

    Permalink
    Implicit information
    This member is added by an implicit conversion from MutationCommand[T, U] to (T) ⇒ U performed by method mutationCommand2function in ch.waan.mcddpui.api.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (mutationCommand: (T) ⇒ U).apply(v1)
    Definition Classes
    Function1
  3. def toString(): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from MutationCommand[T, U] to (T) ⇒ U performed by method mutationCommand2function in ch.waan.mcddpui.api.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (mutationCommand: (T) ⇒ U).toString()
    Definition Classes
    Function1 → AnyRef → Any

Inherited from CommandLike

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion mutationCommand2function from MutationCommand[T, U] to (T) ⇒ U

Inherited by implicit conversion any2stringadd from MutationCommand[T, U] to any2stringadd[MutationCommand[T, U]]

Inherited by implicit conversion StringFormat from MutationCommand[T, U] to StringFormat[MutationCommand[T, U]]

Inherited by implicit conversion Ensuring from MutationCommand[T, U] to Ensuring[MutationCommand[T, U]]

Inherited by implicit conversion ArrowAssoc from MutationCommand[T, U] to ArrowAssoc[MutationCommand[T, U]]

Ungrouped