Pattern

This framework’s main protocol, Pattern, consolidates various aspects of a matcher. The protocol adds the ability to combine, via boolean-logic operators, sub-types for building even more complex matching bahaviors.

  • inverse Default implementation

    inverts the matching bahavior

    Default Implementation

    create a new pattern that has a inverse matching stratergy

    Declaration

    Swift

    var inverse: Pattern
  • and(_:) Default implementation

    joins with another pattern for a Boolean AND operation

    Default Implementation

    Join the given pattern in an AND boolean operation

    Declaration

    Swift

    func and(_: Pattern) -> Pattern
  • or(_:) Default implementation

    joins with another pattern for a Boolean OR operation

    Default Implementation

    Join the given pattern in an OR boolean operation

    Declaration

    Swift

    func or(_: Pattern) -> Pattern