nor method

  1. @nonVirtual
Spec<T> nor(
  1. Spec<T> other
)

Combines this spec with another using NOR logic (NOT OR).

Returns a new spec that is satisfied only when neither this spec nor other is satisfied — both must fail. Equivalent to calling or followed by negated.

Prefer someSpec.or(other).negated() when readability matters. Use nor as a convenience when the neither-nor intent is central to the business rule.

Example:

// True only when the user is neither banned nor suspended
final fullyActive = IsBanned().nor(IsSuspended());

Implementation

@nonVirtual
Spec<T> nor(Spec<T> other) => _Nor(this, other);