com.wix.accord

combinators

package combinators

Aggregates all implemented combinators for use by the DSL. Can, though not intended to, be used directly by end-user code.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. combinators
  2. BooleanCombinators
  3. OrderingCombinators
  4. StringCombinators
  5. CollectionCombinators
  6. GeneralPurposeCombinators
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. class And[T] extends Validator[T]

    A combinator that takes a chain of predicates and implements logical AND between them.

  2. class Between[T] extends BaseValidator[T]

    A validator that succeeds only for values between the specified bounds (both bounds are inclusive).

  3. trait BooleanCombinators extends AnyRef

    Simple boolean combinators.

  4. trait CollectionCombinators extends AnyRef

    Combinators that operate on collections and collection-like structures.

  5. class Empty[T <: AnyRef] extends NullSafeValidator[T]

    A validator that operates on objects that can be empty, and succeeds only if the provided instance is empty.

  6. class EndsWith extends NullSafeValidator[String]

    A validator that succeeds only if the provided string starts with the specified suffix.

  7. class EqualTo[T] extends Validator[T]

    A validator that succeeds only if the validated object is equal to the specified value.

  8. class EquivalentTo[T] extends BaseValidator[T]

    A validator that succeeds only for value equivalent (as determined by scala.math.Ordering.equiv) to the specified bound.

  9. class Fail[T] extends Validator[T]

    A validator that always fails with a specific violation.

  10. trait GeneralPurposeCombinators extends AnyRef

    Non type-specific combinators.

  11. class GreaterThan[T] extends BaseValidator[T]

    A validator that succeeds only for values greater than the specified bound.

  12. class GreaterThanOrEqual[T] extends BaseValidator[T]

    A validator that succeeds only for values greater than, or equal to, the specified bound.

  13. type HasEmpty = AnyRef { def isEmpty: Boolean }

    A structural type representing any object that can be empty.

    A structural type representing any object that can be empty.

    Definition Classes
    CollectionCombinators
  14. class IsFalse extends BaseValidator[Boolean]

    A boolean validator that matches only on false.

  15. class IsNotNull extends BaseValidator[AnyRef]

    A validator that succeeds only if the provided object is not null.

  16. class IsNull extends BaseValidator[AnyRef]

    A validator that succeeds only if the provided object is null.

  17. class IsTrue extends BaseValidator[Boolean]

    A boolean validator that matches only on true.

  18. class LesserThan[T] extends BaseValidator[T]

    A validator that succeeds only for values lesser than the specified bound.

  19. class LesserThanOrEqual[T] extends BaseValidator[T]

    A validator that succeeds only for values less than, or equal to, the specified bound.

  20. class MatchesRegex extends NullSafeValidator[String]

    A validator that succeeds only if the provided string matches the specified pattern.

  21. class NilValidator[T] extends Validator[T]

    A validator that always succeeds.

  22. class NotEmpty[T <: AnyRef] extends NullSafeValidator[T]

    A validator that operates on objects that can be empty, and succeeds only if the provided instance is not empty.

  23. class NotEqualTo[T] extends Validator[T]

    A validator that succeeds only if the validated object is not equal to the specified value.

  24. class Or[T] extends Validator[T]

    A combinator that takes a chain of predicates and implements logical OR between them.

  25. trait OrderingCombinators extends AnyRef

    Provides combinators over objects implementing scala.math.Ordering.

  26. class StartsWith extends NullSafeValidator[String]

    A validator that succeeds only if the provided string starts with the specified prefix.

  27. trait StringCombinators extends AnyRef

    Combinators that operate specifically on strings.

  28. class Valid[T] extends Validator[T]

    A validator which merely delegates to another, implicitly available validator.

Value Members

  1. implicit def genericTraversableOnce2HasEmpty[T](gto: T)(implicit arg0: (T) ⇒ GenTraversableOnce[_]): HasEmpty

    An implicit conversion to enable any collection-like object (e.

    An implicit conversion to enable any collection-like object (e.g. strings, options) to be handled by the com.wix.accord.combinators.CollectionCombinators.Empty and com.wix.accord.combinators.CollectionCombinators.NotEmpty combinators.

    java.lang.String does not directly implement isEmpty (in practice it is implemented in scala.collection.IndexedSeqOptimized, via an implicit conversion and an inheritance stack), and this is a case where the Scala compiler does not always infer structural types correctly. By requiring a view bound from T to scala.collection.GenTraversableOnce we can force any collection-like structure to conform to the structural type com.wix.accord.combinators.HasEmpty, and by requiring a view bound from T to com.wix.accord.combinators.HasEmpty at the call site (e.g. com.wix.accord.dsl.empty) we additionally support any class that directly conforms to the structural type as well.

    T

    The type that conforms, directly or implicitly, to com.wix.accord.combinators.HasEmpty.

    gto

    An object that is, or is implicitly convertible to, scala.collection.GenTraversableOnce.

    returns

    The specified object, strictly-typed as com.wix.accord.combinators.HasEmpty.

    Definition Classes
    CollectionCombinators

Inherited from BooleanCombinators

Inherited from OrderingCombinators

Inherited from StringCombinators

Inherited from CollectionCombinators

Inherited from GeneralPurposeCombinators

Inherited from AnyRef

Inherited from Any

Ungrouped