Trait

ch.waan.mcddpui.api

MutationCommand

Related Doc: package api

Permalink

trait MutationCommand[T, U] extends Command

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.2 (0.1.0), 2016-02-29

Since

MCDDPUI 0.1.0

Note

The implicit conversion methods Implicits.function2mutationCommand and Implicits.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.

See also

Command.get

Linear Supertypes
Command, AnyRef, Any
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MutationCommand
  2. Command
  3. AnyRef
  4. Any
  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.

Concrete Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. 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

  5. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

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

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Command

Inherited from AnyRef

Inherited from Any

Ungrouped