Class ExpressionMatcher

java.lang.Object
liquibase.util.ExpressionMatcher

public final class ExpressionMatcher extends Object
Common functionality for matching set of Context/Labels against provided expression. Supported syntax: - ! / not - to negate expression/token - and - conjunction operator - or - disjunction operator - () - increase evaluation order priority for sub-expression

Examples: "(a and b) or (c and d)" "!a and b"

Usage:

See Also:
  • Method Details

    • matches

      public static boolean matches(String expression, Collection<String> items)
      Test provided expression against list of items. Case insensitive.
      Parameters:
      expression - - expression that will be parsed and evaluated against provided list of items
      items - - list of items
      Returns:
      true if provided list of items satisfy expression criteria. false otherwise.