Class/Object

com.thoughtworks.dsl.keywords

Each

Related Docs: object Each | package keywords

Permalink

final case class Each[Element](elements: Traversable[Element]) extends Keyword[Each[Element], Element] with Product with Serializable

Iterates though each element in elements.

Author:

杨博 (Yang Bo)

Source
Each.scala
Example:
  1. Each keywords can be used to calculate cartesian product.

    def cartesianProduct = List(!Each(Array(1, 2, 3)) * !Each(Vector(1, 10, 100, 1000)))
    cartesianProduct should be(List(1, 10, 100, 1000, 2, 20, 200, 2000, 3, 30, 300, 3000))
See also

comprehension if you want to use traditional for comprehension instead of !-notation.

Linear Supertypes
Serializable, Serializable, Product, Equals, Keyword[Each[Element], Element], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Each
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Keyword
  7. AnyRef
  8. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Each(elements: Traversable[Element])

    Permalink

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 Each[Element] to any2stringadd[Each[Element]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Each[Element], B)

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

    Permalink
    Definition Classes
    AnyRef → Any
  6. final def apply[Domain](handler: (Element) ⇒ Domain)(implicit dsl: Dsl[Each[Element], Domain, Element]): Domain

    Permalink

    An alias to cpsApply.

    An alias to cpsApply.

    Definition Classes
    Keyword
    Annotations
    @inline()
  7. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  9. final def cpsApply[Domain](handler: (Element) ⇒ Domain)(implicit dsl: Dsl[Each[Element], Domain, Element]): Domain

    Permalink
    Definition Classes
    Keyword
    Annotations
    @inline()
  10. val elements: Traversable[Element]

    Permalink
  11. def ensuring(cond: (Each[Element]) ⇒ Boolean, msg: ⇒ Any): Each[Element]

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

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

    Permalink
    Implicit information
    This member is added by an implicit conversion from Each[Element] to Ensuring[Each[Element]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: Boolean): Each[Element]

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

    Permalink
    Definition Classes
    AnyRef
  16. def formatted(fmtstr: String): String

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

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  18. final def isInstanceOf[T0]: Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  23. final def unary_!: Element

    Permalink
    Definition Classes
    Keyword
    Annotations
    @shift() @compileTimeOnly( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. def [B](y: B): (Each[Element], B)

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

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Keyword[Each[Element], Element]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Each[Element] to any2stringadd[Each[Element]]

Inherited by implicit conversion StringFormat from Each[Element] to StringFormat[Each[Element]]

Inherited by implicit conversion Ensuring from Each[Element] to Ensuring[Each[Element]]

Inherited by implicit conversion ArrowAssoc from Each[Element] to ArrowAssoc[Each[Element]]

Ungrouped