RequiredPredicate
public struct RequiredPredicate<T> : Predicate where T : Collection
The RequiredPredicate
struct is used to evaluate whether a given input is empty.
-
Declaration
Swift
public typealias InputType = T
-
Creates and returns a new
RequiredPredicate
instance.Declaration
Swift
public init()
-
Returns a
Boolean
value that indicates whether a given input is emptyDeclaration
Swift
public func evaluate(with input: T) -> Bool
Parameters
input
The input against which to evaluate the receiver.
Return Value
false
if input is empty, otherwisetrue
.