Packages

implicit final class RuleOps[F[_], V[_], E] extends AnyVal

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RuleOps
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new RuleOps(rule: Rule[F, V, E])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##: Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def effect: F[V[E]]

    Alias for unwrap

  6. def flatMap(f: (V[E]) => Rule[F, V, E])(implicit F: Effect[F], V: Validated[V]): Rule[F, V, E]

    Combines rule and result of running f on rule using Rule.and.

    Combines rule and result of running f on rule using Rule.and. This is tricky syntax for usage with for-comprehension yield should always return valid Validated if you want this to work correctly.

    scala> import jap.fields._
    scala> import jap.fields.DefaultAccumulateVM._
    scala> val intF = Field(4)
    val intF: jap.fields.Field[Int] = root:4
    scala> for {
         |  _ <- intF > 4
         |  _ <- intF < 4
         |  _ <- intF !== 4
         | } yield V.valid
    val res0:
      jap.fields.Rule[[A] =>> A, jap.fields.typeclass.Validated.Accumulate,
        jap.fields.ValidationError
      ] = Invalid(List(root -> should be greater than 4, root -> should be less than 4, root -> should not be equal to 4))
  7. def fold[B](onInvalid: (V[E]) => B, onValid: => B)(implicit F: Effect[F], V: Validated[V]): F[B]

    See Rule.fold

  8. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  9. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  10. def map(f: (V[E]) => V[E])(implicit F: Effect[F], V: Validated[V]): Rule[F, V, E]

    Combines rule and result of running f on rule using Rule.and.

    Combines rule and result of running f on rule using Rule.and. This is tricky syntax for usage with for-comprehension. Check example in flatMap

  11. def toString(): String
    Definition Classes
    Any
  12. def unwrap: F[V[E]]

    Unwraps rule to its actual type

Inherited from AnyVal

Inherited from Any

Ungrouped