InequalityExpressionMatcher

Struct that is used to validate inequality expressions.

  • InequalitySign of expression to be matched.

    Declaration

    Swift

    let sign: InequalitySign
  • A value that will be used during validation to compare to passed one.

    Declaration

    Swift

    let value: Double
  • Initialization method takes few parameters that has been fetched from expression parser.

    Declaration

    Swift

    init(sign: InequalitySign, value: Double)

    Parameters

    sign

    InequalitySign parsed from expression pattern.

    value

    value that will be used to compare.

    Return Value

    inquality expression matcher.

  • Method used to validate passed value and check if it match to expression.

    Declaration

    Swift

    func validate(val: String) -> Bool

    Parameters

    val

    value passed as String that will be converted to Double.

    Return Value

    true if val match expression pattern, otherwise false.