Package liquibase.util
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-expressionExamples: "(a and b) or (c and d)" "!a and b"
Usage:
- See Also:
LabelExpression,ContextExpression
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanmatches(String expression, Collection<String> items)Test providedexpressionagainst list ofitems.
-
-
-
Method Detail
-
matches
public static boolean matches(String expression, Collection<String> items)
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.
-
-