Package com.helixframework.rules
Class RuleFilters
java.lang.Object
com.helixframework.rules.RuleFilters
Set of rule filtering predicates to use with the rules engine.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Predicate<T>Combines the supplied predicates.hasClassification(String classification) Filters rules with the specified classification.hasClassificationAndTags(String classification, Map<String, String> tags) Filters rules with the specified classification and tags.Filters rules which have dependencies on other rules.Filters rules with the specified tags.Filters rules which have no dependencies on other rules.
-
Method Details
-
hasDependencies
Filters rules which have dependencies on other rules.- Returns:
- a
Predicate
-
withoutDependencies
Filters rules which have no dependencies on other rules.- Returns:
- a
Predicate
-
hasClassification
Filters rules with the specified classification.- Parameters:
classification- rule classification- Returns:
- a
Predicate
-
hasTags
Filters rules with the specified tags.- Parameters:
tags- rule tags- Returns:
- a
Predicate
-
hasClassificationAndTags
public static Predicate<Rule> hasClassificationAndTags(String classification, Map<String, String> tags) Filters rules with the specified classification and tags.- Parameters:
classification- rule classificationtags- rule tags- Returns:
- a
Predicate
-
combine
Combines the supplied predicates.- Type Parameters:
T- predicate type- Parameters:
predicates- predicates to combine- Returns:
- a single predicate that combines all supplied predicates with an "and"
-