Package liquibase.util
Class ExpressionMatcher
java.lang.Object
liquibase.util.ExpressionMatcher
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 Summary
Modifier and TypeMethodDescriptionstatic booleanmatches(String expression, Collection<String> items) Test providedexpressionagainst list ofitems.
-
Method Details
-
matches
Test providedexpressionagainst list ofitems. Case insensitive.- Parameters:
expression- - expression that will be parsed and evaluated against provided list of itemsitems- - list of items- Returns:
trueif provided list of items satisfy expression criteria.falseotherwise.
-