Class RuleDataCompare

class ooodev.dialog.search.tree_search.RuleDataCompare(compare_op)[source]

Rule for matching a node’s data value match value.

This rule can also be used for case-sensitive matching by setting compare_op = "=".

Parameters:

compare_op (Literal[('<', '>', '=', '<=', '>=', '!=')]) –

__init__(compare_op)[source]

Constructor

Parameters:

compare_op (Literal[, optional) – which compare operation to preform. Defaults to “].

Return type:

None

is_match(node, match_value)[source]

Gets the node’s data value and compares it with the match value.

Parameters:
  • node (XTreeNode) – Tree node to check.

  • match_value (Any) – Value to match. Must be a string to match.

Returns:

True if the node’s data value matches the match value; Otherwise, False.

Return type:

bool