Specifies a validator that fails on collections with duplicate elements.
Specifies a validator that succeeds on empty instances; the object under validation must implement
def isEmpty: Boolean
(see com.wix.accord.combinators.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 com.wix.accord.dsl.CollectionDslContext.
java.lang.String does not directly implement size
(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.dsl.CollectionOps.HasSize, and by requiring
a view bound from T
to com.wix.accord.dsl.CollectionOps.HasSize at the call site (via
com.wix.accord.dsl.CollectionDslContext) we additionally support any class that directly
conforms to the structural type as well.
The type that conforms, directly or implicitly, to com.wix.accord.dsl.CollectionOps.HasSize.
An object that is, or is implicitly convertible to, scala.collection.GenTraversableOnce.
The specified object, strictly-typed as com.wix.accord.dsl.CollectionOps.HasSize.
Specifies a validator that succeeds only if the object exists in the specified set of items.
Specifies a validator that succeeds only if the object exists in the specified set.
Specifies a validator that fails on empty instances; the object under validation must implement
def isEmpty: Boolean
(see com.wix.accord.combinators.HasEmpty).
Provides access to size-based validators (where the object under validation must implement
def size: Int
, see com.wix.accord.dsl.CollectionOps.HasSize).
Provides access to size-based validators (where the object under validation must implement
def size: Int
, see com.wix.accord.dsl.CollectionOps.HasSize). Enables syntax such as
c.students has size > 0
.
Provides a DSL for collection-like objects. Works in conjunction with com.wix.accord.dsl.DslContext.